You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2014/05/26 12:33:11 UTC

[10/12] git commit: ISIS-793: make easier to override mapping of page URLs

ISIS-793: make easier to override mapping of page URLs


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/a6f2e576
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/a6f2e576
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/a6f2e576

Branch: refs/heads/master
Commit: a6f2e5760d4cd028ad42d7449ee5df7573959098
Parents: c31e50f
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Mon May 26 11:14:54 2014 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Mon May 26 11:14:54 2014 +0100

----------------------------------------------------------------------
 .../wicket/viewer/IsisWicketApplication.java    | 27 +++++++++++++-------
 1 file changed, 18 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/a6f2e576/component/viewer/wicket/impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java b/component/viewer/wicket/impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
index 9d80a4c..0419078 100644
--- a/component/viewer/wicket/impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
+++ b/component/viewer/wicket/impl/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
@@ -241,16 +241,8 @@ public class IsisWicketApplication extends AuthenticatedWebApplication implement
 
             filterJavascriptContributions();
 
+            mountPages();
 
-            // 
-            // map entity and action to provide prettier URLs
-            //
-            // nb: action mount cannot contain {actionArgs}, because the default 
-            // parameters encoder doesn't seem to be able to handle multiple args
-            //
-            mountPage("/entity/${objectOid}", PageType.ENTITY);
-            mountPage("/action/${objectOid}/${actionOwningSpec}/${actionId}/${actionType}", PageType.ACTION_PROMPT);
-            
             @SuppressWarnings("unused")
             SharedResources sharedResources = getSharedResources();
             
@@ -502,6 +494,23 @@ public class IsisWicketApplication extends AuthenticatedWebApplication implement
         });
     }
 
+    // //////////////////////////////////////
+
+    /**
+     * Map entity and action to provide prettier URLs.
+     *
+     * <p>
+     * Factored out for easy (informal) pluggability.
+     * </p>
+     */
+    protected void mountPages() {
+
+        mountPage("/entity/${objectOid}", PageType.ENTITY);
+
+        // nb: action mount cannot contain {actionArgs}, because the default
+        // parameters encoder doesn't seem to be able to handle multiple args
+        mountPage("/action/${objectOid}/${actionOwningSpec}/${actionId}/${actionType}", PageType.ACTION_PROMPT);
+    }
 
     // //////////////////////////////////////