2
votes

I am quite new to GWT. One question I have got recently is about reloading a webpage.

Say my web app have two pages A and B. Page A is a login page. After login, the user will be taken to page B. If the user pressed reload button on page B, the whole web app is restarted (onModuleLoad of the EntryPoint will be called again). Although I use History to keep the browser on page B, all the objects that hold states are re-created hence page B will fail load (e.g. user login information etc).

I am sure this is a very common problem for GWT developers. Can someone let me know:

1. How to keep some of the objects in GWT while reloading page? 
2. Is there anyway to just reload a page rather than the whole web app?

Many thanks

1

1 Answers

1
votes

Try https://developers.google.com/web-toolkit/doc/latest/DevGuideMvpActivitiesAndPlaces. In case you really need to store something you might use Cookies, HTML5 storage, or use some server-side storage which you access via RPC.