Hello Nikolay,

when I traced into myfaces source code I saw the code you are describing so it 
was even more surprising to see it continue to RENDER_RESPONSE instead of 
exiting.

Did you try to run Sun's Progress Bar with JSF and  AJAX Sample with myfaces 
libraries? The behavior I am describing is easiest to see if you remove the 
first JSP page (the one with start button) and start immediately with progress 
bar page. If you wish I can send this sample to you.

Thanks,

Leonid



---- "Nikolay Petrov (JIRA)" <[email protected]> wrote: 
>     [ 
> http://issues.apache.org/jira/browse/MYFACES-1409?page=comments#action_12436541
>  ] 
>             
> Nikolay Petrov commented on MYFACES-1409:
> -----------------------------------------
> 
> After calling listeners in restore view phase(and every other) there is the 
> following snippet:
> ...
>         if (isResponseComplete(facesContext, executor.getPhase(), false)
>                       || shouldRenderResponse(facesContext, 
> executor.getPhase(), false)) {
>               // since this phase is completed we don't need to return right 
> away even if the response is completed
>               skipFurtherProcessing = true;
>         }
> 
>         if (!skipFurtherProcessing && log.isTraceEnabled()) {
>                       log.trace("exiting " + executor.getPhase() + " in " + 
> LifecycleImpl.class.getName());
>         }
> 
>         return skipFurtherProcessing;
> ...
> This breaks the phase execution cycle and returns back to the servlet, where 
> render of the Lifecycle is executed. And the method starts with:
> ...
>     public void render(FacesContext facesContext) throws FacesException {
>       // if the response is complete we should not be invoking the phase 
> listeners
>         if(isResponseComplete(facesContext, renderExecutor.getPhase(), true)) 
> {
>               return;
>         }
> ...
> This means that render response phase is actually not executed. So the next 
> thing on request comming through jsf servlet would be restore view phase 
> again. Is that correct?
> 
> > incorrect behavior after RESTORE_VIEW responseComplete
> > ------------------------------------------------------
> >
> >                 Key: MYFACES-1409
> >                 URL: http://issues.apache.org/jira/browse/MYFACES-1409
> >             Project: MyFaces Core
> >          Issue Type: Bug
> >          Components: General
> >    Affects Versions: 1.1.5-SNAPSHOT
> >         Environment: Windows XP, apache-tomcat-5.5.17
> >            Reporter: Leonid Mikhailov
> >             Fix For: 1.1.5-SNAPSHOT
> >
> >
> > The following behavior appears to be incorrect in myfaces implementation of 
> > JOSEF. 
> > After FacesContext.responseComplete is issued in the afterPhase method of  
> > the PhaseListener at the RESTORE_VIEW phase, myfaces implementation skips 
> > to  RENDER_RESPONSE phase. This appears to be incorrect, as following a 
> > call to  FacesContext.responseComplete JOSEF implementation should exit 
> > JOSEF lifecycle  completely, i.e. the next phase of the lifecycle should be 
> > again  RESTORE_VIEW. 
> >  
> > This problem can be observed when running Sun's Progress Bar with JOSEF and 
> >  AJAX Sample with myfaces libraries on Tomcat. 
> 
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators: 
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
> 
>

Reply via email to