You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by nerdek <ne...@gmail.com> on 2013/11/26 15:52:06 UTC

Back button behaviour

Hi, 
I am trying to implement some kind of 'back button behaviour' but connected
to f.e submit button.

Example: first page with editor, a and second with form. When I submit the
second page it should return to editor TO SAME PLACE as it was before (f.e
edit button or sth)

Is something in wicket that is already implemented for it ? I tried JQuery
but sometimes it doesn't work, and I think there are simplier solutions.

Thanks in advance





--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Back-button-behaviour-tp4662679.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: Back button behaviour

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

I am not sure that I understand you correctly but I think you can use
PageReference for this.
When moving from first page to the second page pass page.getPageReference()
to the second.
When the form in the second is submitted just do:
setResponsePage(pageReference.getPage())

This will return you to the first page exactly where you left it, i.e. same
state.


On Tue, Nov 26, 2013 at 4:52 PM, nerdek <ne...@gmail.com> wrote:

> Hi,
> I am trying to implement some kind of 'back button behaviour' but connected
> to f.e submit button.
>
> Example: first page with editor, a and second with form. When I submit the
> second page it should return to editor TO SAME PLACE as it was before (f.e
> edit button or sth)
>
> Is something in wicket that is already implemented for it ? I tried JQuery
> but sometimes it doesn't work, and I think there are simplier solutions.
>
> Thanks in advance
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Back-button-behaviour-tp4662679.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
>
>