You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Wayne Pope <wa...@googlemail.com> on 2008/11/05 09:41:02 UTC
Using continueToOriginalDestination() in a constructor - will it mess up the PageMap?
Hi,
as part of my SWARM 1.4 integration I'm looking trying to get a silent login
functionality working, and have used continueToOriginalDestination() in
constructor of a Login page.
However I saw this thread:
http://www.nabble.com/redirect-page-in-the-constructor-td18111387.html#a18204061
So I have implemented:
if (!getPage().continueToOriginalDestination()) {
throw new
RestartResponseException(Application.get().getHomePage());
}
This works fine however am I messing up the PageMap?
Its not clear to me how the continueToOriginalDestination() works (looks
like just a boolean value). Is it Ok to do this? Or is there a way to get
the actual intercepted page class and throw a RestartResponseException?
Thanks
Wayne
Re: Using continueToOriginalDestination() in a constructor - will it mess up the PageMap?
Posted by Igor Vaynberg <ig...@gmail.com>.
continuetooriginaldestination remembers the url not the page, so it
redirects back to that url. the pagemap should be fine.
-igor
On Wed, Nov 5, 2008 at 12:41 AM, Wayne Pope
<wa...@googlemail.com> wrote:
> Hi,
>
> as part of my SWARM 1.4 integration I'm looking trying to get a silent login
> functionality working, and have used continueToOriginalDestination() in
> constructor of a Login page.
>
> However I saw this thread:
> http://www.nabble.com/redirect-page-in-the-constructor-td18111387.html#a18204061
>
>
> So I have implemented:
> if (!getPage().continueToOriginalDestination()) {
> throw new
> RestartResponseException(Application.get().getHomePage());
> }
>
> This works fine however am I messing up the PageMap?
> Its not clear to me how the continueToOriginalDestination() works (looks
> like just a boolean value). Is it Ok to do this? Or is there a way to get
> the actual intercepted page class and throw a RestartResponseException?
>
> Thanks
> Wayne
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org