You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by eh...@apache.org on 2007/04/16 23:08:03 UTC
svn commit: r529401 -
/incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java
Author: ehillenius
Date: Mon Apr 16 14:08:01 2007
New Revision: 529401
URL: http://svn.apache.org/viewvc?view=rev&rev=529401
Log:
resolve mount requests as the last step
Modified:
incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java
Modified: incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java
URL: http://svn.apache.org/viewvc/incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java?view=diff&rev=529401&r1=529400&r2=529401
==============================================================================
--- incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java (original)
+++ incubator/wicket/branches/wicket-1.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebRequestCycleProcessor.java Mon Apr 16 14:08:01 2007
@@ -63,28 +63,6 @@
// First, see whether we can find any mount
IRequestCodingStrategy requestCodingStrategy = requestCycle.getProcessor()
.getRequestCodingStrategy();
- IRequestTarget mounted = requestCodingStrategy.targetForRequest(requestParameters);
-
- // If we've found a mount, only use it if the componentPath is null.
- // Otherwise, we'll service it later with the components.
- if (mounted != null)
- {
- if (mounted instanceof IBookmarkablePageRequestTarget)
- {
- IBookmarkablePageRequestTarget bookmarkableTarget = (IBookmarkablePageRequestTarget)mounted;
- if (requestParameters.getComponentPath() != null
- && requestParameters.getInterfaceName() != null)
- {
- final String componentPath = requestParameters.getComponentPath();
- final Page page = Session.get().getPage(requestParameters.getPageMapName(),
- componentPath, requestParameters.getVersionNumber());
- return resolveListenerInterfaceTarget(requestCycle, page, componentPath,
- requestParameters.getInterfaceName(), requestParameters);
- }
- }
-
- return mounted;
- }
final String path = requestParameters.getPath();
IRequestTarget target = null;
@@ -177,6 +155,32 @@
else if (Strings.isEmpty(path) || ("/".equals(path)))
{
target = resolveHomePageTarget(requestCycle, requestParameters);
+ }
+ else
+ {
+ // check for a mount
+ IRequestTarget mounted = requestCodingStrategy.targetForRequest(requestParameters);
+
+ // If we've found a mount, only use it if the componentPath is null.
+ // Otherwise, we'll service it later with the components.
+ if (mounted != null)
+ {
+ target = mounted;
+
+ if (mounted instanceof IBookmarkablePageRequestTarget)
+ {
+ IBookmarkablePageRequestTarget bookmarkableTarget = (IBookmarkablePageRequestTarget)mounted;
+ if (requestParameters.getComponentPath() != null
+ && requestParameters.getInterfaceName() != null)
+ {
+ final String componentPath = requestParameters.getComponentPath();
+ final Page page = Session.get().getPage(requestParameters.getPageMapName(),
+ componentPath, requestParameters.getVersionNumber());
+ target = resolveListenerInterfaceTarget(requestCycle, page, componentPath,
+ requestParameters.getInterfaceName(), requestParameters);
+ }
+ }
+ }
}
if (target != null)