Alternatively to using the Timer – as the time period you are interested in is quite long (1h) - you could just introduce a check on any client action, where you compare the time of last save call and the current time. Then you don't have the extra resources needed for the Timer-based solution. If you use an EventBus for communicating the UI and state changes, then the implementation would be very straightforward.
That said, in the application I'm working on, we use the Timer solution to automatically sing out the user, if there is no activity within 15 min. We did not mention any performance problems.
Am Donnerstag, 31. Januar 2013 14:01:04 UTC+1 schrieb membersound:
I would like to create a popup every hour that reminds the user to save his work (of course only if the work has not been saved for 1 h).
What is the right way to do this?
and on save: timer.cancel()?
Probably it works this way, but would this consume decent resources if there is always a timer running in background? Or doesn't this matter.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
To post to this group, send email to firstname.lastname@example.org.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Post a Comment