I did say this for a reason:
setResponsePage(MyPage.class)
so don't do
setResponsePage(new MyPage())

because if you make an instance we have to really redirect to that instances.
And als we can do a bookmarkable redirect.
So yes there is a difference.


johan


On 3/15/06, David Leangen <[EMAIL PROTECTED]> wrote:

On Wed, 2006-03-15 at 10:34 +0100, Johan Compagner wrote:
> redirect again to a bookmarkable/mounted page:
>
> add(new Link("toEnglishLink")
>                {
>                    public void onClick()
>                    {
>                        getSession().setLocale( Locale.ENGLISH );
>                         setResponsePage(MyPage.class)
>                    }
>                });

Yeah, I did:

  setResponsePage( getPage() )

but it had the same effect. It took me to the link /app?
lotsOfFunkyParameterStuff, rather than /my/mounted/path.

Is there a difference between using getPage() and MyPage.class? I
wouldn't think so...

In any case, the above is available to all my pages in a superclass. It
would be a bit cumbersome to have to use the static class parameter in
each page...


Is there a nicer way, perhaps?


Thanks!




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to