There is a new component since JSF2.0 & JSF2.1 that can invoke a listener at the defined type of JSF event.
If is <f:event />
To invoke action/listener before a view is rendered,
The type event to be used is preRenderView
If is <f:event />
To invoke action/listener before a view is rendered,
The type event to be used is preRenderView
and this event type is available since JSF2.1
eg,
<f:event type="preRenderView" listener="#{myBean.preRenderViewListener}" />
with the above sample code, #{myBean.preRenderViewListener} will be invoked before the view is rendered.
No comments:
Post a Comment