What happens if you...

Get rid of your code for registering PhaseListeners and, instead, use:

<lifecycle>
<phase-listener>co.com.atenaerp.seguridad.acegi.jsf.AccessDecicionManagerPhaseListener</phase-listener>
</lifecycle>

in faces-config.xml. (PhaseListeners are not bound to managed/backing beans, but are bound to the whole JSF application. i.e. any particular PhaseListener that you register via faces-config.xml will be activated for every request made to the application's FacesServlet.)

Make sure that you're not parsing faces-config.xml twice for the reasons that Bruno Aranda gave in his e-mail.

Then, make sure that your implementation of PhaseListener has a method exactly like this:

 public PhaseID getPhaseID() {
   return PhaseID.RENDER_RESPONSE;
 }

This tells MyFaces to only invoke the beforePhase(PhaseEvent) and afterPhase(PhaseEvent) methods in your PhaseListener for the RENDER_RESPONSE phase.

The code you want to execute after the RENDER_RESPONSE phase would then go in your PhaseListener's afterPhase(PhaseEvent) method.

Jeremy


Reply via email to