incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r430849 - in /incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal: context/RequestContextImpl.java renderkit/core/xhtml/PartialPageUtils.java
Date Fri, 11 Aug 2006 18:32:05 GMT
Author: awiner
Date: Fri Aug 11 11:32:05 2006
New Revision: 430849

URL: http://svn.apache.org/viewvc?rev=430849&view=rev
Log:
Fix return value of RequestContext.isPartialRequest() for some types of requests.

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PartialPageUtils.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java?rev=430849&r1=430848&r2=430849&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
Fri Aug 11 11:32:05 2006
@@ -190,11 +190,11 @@
   public boolean isPartialRequest(FacesContext context)
   {
     Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
-    if (Boolean.TRUE.equals(requestMap.get(XhtmlConstants.PARTIAL_PARAM)))
+    if (Boolean.TRUE.equals(requestMap.get(FORCED_PARTIAL_KEY)))
       return true;
     
     Map<String, Object> parameters = context.getExternalContext().getRequestParameterMap();
-    if ("true".equals(parameters.get("partial")))
+    if ("true".equals(parameters.get(XhtmlConstants.PARTIAL_PARAM)))
       return true;
 
     return false;
@@ -690,6 +690,9 @@
     "org.apache.myfaces.trinidadinternal.ChangeManager";
   static private final String _CHANGE_PERSISTENCE_INIT_PARAM =
     "org.apache.myfaces.trinidad.CHANGE_PERSISTENCE";
+
+  static public final String FORCED_PARTIAL_KEY =
+    "org.apache.myfaces.trinidadinternal.ForcedPartialRequest";
 
   static private final TrinidadLogger _LOG =
     TrinidadLogger.createTrinidadLogger(RequestContextImpl.class);

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PartialPageUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PartialPageUtils.java?rev=430849&r1=430848&r2=430849&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PartialPageUtils.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PartialPageUtils.java
Fri Aug 11 11:32:05 2006
@@ -23,6 +23,8 @@
 
 import org.apache.myfaces.trinidadinternal.agent.TrinidadAgent;
 
+import org.apache.myfaces.trinidadinternal.context.RequestContextImpl;
+
 import org.apache.myfaces.trinidadinternal.renderkit.RenderingContext;
 import org.apache.myfaces.trinidadinternal.renderkit.core.ppr.PartialPageContext;
 
@@ -55,7 +57,7 @@
     Map<String, Object> requestMap = 
       context.getExternalContext().getRequestMap();
     
-    requestMap.put(_PARTIAL_KEY, Boolean.TRUE);
+    requestMap.put(RequestContextImpl.FORCED_PARTIAL_KEY, Boolean.TRUE);
   }
 
   public static PartialPageContext createPartialPageContext(
@@ -152,7 +154,4 @@
   // an iFrame is built yet.
   private static final String _PPR_ACTIVE_FLAG_NAME =
           "org.apache.myfaces.trinidadinternal.renderkit._pprActiveOnPage";
-  private static final String _PARTIAL_KEY =
-    "org.apache.myfaces.trinidadinternal.ForcedPartialRequest";
-
 }



Mime
View raw message