I have the following code:

public class AlertEntryPoint implements EntryPoint {

        static class AlertTimer extends Timer {
                AlertEntryPoint entryPoint = null;
                public AlertTimer(AlertEntryPoint alertEntryPoint) {
                        entryPoint = alertEntryPoint;
                }

                @Override
                public void run() {
                                scheduleRepeating(1000 * 5 * 60);

                                entryPoint.refreshData(this);
                }

        }

        @Override
        public void onModuleLoad() {
                AlertEntryPoint.AlertTimer timer = new AlertTimer(this);
                timer.run();
        }

        void refreshData(final AlertTimer timer) {
                GwtAlertServicesDelegate.getService().getLocationNotMapped(
...

Unfortunately, the timer is reset because the onModuleLoad() is called
each time a page loads. I want the timer to be created once, when the
user logs into the application -- where else can I instantiate the
timer?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to