Reputation: 161
We need to detect the Refresh event (f5) / reload of the web application. Is there an event in GWT that can detect this?
thanks, mj
Upvotes: 7
Views: 3198
Reputation: 62145
Add a Window Closing Handler:
HandlerRegistration registration = Window.addClosingHandler(new ClosingHandler() {
void onWindowClosing(ClosingEvent event) {
// call the server, or whatever
}
});
EDIT
The HandlerRegistration
is used to deregister the Handler
if you don't need it anymore.
Upvotes: 8