user562350
user562350

Reputation:

i need to fire a function in gwt right after module is being loaded

i need to fire a function right after module is being loaded , as in right after onModuleLoad() execute what should i use to implement this thing , Timer or scheduleDeferred or anything else ?

something like
 
Scheduler.get().scheduleDeferred(new ScheduledCommand() {

            @Override
            public void execute() {
                Window.alert("bon jour! amis.");

            }
        });
     
or 
...
...

timer.schedule(2000);

or
??

Upvotes: 2

Views: 2714

Answers (2)

Valdis R
Valdis R

Reputation: 2115

Use Scheduler.scheduleEntry in your EntryPoint implementation. I do this now to inject additional (non-GWT handled) stylesheets, and I need to ensure this happens after the view renders.

Upvotes: 2

z00bs
z00bs

Reputation: 7498

Finding out when a GWT module has loaded might be helpful.

Upvotes: 3

Related Questions