You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2009/11/21 02:01:25 UTC
svn commit: r882810 -
/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java
Author: lu4242
Date: Sat Nov 21 01:01:24 2009
New Revision: 882810
URL: http://svn.apache.org/viewvc?rev=882810&view=rev
Log:
MYFACES-2374 UIViewRoot.getBeforePhaseListener() and UIViewRoot.getAfterPhaseListener() could be called on PhaseId.RESTORE_VIEW (thanks to Jakob Korherr for the patch)
Modified:
myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java
Modified: myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java?rev=882810&r1=882809&r2=882810&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/component/UIViewRoot.java Sat Nov 21 01:01:24 2009
@@ -654,12 +654,10 @@
// The try block must have a finally block that ensures that no FacesEvents remain in the event queue
broadcastEvents(context, PhaseId.RESTORE_VIEW);
- // that any PhaseListeners in getPhaseListeners() are invoked as appropriate
- PhaseEvent event = createEvent(context, PhaseId.RESTORE_VIEW);
- for (PhaseListener listener: getPhaseListeners())
- {
- listener.afterPhase(event);
- }
+ // invoke afterPhase MethodExpression
+ // Note: In this phase it is not possible to invoke the beforePhase method, because we
+ // first have to restore the view to get its attributes.
+ notifyListeners(context, PhaseId.RESTORE_VIEW, getAfterPhaseListener(), false);
visitTree(VisitContext.createVisitContext(context), new RestoreStateCallback());
}