Warn the user that his action will log him out, or whatever. Like
this, using a WindowClosingHandler:
Window.addWindowClosingHandler(new Window.ClosingHandler(){
@Override
public void onWindowClosing(ClosingEvent event) {
event.setMessage(If you leave or refresh this page, +
Thanks for a clear desc. What I'd like to say is that the refresh-save is
not a new scenario at all for web apps. Actually I have heavily used the
history tokens for back/forward/reloading following the sample code of GWT
ShowCase. But saving states is a subtle thing for a stateful app. Accord to
You could look into the Html5' s local storage mechanism for saving your
application's state before a reload happens.
You can also decide what part of the state you want to save, thus reloading
gracefully the most important parts of your application and letting the user
do the needed actions to
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
Thanks, everybody. I have to do that way probably later.
Mike J.
On Tue, Jun 1, 2010 at 10:03 AM, Ranjan ranjan.n...@gmail.com wrote:
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
Everyone is of course correct about not trying to circumvent reload/
refresh, and using history tokens to track the current document and
any state. If your app displays one or a few documents like emails,
and has an easily enumerable set of display configurations, this works
great.
Just wanted
Don't get it. Please show your good design in an understandable style.
On Fri, May 28, 2010 at 4:49 PM, federico federico.mona...@gmail.comwrote:
bad design.
refresh is a feature and you should provide bokmarkable refresh-save
pages.
On 28 Mag, 20:42, Mike J mikej1...@gmail.com wrote:
It is not possible to avoid refresh(reload) through scripts. The only
possible thing is you could display an alert message through the
browser which provides the User with option to either stay on the page
or leave it. Which is what is done in the CloseHandler in your example
script.
What
Hi,
I ran into a problem about clicking the reload button on a web
browser.
My app is a stateful GWT app. Users need to be authenticated for
login. After login they can surf on various pages. But users sometimes
were used to press the reload button on the browser to refresh the
page.
bad design.
refresh is a feature and you should provide bokmarkable refresh-save
pages.
On 28 Mag, 20:42, Mike J mikej1...@gmail.com wrote:
Hi,
I ran into a problem about clicking the reload button on a web
browser.
My app is a stateful GWT app. Users need to be authenticated for
10 matches
Mail list logo