FAQ
Author: gcrawford
Date: Tue Jul 19 19:21:59 2011
New Revision: 1148493

URL: http://svn.apache.org/viewvc?rev=1148493&view=rev
Log:
TRINIDAD-2121 ChangeManager optimization - Apply ChangeManager customizations only during render response

Thanks to Prakash Udupa for the patch

Modified:
myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewDeclarationLanguageFactoryImpl.java

Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewDeclarationLanguageFactoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewDeclarationLanguageFactoryImpl.java?rev=1148493&r1=1148492&r2=1148493&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewDeclarationLanguageFactoryImpl.java (original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/ViewDeclarationLanguageFactoryImpl.java Tue Jul 19 19:21:59 2011
@@ -38,6 +38,7 @@ import javax.faces.application.Resource;
import javax.faces.component.UIViewRoot;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseId;
import javax.faces.view.StateManagementStrategy;
import javax.faces.view.ViewDeclarationLanguage;
import javax.faces.view.ViewDeclarationLanguageFactory;
@@ -339,8 +340,11 @@ public class ViewDeclarationLanguageFact
throws IOException
{
_wrapped.buildView(facesContext, uiViewRoot);
- ChangeManager cm = RequestContext.getCurrentInstance().getChangeManager();
- cm.applyComponentChangesForCurrentView(FacesContext.getCurrentInstance());
+ if(PhaseId.RENDER_RESPONSE.equals(FacesContext.getCurrentInstance().getCurrentPhaseId()))
+ {
+ ChangeManager cm = RequestContext.getCurrentInstance().getChangeManager();
+ cm.applyComponentChangesForCurrentView(FacesContext.getCurrentInstance());
+ }
}

@Override

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categoriesmyfaces
postedJul 19, '11 at 7:22p
activeJul 19, '11 at 7:22p
posts1
users1
websitemyfaces.apache.org

1 user in discussion

Gcrawford: 1 post

People

Translate

site design / logo © 2019 Grokbase