myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bara...@apache.org
Subject svn commit: r375012 - /myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/util/ExtensionsFilter.java
Date Sun, 05 Feb 2006 12:22:38 GMT
Author: baranda
Date: Sun Feb  5 04:22:37 2006
New Revision: 375012

URL: http://svn.apache.org/viewcvs?rev=375012&view=rev
Log:
Fixed dependency on impl in commons

Modified:
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/util/ExtensionsFilter.java

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/util/ExtensionsFilter.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/util/ExtensionsFilter.java?rev=375012&r1=375011&r2=375012&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/util/ExtensionsFilter.java
(original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/component/html/util/ExtensionsFilter.java
Sun Feb  5 04:22:37 2006
@@ -17,9 +17,15 @@
 
 import org.apache.commons.fileupload.FileUpload;
 import org.apache.myfaces.renderkit.html.util.AddResource;
-import org.apache.myfaces.renderkit.html.util.JavascriptUtils;
 import org.apache.myfaces.util.MyFacesJavascriptRendererUtil;
 
+import javax.faces.FactoryFinder;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.context.FacesContextFactory;
+import javax.faces.lifecycle.Lifecycle;
+import javax.faces.lifecycle.LifecycleFactory;
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
@@ -29,12 +35,6 @@
 import javax.servlet.ServletResponse;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import javax.faces.lifecycle.LifecycleFactory;
-import javax.faces.lifecycle.Lifecycle;
-import javax.faces.context.FacesContextFactory;
-import javax.faces.context.FacesContext;
-import javax.faces.component.UIViewRoot;
-import javax.faces.FactoryFinder;
 import java.io.IOException;
 
 /**
@@ -57,6 +57,8 @@
 
     private static final String DOFILTER_CALLED = "org.apache.myfaces.component.html.util.ExtensionFilter.doFilterCalled";
 
+    private static final String OLD_VIEW_ID = "org.apache.myfaces.renderkit.html.util.JavascriptUtils"
+ ".OLD_VIEW_ID";
+
     /**
      * Init method for this filter
      */
@@ -186,9 +188,14 @@
 
       facesContext = contextFactory.getFacesContext(servletContext, request, response, lifecycle);
 
-      UIViewRoot view = facesContext.getApplication().getViewHandler().createView(facesContext,
JavascriptUtils.getOldViewId(facesContext.getExternalContext()));
+      UIViewRoot view = facesContext.getApplication().getViewHandler().createView(facesContext,
getOldViewId(facesContext.getExternalContext()));
       facesContext.setViewRoot(view);
 
       return facesContext;
+    }
+
+    private String getOldViewId(ExternalContext externalContext)
+    {
+        return (String)externalContext.getRequestMap().get(OLD_VIEW_ID);
     }
 }



Mime
View raw message