I am migrating an old JSF application from WebSphere to JBoss: the old version uses an IBM implementation of JSF. My question concerns the following component:
<hx:scriptCollector id="aScriptCollector"
preRender="#{aBean.onPageLoadBegin}" postRender="#{aBean.onPageLoadEnd}">
To reproduce the preRender behavior in JSF 2 I use a binding for the form (s. here). My questions:
1) Do you know a trick for simulating postRender in JSF 2?
2) Do you think is the trick I am using for preRender “clean”?
Thanks a lot for your help!
Bye
Closest what you can get to achieve exactly the same hooks is
with
The
preRendercan be achieved in an easier manner, put this anywhere in your view:with
(the argument is optional, you can omit it if never used)
There’s no such thing as
postRenderView, but you can easily create custom events. E.g.and
which you register in
faces-config.xmlasthen you can finally use
with