Re: Action not firing before defined PhaseId

Splash Forums PrettyFaces Users Action not firing before defined PhaseId Re: Action not firing before defined PhaseId

#21793

Hmmm, seems like the invocation happens in a different context here:

at java.lang.Thread.dumpStack(Thread.java:1273)
at siteUtils.siteTasks.loadCommunity(siteTasks.java:283) <---- your method gets invoked
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
at javax.faces.component.UIViewRoot.notifyPhaseListeners(UIViewRoot.java:608) <---- JSF notifies the view event listeners
at javax.faces.component.UIViewRoot.notifyBefore(UIViewRoot.java:510)
at javax.faces.component.UIViewRoot.encodeBegin(UIViewRoot.java:564)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:928)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266) <---- JSF renders the view
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)

So in this case your method is actually called before the rendering occurs but WITHIN the rendering phase. That seems to be the main difference.

Unfortunately I don’t know if we can do anything to help you with this problem. I think a PhaseListener is the only place for PrettyFaces to hook into the phase execution.

@lincoln: any thoughts on this one?

Christian