You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Dan12321 <we...@centrum.cz> on 2012/08/21 19:43:07 UTC

redirectToInterceptPage and string

Hi,
is possible to redirect page like this:
redirectToInterceptPage("myPage.html") ?

I can do it: redirectToInterceptPage(new MyPage());
But I know only "myPage.html" and I do not know what Page class it is. So is
it any way how to use string and redirectToInterceptPage?

Thanks.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/redirectToInterceptPage-and-string-tp4651417.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: redirectToInterceptPage and string

Posted by Bertrand Guay-Paquet <be...@step.polymtl.ca>.
Hi,

I don't think there's a direct way to achieve what you want. However, 
you could instead find the page class mapping to the url and use that in 
the exception. I'm not too familiar with it, but have a look at 
Application#getRootRequestMapper() and its mapHandler method. You could 
perhaps use a MockWebRequest with your url to find out which 
IPageClassRequestHandler maps to your page.

Bertrand

On 21/08/2012 1:43 PM, Dan12321 wrote:
> Hi,
> is possible to redirect page like this:
> redirectToInterceptPage("myPage.html") ?
>
> I can do it: redirectToInterceptPage(new MyPage());
> But I know only "myPage.html" and I do not know what Page class it is. So is
> it any way how to use string and redirectToInterceptPage?
>
> Thanks.
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/redirectToInterceptPage-and-string-tp4651417.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org