OK i solved it now. Sorry for the mailinglist noise. This link: https://cwiki.apache.org/WICKET/faqs.html#FAQs-WhatisthedifferencebetweensetResponsePage%2528newMyWebPage%2528%2529%2529andsetResponsePage%2528MyWebPage.class%2529
describes the difference between setReponse(instance) and setResponse(class). I switched to the instance version: this.setResponsePage(new TestPage()); and it worked. I will now debug into the method to see why this difference was so huge. Cheers Christian On Mon, Feb 14, 2011 at 6:02 PM, Christian Grobmeier <[email protected]> wrote: > Hello again, > > it still something weird > > I meanwhile have: > > mountPackage("/", HomePage.class); > mountPackage("/feedback", FeedbackPage.class); > mountPackage("/login", LoginPage.class); > mountPackage("/test", TestPage.class); > > Everything fine so far. After I have logged in (in the onSubmit()), I > redirect to the TestPage: > setResponsePage(TestPage.class); > > And when this happens, my TestPage Bookmarkablelink has the wrong URL. > Instead of /test/TestPage it show wicket/TestPage > > I figured out that the mount only fails for the response page. I > created a second one for testing. If I used this as my response page, > the url gets lost. > > I cannot explain how this happens. I debugged Wicket but couldn't find > the problem. > > My guess is that the form, which baseparam is: > http://localhost:8080/wicket/page?0-1.IFormSubmitListener-loginForm > replaces for some reason my path with its own "wicket". > > thanks in advance, > Christian > . > > > On Mon, Feb 14, 2011 at 4:02 PM, Christian Grobmeier > <[email protected]> wrote: >> Hi Robson, >> >>> I noticed that there are two pages mounted in the same URL: both HomePage >>> and TestPage are mounted on /app. I'm not sure if this is the cause of the >>> problem, but you can try changing the mount point of one of them. >> >> actually you are right. It seems mounting different packages to the >> same mount point is not possible. >> >> Thanks for your pointer! One of these days :-) >> >> Cheers >> Christian >> >>> >>> Regards, >>> Robson Paniago >>> >>> >>> >>> 2011/2/14 Christian Grobmeier <[email protected]> >>> >>>> Hello >>>> >>>> I have two forms in my app. One is behaving correct, one not. So I >>>> assume I did something bad, but I cannot find my failure - maybe one >>>> of you guys had a similar problem in the past. I am using 1.5 trunk >>>> version. >>>> >>>> In my apps init method i mounted some pages/packages: >>>> >>>> mountPackage("app", HomePage.class); >>>> mountPackage("app/feedback", FeedbackPage.class); >>>> mountPackage("app/login", LoginPage.class); >>>> mountPackage("app", TestPage.class); >>>> >>>> After the mount, LoginPage can be accessed at: >>>> http://localhost:8080/app/login/LoginPage?4 >>>> similar to all other pages. >>>> >>>> In my LoginPage is a a form included: LoginForm. On submit it sets >>>> "HelloPage.class" as response like this: >>>> >>>> if (session.signIn(getUsername(), getPassword())) { >>>> if (!continueToOriginalDestination()) { >>>> this.setResponsePage(TestPage.class); >>>> } >>>> } >>>> >>>> However, whenever I successfully sign on, I reach the TestPage BUT my >>>> links change to: >>>> >>>> http://localhost:8080/wicket/TestPage >>>> >>>> I should mention that these links are generated in a parent page, from >>>> which all my other pages extend. >>>> >>>> In my other form it works perfectly. It has the same package structure >>>> and looks pretty similar to login. It just sends an e-mail instead of >>>> setting a user object to the session. >>>> >>>> Any ideas why I could loos my mounting? >>>> >>>> My links are generated in the parents page like this: >>>> >>>> BookmarkablePageLink<ParentPage> home = new >>>> BookmarkablePageLink<ParentPage>("home", HomePage.class); >>>> add(home); >>>> >>>> >>>> Thanks in advance, >>>> Christian >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [email protected] >>>> For additional commands, e-mail: [email protected] >>>> >>>> >>> >> >> >> >> -- >> http://www.grobmeier.de >> > > > > -- > http://www.grobmeier.de > -- http://www.grobmeier.de --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
