[
https://issues.apache.org/jira/browse/MYFACES-2544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12832211#action_12832211
]
Leonardo Uribe commented on MYFACES-2544:
-----------------------------------------
>How is context.getResponseComplete() related to error handling?
Look org.apache.myfaces.renderkit.ErrorPageWriter. This one is called after log
a page.
>Yes, but why exclude from executing exactly one method at particular class?
>Why UIViewRoot.encodeEnd is not exluded?
This should not happen and it is a bug. This means the code that call the
listener inside encodeBegin() should be called overriding
UIViewRoot.encodeAll(). Note this is not notice because the typical use case
fall into previous phases.
>I don't think "FacesContext.getRenderResponse() true = a runtime exception" is
>a valid expectation
True. My intention here is analize a possible use case that makes fail the
previous patch, not say this is the rule.
I committed an incomplete alternate patch. It is better to check:
context.getResponseComplete() || (context.getRenderResponse() &&
!PhaseId.RENDER_RESPONSE.equals(phaseId))
and move the algorithm that check for the listener to encodeAll. This fix
should be done in jsf 1.2 too. I'll commit the full solution soon.
> UIViewRoot skips uncorrectly encodeBegin
> ----------------------------------------
>
> Key: MYFACES-2544
> URL: https://issues.apache.org/jira/browse/MYFACES-2544
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.0-beta-2
> Environment: myfaces trunk
> Reporter: Martin Koci
> Assignee: Jakob Korherr
> Fix For: 2.0.0-beta-2
>
> Attachments: MYFACES-2544-2.patch, MYFACES-2544.patch
>
>
> javax.faces.component.UIViewRoot.encodeBegin(FacesContext) contains:
> if (!skipPhase) {
> super.encodeBegin(context);
> }
> but skipPhase = context.getRenderResponse() || context.getResponseComplete()
> - it
> makes sense for all phases except render response phase itself. That condition
> probably should be:
> if (!context.getResponseComplete()) {
> super.encodeBegin(context);
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.