It depends what "go back" should mean in your case.
Does it mean: go to a previous state of the whole page or remove the
just added record from the current page's state ?

Wicket doesn't create a new page version (i.e. state) for Ajax
requests so the only option is to remove the new record from the
current page version.
With the workaround at http://markmail.org/message/mslvhwpo7iep42dq
you can try to encode all needed info in the url hash and later when
notified by the browser that the user wants to go back you should use
the hash value to decide how to revert it.
That's why I'm saying this is highly dependent on your use case.

On Thu, Oct 4, 2012 at 1:31 PM, vidhi <vidhi6...@gmail.com> wrote:
> Thanks Martin. I get the root of the problem now. By the way, can you
> suggest some fix or workaround to make such an App (which uses ajax
> components) support Backbutton?
>
> On Thu, Oct 4, 2012 at 3:34 PM, Martin Grigorov-4 [via Apache Wicket] <
> ml-node+s1842946n465266...@n4.nabble.com> wrote:
>
>> That explains the behavior.
>> Wicket doesn't support out of the box back button for Ajax
>> interactions. Back button support works only for non-Ajax, i.e. full
>> page repaints.
>>
>> There are partial solutions which work for specific usecases.
>> Read http://markmail.org/message/mslvhwpo7iep42dq for a description
>> how I did it in once.
>>
>> On Thu, Oct 4, 2012 at 12:48 PM, vidhi <[hidden 
>> email]<http://user/SendEmail.jtp?type=node&node=4652665&i=0>>
>> wrote:
>>
>> > I have used AjaxSubmitLink instead of Ajax Button. Here is a snippet -
>> >
>> >  AjaxSubmitLink addLink = new AjaxSubmitLink("addLink", form) {
>> >    @Override
>> >    public void onSubmit(AjaxRequestTarget target, Form form) {
>> >    Contact c=new Contact("X",new Date(),"description X");
>> >    listView.getModelObject().add(c);
>> >      if (target != null)
>> >        target.add(table);
>> >    }
>> >  };
>> >
>> > On Thu, Oct 4, 2012 at 3:14 PM, Martin Grigorov-4 [via Apache Wicket] <
>> > [hidden email] <http://user/SendEmail.jtp?type=node&node=4652665&i=1>>
>> wrote:
>> >
>> >> On Thu, Oct 4, 2012 at 12:38 PM, vidhi <[hidden email]<
>> http://user/SendEmail.jtp?type=node&node=4652663&i=0>>
>> >> wrote:
>> >> > I verified both the points. The number exists in the URL but does not
>> >> change
>> >> > after I add a new row to table. When i click on Back Button, the
>> whole
>> >> > application is lost and same thing happens even after cleaning the
>> cache
>> >> and
>> >> > all local storage in browser
>> >> >
>> >>
>> >> Do you add the new record with Ajax button/link ?
>> >>
>> >> >
>> >> >
>> >> > --
>> >> > View this message in context:
>> >>
>> http://apache-wicket.1842946.n4.nabble.com/BackButton-support-Browser-Compatibility-issue-tp4652629p4652662.html
>> >>
>> >> > Sent from the Users forum mailing list archive at Nabble.com.
>> >> >
>> >> > ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: [hidden email]<
>> http://user/SendEmail.jtp?type=node&node=4652663&i=1>
>> >> > For additional commands, e-mail: [hidden email]<
>> http://user/SendEmail.jtp?type=node&node=4652663&i=2>
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Martin Grigorov
>> >> jWeekend
>> >> Training, Consulting, Development
>> >> http://jWeekend.com
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [hidden email]<
>> http://user/SendEmail.jtp?type=node&node=4652663&i=3>
>> >> For additional commands, e-mail: [hidden email]<
>> http://user/SendEmail.jtp?type=node&node=4652663&i=4>
>> >>
>> >>
>> >>
>> >> ------------------------------
>> >>  If you reply to this email, your message will be added to the
>> discussion
>> >> below:
>> >>
>> >>
>> http://apache-wicket.1842946.n4.nabble.com/BackButton-support-Browser-Compatibility-issue-tp4652629p4652663.html
>> >>  To unsubscribe from BackButton support Browser Compatibility issue,
>> click
>> >> here<
>>
>> >> .
>> >> NAML<
>> http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>> >>
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/BackButton-support-Browser-Compatibility-issue-tp4652629p4652664.html
>>
>> > Sent from the Users forum mailing list archive at Nabble.com.
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [hidden 
>> > email]<http://user/SendEmail.jtp?type=node&node=4652665&i=2>
>> > For additional commands, e-mail: [hidden 
>> > email]<http://user/SendEmail.jtp?type=node&node=4652665&i=3>
>> >
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden 
>> email]<http://user/SendEmail.jtp?type=node&node=4652665&i=4>
>> For additional commands, e-mail: [hidden 
>> email]<http://user/SendEmail.jtp?type=node&node=4652665&i=5>
>>
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://apache-wicket.1842946.n4.nabble.com/BackButton-support-Browser-Compatibility-issue-tp4652629p4652665.html
>>  To unsubscribe from BackButton support Browser Compatibility issue, click
>> here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4652629&code=dmlkaGk2ODkxQGdtYWlsLmNvbXw0NjUyNjI5fDk0Njc1MDUyNw==>
>> .
>> NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/BackButton-support-Browser-Compatibility-issue-tp4652629p4652666.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



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

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

Reply via email to