开发者

What is the alternative to <c:set> after the view is built?

what is the alternative to <c:set> after the view is built ? Generally <c:set> works when the view is being built. After that, how do I change that ?

For example, what would be the equivalent of the following in JSF tag ? The following property is just not set after开发者_如何学JAVA the view is built.

<c:set property="showPromoDetails" target="#{viewScope}" value="null" />


I'll assume JSF 2.x. Put this somewhere in the view, the common convention is somewhere near the top.

<f:metadata>
    <f:event type="preRenderView" listener="#{viewScope.preRenderView}" />
</f:metadata>

with

public void preRenderView() {
    showPromoDetails = null;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜