Re: How can we save state of a GWT page?

366 views
Skip to first unread message

Taylor Mathewson

unread,
Jul 29, 2012, 11:47:14 PM7/29/12
to google-we...@googlegroups.com
Hi Rubina,


GWT can store state in url using hashes, e.g. http://myserver.com/myapp#myplace:state, and this is bookmarkable.

Hope this helps,
Taylor

On Wednesday, July 25, 2012 8:14:20 AM UTC-4, Rubina wrote:

Hi All,

 

We have one requirement to implement in GWT application. Below example will clear the requirement –

 

There are 3 screens in application. Suppose, user is on 2nd screen after moving from 1st screen to 2nd screen. When user clicks on Next button on first screen, then some RPC call is executed and fetch data from some external database. This data is used to display on 2nd screen. Now user bookmarks the browser URL (2nd screen) and closes the browser window.

 

Next time, now user directly wants to navigate to the 2nd screen without repeating the work done on 1st screen. We want to store the state of 2nd screen somehow on browser. If this screen launches, all Next and Previous button should also work properly.

 

Is this requirement achievable, if yes then which GWT APIs provides this feature? Please advice.

Rubina Paul

unread,
Aug 3, 2012, 2:10:08 AM8/3/12
to google-we...@googlegroups.com
Hi Taylor,
 
Using hashes as tokens for managing history is already implemented in our application.But the requirement is once this application is closed on 2nd screen, then when user comes back to acess the app he should be directed to 2nd screen with values he selected when he left. It should not be like he has to again go through first screen.He should direct go to 2nd screen.Therefore, the last selected values(data) for that user should be saved so tat if he bookmark the url and come back again, he should see the same screen with selected values that he selected before.
Thanks,
Rubina

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/_QMfnGXFXDAJ.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Paul Stockley

unread,
Aug 3, 2012, 9:46:47 AM8/3/12
to google-we...@googlegroups.com
If we need to remember more information than can reasonably stored on the URL we use local storage. The data we need to remember is represented as javascript overlay types and we serialize these to/from json.
Reply all
Reply to author
Forward
0 new messages