How to notify backing bean that JSF has completed rendering? -
i have boolean semaphore
in managed bean denotes whether jsf
page utilizes has completed rendering. default, value should false , once last bit of html has been rendered (or thereabouts), value should set true , never again, during lifecycle of bean, should go false.
i suppose 1 way if have form have hidden input tied bean method sets value of semaphore true. however, there way accomplish without form?
on per-view basis, use <f:view afterphase>
that.
<f:view afterphase="#{bean.afterphase}">
private boolean renderedonce; public void afterphase(phaseevent event) { if (event.getphaseid() == phaseid.render_response) { renderedonce = true; } }
Comments
Post a Comment