Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 253 invoked from network); 10 Feb 2010 17:58:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Feb 2010 17:58:50 -0000 Received: (qmail 50960 invoked by uid 500); 10 Feb 2010 17:58:49 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 50906 invoked by uid 500); 10 Feb 2010 17:58:49 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 50898 invoked by uid 99); 10 Feb 2010 17:58:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Feb 2010 17:58:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Feb 2010 17:58:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 09BA4234C495 for ; Wed, 10 Feb 2010 09:58:28 -0800 (PST) Message-ID: <624485992.184751265824708038.JavaMail.jira@brutus.apache.org> Date: Wed, 10 Feb 2010 17:58:28 +0000 (UTC) From: "Leonardo Uribe (JIRA)" To: dev@myfaces.apache.org Subject: [jira] Reopened: (MYFACES-2544) UIViewRoot skips uncorrectly encodeBegin In-Reply-To: <1612642788.160221265748448016.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MYFACES-2544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leonardo Uribe reopened MYFACES-2544: ------------------------------------- I'll revert the previous patch. The use case you have to consider is when there is an error on a beforePhase listener. If there is, context.getResponseComplete() could return true, inclusive on render response phase. Long time ago, I review MYFACES-2374 and It is known ri does not do this, and this one cause an error on a compatibility test, but in this case the previous behavior is the expected one (the javadoc says so and this one comes from jsf 1.2). Please note maybe there is a misundersanding about what FacesContext.renderResponse() and FacesContext.getRenderResponse() do. The meaning of this constant is allow jsf to skip phases when an error occur. For example, if a validator throws a RuntimeException, ProcessUpdates and InvokeApplication phases should not be executed, so they will be skipped and RenderResponse phase should occur. Why UIViewRoot.encodeBegin skip render the view? because in jsf 1.2 this is considered an error and encodeBegin should not happen, instead, the error page is published. Now, PreRenderViewEvent could be used to change the view to be rendered. Just take a look at org.apache.myfaces.lifecycle.RenderResponseExecutor. Its meaning and behavior are different to PreRenderComponentEvent. Maybe the real bug is UIViewRoot does not call context.getApplication().publishEvent(context, PreRenderComponentEvent.class, UIComponent.class, this); before call encodeBegin(), like UIComponentBase.encodeBegin() does. Maybe this one was ignored, because usually UIViewRoot does not render anything. Note to solve this issue we have also to check if the new behavior introduced with ExceptionHandler api is compatible with the original jsf 1.2 algorithm. Jakob, could you take a look at this one again from this point of view? > 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.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.