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, " +
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
Thanks, everybody. I have to do that way probably later.
Mike J.
On Tue, Jun 1, 2010 at 10:03 AM, Ranjan 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 refresh the page.
>
>
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 pag
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 rea
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
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 federico
Don't get it. Please show your good design in an understandable style.
On Fri, May 28, 2010 at 4:49 PM, federico wrote:
> bad design.
> "refresh" is a feature and you should provide bokmarkable refresh-save
> pages.
>
> On 28 Mag, 20:42, Mike J wrote:
> > Hi,
> >I ran into a problem about
bad design.
"refresh" is a feature and you should provide bokmarkable refresh-save
pages.
On 28 Mag, 20:42, Mike J 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
> login. After l
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.
10 matches
Mail list logo