You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Markus Jais <ma...@yahoo.de> on 2007/02/22 14:22:45 UTC
PhaseListener question
hello
I have a question about PhaseListeners.
this is my code:
public class MyPhaseListener implements PhaseListener
{
public MyPhaseListener() {
}
public PhaseId getPhaseId() {
return PhaseId.ANY_PHASE;
}
public void beforePhase(PhaseEvent event) {
System.out.println("BEFORE:" +
event.getPhaseId());
}
public void afterPhase(PhaseEvent event) {
System.out.println("AFTER:" + event.getPhaseId());
}
}
whenever I call a web page only the beforePhase seems
to be called.
I get this output when calling a page in my app:
BEFORE:RESTORE_VIEW 1
BEFORE:APPLY_REQUEST_VALUES 2
BEFORE:PROCESS_VALIDATIONS 3
BEFORE:UPDATE_MODEL_VALUES 4
BEFORE:INVOKE_APPLICATION 5
BEFORE:RESTORE_VIEW 1
BEFORE:RENDER_RESPONSE 6
but never any "AFTER".
why is that ?
I want to use a PhaseListener to use JAAS on JBoss
with Tomcat and all the examples I found via google
use the afterPhase Method for implementing this.
I get the behavior with both MyFaces and the JSF 1.2
RI.
best regards
Markus
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de