Ian,
That is not an option for me, creating such API is not a good idea
from application maintenance as well as architect point of view.
Lothar,
Your suggestion sounds good and i can use it where i need to update
the UI, but what about if condition
if(IsUserloggedIn())
{
callApi1()
callApi2()
}
else
{
callApi4()
callApi3()
}
Writing then code in Success of asyncallback and then calling the
other function will be a good long chain of calls and asyncallbacks.
Do you see any problem in having synchronous calls.? except that it
may hang the UI for a second and that is acceptable.
On Mar 10, 4:13 pm, Lothar Kimmeringer <[email protected]> wrote:
> ping2ravi schrieb:
>
> > 1) Check if user is logged in
> > 2) Get Some data List list1 e.g. getUserAddresses
> > 3) Get some data List list2 e.g. getUserFriends
> > 4) Get Some data List List3 e.g. getUserCommunities
> > 5) now create the UI based on above data retrieved. Now as all GWT RPC
> > calls are asynchronous, so at the step 5 i am not sure whether all
> > the calls(1,2,3,4) have completed by the time i reached at step 5, and
> > there is no Thread object in GWT so i can not wait or join till all
> > call completes.
> > And writing such code can be pain.(e.g. writing a Asyncallback for
> > step 1 then if it success then call step 2 and write asyncallback 2
> > and in its successs function call step 3 and so on)
>
> Do the UI-update in a method called updateUI where you check if all
> necessary data (e.g. above lists) are present and call this method
> in every onSuccess-method of the different AsyncCallback-classes.
>
> Regards, Lothar
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---