Re: Action not firing before defined PhaseId

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

#21782

clemmonsm
Participant

I guess a clarification is really what I need. When using the following:

<action phaseId="RENDER_RESPONSE">#{bean.loadItem}</action>

…does that mean bean.loadItem is supposed to fire before the RENDER RESPONSE beforePhase() or within the RENDER RESPONSE beforePhase()?

If it is the former, then I see that it is working as expected. If it is the latter (which is what I am hoping for), then below is the class I am using to write out the phase logging I detailed in my previous post:

import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;

public class LifeCycleListener implements PhaseListener {

public PhaseId getPhaseId() {
return PhaseId.ANY_PHASE;
}

public void beforePhase(PhaseEvent event) {
System.out.println("START PHASE" + event.getPhaseId());
}

public void afterPhase(PhaseEvent event) {
System.out.println("END PHASE" + event.getPhaseId());
}

}