Author: jcompagner
Date: Wed May 14 07:12:42 2008
New Revision: 656285

URL: http://svn.apache.org/viewvc?rev=656285&view=rev
Log:
fixes for pass through

Modified:
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/request/WebRequestCodingStrategy.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/request/IRequestCodingStrategy.java
    
wicket/trunk/wicket/src/main/java/org/apache/wicket/request/IRequestTargetMounter.java

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/request/WebRequestCodingStrategy.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/request/WebRequestCodingStrategy.java?rev=656285&r1=656284&r2=656285&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/request/WebRequestCodingStrategy.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/protocol/http/request/WebRequestCodingStrategy.java
 Wed May 14 07:12:42 2008
@@ -49,6 +49,7 @@
 import org.apache.wicket.request.IRequestCodingStrategy;
 import org.apache.wicket.request.IRequestTargetMountsInfo;
 import org.apache.wicket.request.RequestParameters;
+import 
org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy;
 import org.apache.wicket.request.target.coding.IRequestTargetUrlCodingStrategy;
 import org.apache.wicket.request.target.coding.WebRequestEncoder;
 import 
org.apache.wicket.request.target.component.BookmarkableListenerInterfaceRequestTarget;
@@ -719,7 +720,7 @@
                final AppendingStringBuffer url = new AppendingStringBuffer(64);
 
                // Get page Class
-               final Class< ? extends Page> pageClass = 
requestTarget.getPageClass();
+               final Class<? extends Page> pageClass = 
requestTarget.getPageClass();
                final Application application = Application.get();
 
                // Find pagemap name
@@ -1189,10 +1190,9 @@
                }
        }
 
-       private static class PassThroughUrlCodingStrategy implements 
IRequestTargetUrlCodingStrategy
+       private static class PassThroughUrlCodingStrategy extends
+               AbstractRequestTargetUrlCodingStrategy
        {
-               private final String path;
-
                /**
                 * Construct.
                 * 
@@ -1200,7 +1200,7 @@
                 */
                public PassThroughUrlCodingStrategy(String path)
                {
-                       this.path = path;
+                       super(path);
                }
 
                public IRequestTarget decode(RequestParameters 
requestParameters)
@@ -1213,21 +1213,10 @@
                        return null;
                }
 
-               public String getMountPath()
-               {
-                       return path;
-               }
-
                public boolean matches(IRequestTarget requestTarget)
                {
                        return false;
                }
-
-               public boolean matches(String path)
-               {
-                       return false;
-               }
-
        }
 
 }

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/request/IRequestCodingStrategy.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/IRequestCodingStrategy.java?rev=656285&r1=656284&r2=656285&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/request/IRequestCodingStrategy.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/request/IRequestCodingStrategy.java
 Wed May 14 07:12:42 2008
@@ -56,15 +56,4 @@
         * @return the url to the provided target
         */
        CharSequence encode(RequestCycle requestCycle, IRequestTarget 
requestTarget);
-
-       /**
-        * Partly unmounts/ignores a path that normally would map to another 
mount path. Like
-        * mount("/mypage", MyPage.class); and then "/mypage/arealdir" should 
be ignored. This can be
-        * done by calling unMount("/mypage/arealdir");
-        * 
-        * @param path
-        *            the path that should be ignored.
-        * 
-        */
-       void addIgnoreMountPath(String path);
 }

Modified: 
wicket/trunk/wicket/src/main/java/org/apache/wicket/request/IRequestTargetMounter.java
URL: 
http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/request/IRequestTargetMounter.java?rev=656285&r1=656284&r2=656285&view=diff
==============================================================================
--- 
wicket/trunk/wicket/src/main/java/org/apache/wicket/request/IRequestTargetMounter.java
 (original)
+++ 
wicket/trunk/wicket/src/main/java/org/apache/wicket/request/IRequestTargetMounter.java
 Wed May 14 07:12:42 2008
@@ -35,6 +35,17 @@
        void mount(IRequestTargetUrlCodingStrategy urlCodingStrategy);
 
        /**
+        * Partly unmounts/ignores a path that normally would map to another 
mount path. Like
+        * mount("/mypage", MyPage.class); and then "/mypage/arealdir" should 
be ignored. This can be
+        * done by calling unMount("/mypage/arealdir");
+        * 
+        * @param path
+        *            the path that should be ignored.
+        * 
+        */
+       void addIgnoreMountPath(String path);
+
+       /**
         * Gets the url that the provided request target conforms to.
         * 
         * @param requestTarget


Reply via email to