myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Korherr (JIRA)" <>
Subject [jira] Commented: (MYFACES-2374) UIViewRoot.getBeforePhaseListener() and UIViewRoot.getAfterPhaseListener() could be called on PhaseId.RESTORE_VIEW
Date Wed, 04 Nov 2009 20:01:32 GMT


Jakob Korherr commented on MYFACES-2374:

ad 1. Thanks - I did not know that
ad 2. It removes invalid code, because the PhaseListeners from getPhaseListeners() don't need
to be called any more. They changed this behavior, see javadoc of UIViewRoot:

The default implementation must call UIComponentBase.processRestoreState(javax.faces.context.FacesContext,
java.lang.Object) from within a try block. The try block must have a finally block that ensures
that no FacesEvents remain in the event queue, and that the this.UIComponent.visitTree(javax.faces.component.visit.VisitContext,
javax.faces.component.visit.VisitCallback) is called, passing a ContextCallback that takes
the following action: call the UIComponent.processEvent(javax.faces.event.ComponentSystemEvent)
method of the current component. The argument event must be an instance of PostRestoreStateEvent
whose component property is the current component in the traversal.
--> They deleted the following: "that any PhaseListeners in getPhaseListeners() are invoked
as appropriate"

Besides that, this implementation does not check, if the PhaseListener is registered for PhaseId.RESTORE_VIEW
or PhaseId.ANY_PHASE.

> UIViewRoot.getBeforePhaseListener() and UIViewRoot.getAfterPhaseListener() could be called
> ------------------------------------------------------------------------------------------------------------------
>                 Key: MYFACES-2374
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>         Attachments: restore_view_phaselistener.patch, restore_view_phaselistener_newest.patch
> Note that on jsf 1.2 this is not true. The problem with this one is how call UIViewRoot
beforePhaseListener before PhaseId.RESTORE_VIEW, because in theory we need to "restore it"
before call it. Maybe the solution is call it from the place where the state is restored (JspStateManagerImpl).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message