Same styling of photo albums as with tapestry based application.
[photos] / src / main / java / org / wamblee / photos / wicket / WicketApplication.java
index 8339000e32d07158e1dd8e72ac180a485e90c7a7..a1859a70ac3e0d9bbb7d0276d77a52ee922863fb 100644 (file)
  */
 package org.wamblee.photos.wicket;
 
-import javax.servlet.http.HttpServletRequest;
-
 import org.apache.wicket.Request;
 import org.apache.wicket.RequestCycle;
 import org.apache.wicket.Response;
 import org.apache.wicket.protocol.http.WebApplication;
 import org.apache.wicket.protocol.http.WebRequest;
-import org.apache.wicket.request.target.basic.RedirectRequestTarget;
+import org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy;
 import org.apache.wicket.settings.IApplicationSettings;
+import org.apache.wicket.settings.IExceptionSettings;
 import org.wamblee.wicket.inject.ComponentInstantiationInjector;
 import org.wamblee.wicket.transactions.OpenTransactionInViewRequestCycle;
 
 /**
  * Application object for your web application. If you want to run this
  * application without deploying, run the Start class.
- * 
+ *
  * @see org.wamblee.Start#main(String[])
  */
 public class WicketApplication extends WebApplication {
@@ -44,8 +43,7 @@ public class WicketApplication extends WebApplication {
 
     @Override
     public RequestCycle newRequestCycle(Request aRequest, Response aResponse) {
-        return new OpenTransactionInViewRequestCycle(this,
-            (WebRequest) aRequest, aResponse);
+        return new OpenTransactionInViewRequestCycle(this, (WebRequest) aRequest, aResponse);
     }
 
     @Override
@@ -56,6 +54,8 @@ public class WicketApplication extends WebApplication {
         IApplicationSettings settings = getApplicationSettings();
         settings.setInternalErrorPage(ErrorPage.class);
 
+        mount(new MixedParamUrlCodingStrategy("view", HomePage.class, new String[]{"path"}));
+
         // Use the lines below to get the internal error page also when in
         // development mode.
         // IExceptionSettings exs = getExceptionSettings();
@@ -68,5 +68,4 @@ public class WicketApplication extends WebApplication {
     public Class<HomePage> getHomePage() {
         return HomePage.class;
     }
-
 }