Is there anyway to don't go to a place until a rpc is done?

2011-09-27 Thread nacho
For example, let's say that I have this dummy menu [ *Goto Activity Foo* | *Goto Activity Bar* ] When I click on [ *Goto Activity Foo* ] I go to the the Foo Activity, and in the start() method I call to a rpc, let's say dummyService.fetchData(). And, then I click on the [ *Goto Acitivity Bar*

Re: Is there anyway to don't go to a place until a rpc is done?

2011-09-27 Thread Jens
Why would you want to wait? Seems like the user isn't interessted anymore in Activity/Place Foo. If you force the user to wait, your app may feel unresponsive and slow. But if your really want to, just disable the menu while the activity loads the data and re-enable it when the data is loaded.

Re: Is there anyway to don't go to a place until a rpc is done?

2011-09-27 Thread nacho
For example, let's say I have a menu option List Users, and I have a button in the List Users view that removes a User. Then a user of my app clicks in the Delete User button, and inmediately clicks in List Users option in the menu. This RPC goes to the server before that the deleteUser RPC is

Re: Is there anyway to don't go to a place until a rpc is done?

2011-09-27 Thread Thomas Broyer
This is what the mayStop() method of Activity is for. As Jens said, you can also somehow disable navigation until your app is in a state that allows it (but beware that if the user refreshes the page, the app won't have any way to know that a previous call was issued → implement mayStop anyway,

Re: Is there anyway to don't go to a place until a rpc is done?

2011-09-27 Thread Jens
Also keep in mind that the user can simply hit the back/forward button of the browser to switch places. In that case it would not really help to disable the view/navigation or using a PopupPanel with active glass panel because the user can still navigate using the browsers buttons. You would