You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by vinitty <vi...@gmail.com> on 2012/08/02 02:17:13 UTC

Redirecting from Ajax onSubmit

I am trying to do the redirection from AjaxSubmitLink onSubmit method 
using this 
RequestCycle.get().scheduleRequestHandlerAfterCurrent(reqTarget);

But i am not seeing redirection on browser

I am using wicket 1.5.7

Please help me 





--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirecting-from-Ajax-onSubmit-tp4650938.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: Redirecting from Ajax onSubmit

Posted by Martin Grigorov <mg...@apache.org>.
This should work.
It should generate Ajax response:
<ajax-response><redirect>the/url/here</redirect></ajax-response> and
wicket-ajax.js will make the redirect.

On Thu, Aug 2, 2012 at 3:17 AM, vinitty <vi...@gmail.com> wrote:
> I am trying to do the redirection from AjaxSubmitLink onSubmit method
> using this
> RequestCycle.get().scheduleRequestHandlerAfterCurrent(reqTarget);
>
> But i am not seeing redirection on browser
>
> I am using wicket 1.5.7
>
> Please help me
>
>
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirecting-from-Ajax-onSubmit-tp4650938.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
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Redirecting from Ajax onSubmit

Posted by Martin Grigorov <mg...@apache.org>.
On Thu, Aug 2, 2012 at 5:20 PM, Paul Bors <pa...@bors.ws> wrote:
> Can't you simply get away with calling setResponsePage()?

This is the same. setResponsePage() uses #scheduleRequestHandlerAfterCurrent().

>
> ~ Thank you,
>    Paul C Bors
>
> On Aug 1, 2012, at 20:17, vinitty <vi...@gmail.com> wrote:
>
>> I am trying to do the redirection from AjaxSubmitLink onSubmit method
>> using this
>> RequestCycle.get().scheduleRequestHandlerAfterCurrent(reqTarget);
>>
>> But i am not seeing redirection on browser
>>
>> I am using wicket 1.5.7
>>
>> Please help me
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirecting-from-Ajax-onSubmit-tp4650938.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
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Redirecting from Ajax onSubmit

Posted by vinitty <vi...@gmail.com>.
It was the problem with the Ajax.basurl , now its working fine 






--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirecting-from-Ajax-onSubmit-tp4650938p4650998.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: Redirecting from Ajax onSubmit

Posted by Martin Grigorov <mg...@apache.org>.
On Thu, Aug 2, 2012 at 10:12 PM, vinitty <vi...@gmail.com> wrote:
> So What should i do exactly in this case

check with Firebug/Dev tools what is the Ajax response

>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirecting-from-Ajax-onSubmit-tp4650938p4650971.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
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: Redirecting from Ajax onSubmit

Posted by vinitty <vi...@gmail.com>.
So What should i do exactly in this case



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirecting-from-Ajax-onSubmit-tp4650938p4650971.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: Redirecting from Ajax onSubmit

Posted by Paul Bors <pa...@bors.ws>.
Can't you simply get away with calling setResponsePage()?

~ Thank you,
   Paul C Bors

On Aug 1, 2012, at 20:17, vinitty <vi...@gmail.com> wrote:

> I am trying to do the redirection from AjaxSubmitLink onSubmit method 
> using this 
> RequestCycle.get().scheduleRequestHandlerAfterCurrent(reqTarget);
> 
> But i am not seeing redirection on browser
> 
> I am using wicket 1.5.7
> 
> Please help me 
> 
> 
> 
> 
> 
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Redirecting-from-Ajax-onSubmit-tp4650938.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