This content has been marked as final.
Show 1 reply
-
1. Re: how to invoke a event/bean method on Page reload?
healeyb Jan 31, 2012 3:30 PM (in response to ashishagw)Use <f:event type="preRenderView" listener="#{bean.setupPage}"/>. Note that this will get invoked even for
partial ajax updates, so it can be useful to add a method to an abstract class of your backing bean like
this:
public boolean isAjaxRequest() {
return FacesContext.getCurrentInstance().getPartialViewContext().isAjaxRequest();
}
Regards,
Brendan.