myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sobr...@apache.org
Subject svn commit: r748208 - /myfaces/trinidad/branches/1.2.10.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/TrinidadFilterImpl.java
Date Thu, 26 Feb 2009 16:56:20 GMT
Author: sobryan
Date: Thu Feb 26 16:56:20 2009
New Revision: 748208

URL: http://svn.apache.org/viewvc?rev=748208&view=rev
Log:
TRINIDAD-1373: New Dialog Return code does not work if there are no launchParameters returned

* Fixed some logic related to PPR detection
* Added a flag to force the PPR redirect message to be returned.

Modified:
    myfaces/trinidad/branches/1.2.10.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/TrinidadFilterImpl.java

Modified: myfaces/trinidad/branches/1.2.10.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/TrinidadFilterImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.10.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/TrinidadFilterImpl.java?rev=748208&r1=748207&r2=748208&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.10.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/TrinidadFilterImpl.java
(original)
+++ myfaces/trinidad/branches/1.2.10.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/TrinidadFilterImpl.java
Thu Feb 26 16:56:20 2009
@@ -43,6 +43,7 @@
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 import org.apache.myfaces.trinidad.util.ClassLoaderUtils;
 import org.apache.myfaces.trinidad.util.ExternalContextUtils;
+import org.apache.myfaces.trinidad.util.RequestStateMap;
 import org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl;
 import org.apache.myfaces.trinidadinternal.config.dispatch.DispatchResponseConfiguratorImpl;
 import org.apache.myfaces.trinidadinternal.config.dispatch.DispatchServletResponse;
@@ -339,7 +340,10 @@
          .append("=")
          .append(uid);
 
-      if (!RequestContext.getCurrentInstance().isPartialRequest(_PSEUDO_FACES_CONTEXT.get()))
+      //Extensions to Trinidad may have alternatve means of handling PPR.  This
+      //flag allows those extensions to for the <redirect> AJAX message to be returned.
+      if (RequestContext.getCurrentInstance().isPartialRequest(_PSEUDO_FACES_CONTEXT.get())
|| 
+          Boolean.TRUE.equals(RequestStateMap.getInstance(ec).get(_FORCE_PPR_DIALOG_RETURN)))
       {
         //Special handling for XmlHttpRequest.  Would be cool to handle this much cleaner.
         HttpServletResponse resp = (HttpServletResponse) ec.getResponse();
@@ -425,6 +429,10 @@
     "org.apache.myfaces.trinidadinternal.webapp.AdfacesFilterImpl.IS_RETURNING";
   private static final String _FILTER_EXECUTED_KEY =
     "org.apache.myfaces.trinidadinternal.webapp.AdfacesFilterImpl.EXECUTED";
+  
+  //This allows extension which do not use Trinidad's PPR to for an XML dialog return
+  private static final String _FORCE_PPR_DIALOG_RETURN =
+    "org.apache.myfaces.trinidad.webapp.FORCE_XML_DIALOG_RETURN";
 
   private static ThreadLocal<PseudoFacesContext> _PSEUDO_FACES_CONTEXT = 
     new ThreadLocal<PseudoFacesContext>();



Mime
View raw message