Sorry, I let this one site for a while. From the <a href="http://jsr314-comments.org">jsr314-comments.org</a> inbox.<br><br>-Dan<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Jakob Korherr</b> <span dir="ltr">&lt;<a href="mailto:jakob.korherr@gmail.com">jakob.korherr@gmail.com</a>&gt;</span><br>
Date: Tue, Oct 27, 2009 at 4:07 PM<br>Subject: [jsf 2.0] UIViewRoot afterPhase<br>To: <a href="mailto:jsr-314-comments@jcp.org">jsr-314-comments@jcporg</a><br>Cc: MyFaces Development &lt;<a href="mailto:dev@myfaces.apache.org">dev@myfaces.apache.org</a>&gt;<br>
<br>Hi,<br><br>While working on MYFACES-2374 &quot;UIViewRoot.getBeforePhaseListener() and UIViewRoot.getAfterPhaseListener() could be called on PhaseId.RESTORE_VIEW&quot;, I found out that the mojarra javadoc was changed, so that only UIViewRoot.getAfterPhaseListener should be called on RESTORE_VIEW.<br>

<br>Mojarra javadoc on UIViewRoot.setAfterPhaseListener says:<span> &quot;Allow</span> an arbitrary
 method to be called for the &quot;afterPhase&quot; event as the UIViewRoot
 runs through its lifecycle.  This method will be called for all
 phases <span>including </span>PhaseId.RESTORE_VIEW.&quot;<br>Just a week ago UIViewRoot.setBeforePhaseListener also said &quot;...for all
 phases <span>including </span>PhaseId.RESTORE_VIEW.&quot;, now it says &quot;...except PhaseId.RESTORE_VIEW.&quot;<br><br>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.<br>

But why should we still call UIViewRoot.getAfterPhaseListener on RESTORE_VIEW?<br><br>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 &quot;normal&quot; PhaseListeners, but I think that this behaviour is kind of strange.<br>

Why don&#39;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.<br><br>Also: Mojarra 2.0.1 does not call UIViewRoot.setAfterPhaseListener on RESTORE_VIEW.<br>

<br>Thanks in advance.<br><br>Regards<br><font color="#888888"><br>Jakob Korherr<br>
</font></div>