[
http://issues.apache.org/jira/browse/MYFACES-628?page=comments#action_12330912
]
Ronald Brill commented on MYFACES-628:
--------------------------------------
Hi, (i'm the colleague from Holger ...)
Checked your fix (myfaces-20050929-src)
Bad news, the fix seems to work for the first 5 phases but not for the
renderResponse phase. But this is the one we need.
And btw i like to make some more annotation/suggestions for the LifecycleImpl.
Lets start with the method restoreView
After the phaseListener call you insert the following check
if (facesContext.getRenderResponse() ||
facesContext.getResponseComplete())
{
if (log.isDebugEnabled()) log.debug("exiting restoreView in " +
LifecycleImpl.class.getName() + " (--> render response)");
return true;
}
But for me as user of this it will be a big help to know the reason for leaving
the lifecycle here. I suggest to do 2 checks (like this was already done in the
old implementation of applyRequestValues.
Please make two checks and provide a bit more debug information:
if (facesContext.getResponseComplete())
{
if (log.isDebugEnabled()) log.debug("exiting restoreView in " +
LifecycleImpl.class.getName() + " (calling getResponseComplete() after the
beforeListeners returns true)");
return true;
}
if (facesContext.getRenderResponse())
{
if (log.isDebugEnabled()) log.debug("exiting restoreView in " +
LifecycleImpl.class.getName() + " (calling getRenderResponse() after the
beforeListeners returns is true)");
return true;
}
And then use the same pattern (with different text ;-) for the checks after the
afterPhaseListeners.
Then please do a cleanup of all the other methods. Some methods (see
applyRequestValues) are including the same check twice
if (facesContext.getResponseComplete())
.....
if (facesContext.getRenderResponse() ||
facesContext.getResponseComplete())
(The second or is never reached)
And last but not least....
Please implement the same check for the render() method . This method also
invokes the phaseListener at the begining. So the same checks are needed after
that..
Sorry for the late response + thanks for the fast support.
ronald
> Current Lifecycle implementation violates JSF Spec 1.1
> ------------------------------------------------------
>
> Key: MYFACES-628
> URL: http://issues.apache.org/jira/browse/MYFACES-628
> Project: MyFaces
> Type: Bug
> Components: JSR-127
> Versions: 1.1.0
> Reporter: Holger Schimanski
> Assignee: Bill Dudney
> Priority: Blocker
> Fix For: 1.1.1
>
> If a PhaseListener.beforePhase() calles FacesContext.renderResponse() or
> FacesContext.responseComplete(), then the LifeCycleImpl should not execute
> the functionality required for the current phase. (see JSF Spec 1.1 section
> 11-1 page 296f.) LifeCycleImpl is not taking care about this.
> This is important for us, because we'd like to make a redirect in the before
> render response phase. And at the moment an Illegal State exception is
> thrown, because the renderResponse is executed although responseComplete has
> been called.
--
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