Hi Matej, 

Thanks for the response. However storing state in the page might not be 
suitable in our case, and this state need to be shared by several pages, and 
storing it into session seems to be a better choice. 

Regards.
Robin

Matej Knopp <[EMAIL PROTECTED]> wrote: When user presses back button and clicks 
a ling to page, it will
affect the previous page version. Wicket takes care of this
automatically. Can you keep the state in page instead of keeping it in
session?

-Matej

On Jan 10, 2008 11:29 AM, Robin Shine  wrote:
> Hi,
>
> I am facing a situation where I need to rollback some state kept in session 
> when user hits the back button at browser side, and clicks some link which 
> triggers a server round trip. The usage scenario is as below:
> 1. User stays on page1, and the current state saved in session in state1
> 2. User clicks on a link in page1. At server side, the onclick() handler of 
> the link change session state to state2, and set current page to be page2 by 
> calling setResponsePage()
> 3. Now page2 is displayed at browser. User hits the back button to go back to 
> page1.
> 4. User continues to hit a link in page1 to do something. Of course at server 
> side, the session state will still be state2.
>
> Now I am looking for an approach to change the session state to the value 
> when page1 is first presented to user. I searched the mailing list archive 
> and found the entry 
> "http://www.nabble.com/Back-button-and-Database-rollback-to4124044.html#a4124044";
>  to be useful. However, as I am using wicket 1.3 which uses 
> SecondLevelCacheSessionStore, the "addStateChange" approach does not take 
> effect.
>
> So is there any other approaches for this problem?
>
> PS: Storing state in page instead of session solves the back-button problem, 
> however I can not store state into page as my application is composed of many 
> pages, and this state should be shared across these pages.
>
> Thanks.
> Robin
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to