Hi Jakob,

Because after restore view is actually one of the most used (along with
before render) and was specifically added to 2.0 for that purpose. It's not
possible to make it different because the spec say so, and thus MyFaces
might not pas the TCK if it was made differently. So, there's absolutely
nothing to do about it except raise the issue to the EG. But, as you
mentioned, the before restore is pretty much impossible since the attribute
is not yet restored.


Regards,

~ Simon

On Tue, Oct 27, 2009 at 5:07 PM, Jakob Korherr <[email protected]>wrote:

> Hi,
>
> While working on MYFACES-2374 "UIViewRoot.getBeforePhaseListener() and
> UIViewRoot.getAfterPhaseListener() could be called on PhaseId.RESTORE_VIEW",
> I found out that the mojarra javadoc was changed, so that only
> UIViewRoot.getAfterPhaseListener should be called on RESTORE_VIEW.
>
> Mojarra javadoc on UIViewRoot.setAfterPhaseListener says: "Allow an
> arbitrary method to be called for the "afterPhase" event as the UIViewRoot
> runs through its lifecycle. This method will be called for all phases
> including PhaseId.RESTORE_VIEW."
> Just a week ago UIViewRoot.setBeforePhaseListener also said "...for all
> phases including PhaseId.RESTORE_VIEW.", now it says "...except
> PhaseId.RESTORE_VIEW."
>
> It is clear to me, why this was changed, because you have to restore the
> view before you can access the attributes, not really difficult to see.
> But why should we still call UIViewRoot.getAfterPhaseListener on
> RESTORE_VIEW?
>
> Spec says that we should only call an afterPhase method, if the relating
> beforePhase method returned without an Exception. Of course, these
> attributes of UIViewRoot are different to its "normal" PhaseListeners, but I
> think that this behaviour is kind of strange.
> Why don't we change it back to the way it was in jsf 1.2? So that
> UIViewRoot.getBeforePhaseListener AND UIViewRoot.getAfterPhaseListener are
> called for all phases except RESTORE_VIEW.
>
> Also: Mojarra 2.0.1 does not call UIViewRoot.setAfterPhaseListener on
> RESTORE_VIEW.
>
> Thanks in advance.
>
> Regards
>
> Jakob Korherr
>

Reply via email to