You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by PSkarthic <ka...@touchpointindia.com> on 2009/01/06 10:15:46 UTC

HOW TO REDIRECT

Hi everybody
      I have a problem in redirecting to a class(webpage)

My Scenario is 
    A login page  when user is clicks the login button it will go to
authentication page form there (automatically)if he is a valid user he must
be directed to success page or to a failure page. How to do this 

I used setResponsepage(somepage)


Thanks in advance
Karthic
-- 
View this message in context: http://www.nabble.com/HOW-TO-REDIRECT-tp21307007p21307007.html
Sent from the Wicket - User 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: HOW TO REDIRECT

Posted by Jeremy Thomerson <je...@wickettraining.com>.
throw a RestartResponseAtInterceptPageException

On Tue, Jan 6, 2009 at 4:13 AM, PSkarthic <ka...@touchpointindia.com>wrote:

>
> The doubt raised because of the word exception in that command.
>
>  Once again Thank you very much for your support.
>
>
> Karthic.
> --
> View this message in context:
> http://www.nabble.com/HOW-TO-REDIRECT-tp21307007p21307822.html
> Sent from the Wicket - User 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
>
>


-- 
Jeremy Thomerson
http://www.wickettraining.com

Re: HOW TO REDIRECT

Posted by PSkarthic <ka...@touchpointindia.com>.
The doubt raised because of the word exception in that command.

 Once again Thank you very much for your support.


Karthic.
-- 
View this message in context: http://www.nabble.com/HOW-TO-REDIRECT-tp21307007p21307822.html
Sent from the Wicket - User 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: HOW TO REDIRECT

Posted by Dipu <di...@googlemail.com>.
it depends on your usecase, if you want to redirect conditionally
that's the way to do it ( as far as i know )

dipu

On Tue, Jan 6, 2009 at 9:58 AM, PSkarthic <ka...@touchpointindia.com> wrote:
>
> Thanks very much for ur help, its working, but is that a properway to divert
> to success or failure page depending on conditions or is there any thing
> like sendRedirect.......
>
>
> Thanks
> karthic
> --
> View this message in context: http://www.nabble.com/HOW-TO-REDIRECT-tp21307007p21307624.html
> Sent from the Wicket - User 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


Re: HOW TO REDIRECT

Posted by PSkarthic <ka...@touchpointindia.com>.
Thanks very much for ur help, its working, but is that a properway to divert
to success or failure page depending on conditions or is there any thing
like sendRedirect.......


Thanks 
karthic
-- 
View this message in context: http://www.nabble.com/HOW-TO-REDIRECT-tp21307007p21307624.html
Sent from the Wicket - User 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: HOW TO REDIRECT

Posted by Dipu <di...@googlemail.com>.
throw new RestartResponseException(new SuccessPage());

Cheers
Dipu

On Tue, Jan 6, 2009 at 9:37 AM, PSkarthic <ka...@touchpointindia.com> wrote:
>
> Thanks for your reply
> redirectToInterceptPage is not working
> After login button is clicked the control is passed to verify page in that i
> have code like this
>
> if(user.equals("admin") || user.equals("karthic")){
>
>
>                                //setRedirect(true);
>
>                                //setResponsePage(new Test());
>                               //onsuccessful login
>                                redirectToInterceptPage(new SuccessPage());
> }
>
>
> in that success page i include only a label(for testing purpose).
> How to solve it
>
>
> Thanks
> Karthic
>
>
>
> --
> View this message in context: http://www.nabble.com/HOW-TO-REDIRECT-tp21307007p21307286.html
> Sent from the Wicket - User 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


Re: HOW TO REDIRECT

Posted by PSkarthic <ka...@touchpointindia.com>.
Thanks for your reply
redirectToInterceptPage is not working
After login button is clicked the control is passed to verify page in that i
have code like this 

if(user.equals("admin") || user.equals("karthic")){


				//setRedirect(true);
				
				//setResponsePage(new Test());
                               //onsuccessful login
				redirectToInterceptPage(new SuccessPage());
}


in that success page i include only a label(for testing purpose).
How to solve it


Thanks
Karthic



-- 
View this message in context: http://www.nabble.com/HOW-TO-REDIRECT-tp21307007p21307286.html
Sent from the Wicket - User 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: HOW TO REDIRECT

Posted by Piller Sébastien <pi...@hmcrecord.ch>.
Hi,

try using redirectToInterceptPage and continueToOriginalDestination 
instead ( 
http://wicket.apache.org/docs/wicket-1.3.2/wicket/apidocs/org/apache/wicket/IPageMap.html 
)

PSkarthic a écrit :
> Hi everybody
>       I have a problem in redirecting to a class(webpage)
>
> My Scenario is 
>     A login page  when user is clicks the login button it will go to
> authentication page form there (automatically)if he is a valid user he must
> be directed to success page or to a failure page. How to do this 
>
> I used setResponsepage(somepage)
>
>
> Thanks in advance
> Karthic
>   


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