Simply put, it is impossible to avoid Page reload if the User clicks
the 'Refresh' button on the browser. There is no way to avoid it if
the user wants to refresh the page.
And yes, when the page is refreshed, every object contained within the
Page is lost. So you will have to create the whole page from the
scratch.
Now the problem you are facing (as I have understood) is, as the user
works on your application, a number of widgets are created, removed,
moved from one place to another, so on. And if at any point, the user
Refreshes the page, your page would start up with the initial
condition.
This is normally solved by using history tokens. Now when I say saving
a state, I meant saving it in a small piece of string, that would be a
part of the URL (Something like #page/10caf10b or #navigation/91abc,
etc). Now this small bits of information are usually sufficient for
loading the entire page. It might make few ajax calls with the server.
Sessions are used in cases like this.
And believe me a very complex applications could be developed using
just small bits of tokens that can easily be accommodated in the URL
itself. Take GMail for example. You can just browse through different
states of the Gmail application, and if you press refresh button at
any state, you will get the same page when it refreshes.
I hope you got my point.
Page reloading is something that is done by the User and it can't be
avoided. Its up to the programmer that the user receives the same
interface even if he/she refreshes the page at any state of the
application.
> > > >
google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsubs
cr...@googlegroups.com><google-web-toolkit%2Bunsubs