X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fwamblee%2Fphotos%2Fwicket%2FWicketApplication.java;h=bac2877bd8fc4554a39ea3f85720c5a5d4e0f2e0;hb=02397d5c6bbed53e9241f6513480eacdd23870c0;hp=8339000e32d07158e1dd8e72ac180a485e90c7a7;hpb=8845e7fe6141ccc98fd070ee4e653941f6e60508;p=photos diff --git a/src/main/java/org/wamblee/photos/wicket/WicketApplication.java b/src/main/java/org/wamblee/photos/wicket/WicketApplication.java index 8339000..bac2877 100644 --- a/src/main/java/org/wamblee/photos/wicket/WicketApplication.java +++ b/src/main/java/org/wamblee/photos/wicket/WicketApplication.java @@ -15,22 +15,21 @@ */ 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,10 @@ public class WicketApplication extends WebApplication { IApplicationSettings settings = getApplicationSettings(); settings.setInternalErrorPage(ErrorPage.class); + mount(new MixedParamUrlCodingStrategy("view", HomePage.class, new String[]{"path"})); + mount(new MixedParamUrlCodingStrategy("editprofile", EditProfilePage.class, new String[]{})); + mount(new MixedParamUrlCodingStrategy("admin", AdminPage.class, new String[]{})); + // Use the lines below to get the internal error page also when in // development mode. // IExceptionSettings exs = getExceptionSettings(); @@ -68,5 +70,4 @@ public class WicketApplication extends WebApplication { public Class getHomePage() { return HomePage.class; } - }