Barry
Barry

Reputation: 1665

GWT-One RPC after another

How do i make sure that i can make an RPC call only after i finish the first RPC call?Also how do i make sure that i can refresh my view only after i finish an RPC call.

I know i can do it in the OnSuccess method,but apart from that is there something which i can work with?

I have made significant research on this and also saw that i can use a Timer,but i feel its a heavyweight on client side.

Can i use Scheduler.scheduleDeferred to defer my second rpc call ??

Thanks

Upvotes: 0

Views: 164

Answers (1)

Yaroslav
Yaroslav

Reputation: 2736

Basically you would have 2 RPC callbacks. First RPC callback onSuccess would issue the second RPC call. Second RPC callback onSuccess is a place where you should 'refresh' your page.

Using timers is definitely not a good practice for this task.

Upvotes: 1

Related Questions