You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2007/05/03 15:44:42 UTC
svn commit: r534857 - in
/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago:
component/ComponentUtil.java lifecycle/RenderResponseExecutor.java
Author: bommel
Date: Thu May 3 06:44:41 2007
New Revision: 534857
URL: http://svn.apache.org/viewvc?view=rev&rev=534857
Log:
(TOBAGO-379) Caching UIPage in ComponentUtil.findPage in the RequestMap
Modified:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/lifecycle/RenderResponseExecutor.java
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java?view=diff&rev=534857&r1=534856&r2=534857
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java Thu May 3 06:44:41 2007
@@ -122,11 +122,15 @@
}
return false;
}
+
+ public static void clearPageCache(FacesContext context) {
+ context.getExternalContext().getRequestMap().put(UIPage.COMPONENT_TYPE, null);
+ }
+
public static UIPage findPage(FacesContext context, UIComponent component) {
UIPage page = (UIPage) context.getExternalContext().getRequestMap().get(UIPage.COMPONENT_TYPE);
if (page == null) {
page = findPage(component);
- } else {
context.getExternalContext().getRequestMap().put(UIPage.COMPONENT_TYPE, page);
}
return page;
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/lifecycle/RenderResponseExecutor.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/lifecycle/RenderResponseExecutor.java?view=diff&rev=534857&r1=534856&r2=534857
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/lifecycle/RenderResponseExecutor.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/lifecycle/RenderResponseExecutor.java Thu May 3 06:44:41 2007
@@ -19,6 +19,7 @@
import org.apache.myfaces.tobago.ajax.api.AjaxResponseRenderer;
import org.apache.myfaces.tobago.ajax.api.AjaxUtils;
+import org.apache.myfaces.tobago.component.ComponentUtil;
import javax.faces.FacesException;
import javax.faces.application.Application;
@@ -49,6 +50,7 @@
throw new FacesException(e.getMessage(), e);
}
} else {
+ ComponentUtil.clearPageCache(facesContext);
Application application = facesContext.getApplication();
ViewHandler viewHandler = application.getViewHandler();