开发者

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

开发者 https://www.devze.com 2023-03-02 22:10 出处:网络
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 ?

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

精彩评论

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