If I were you I'd handle the recursive tree traversal on the server
and return a (pruned?) subtree as a response, instead of node-at-a-
time.  Not only does it simplify async callback management on the
client, it also uses the network a lot more efficiently.

Walden

On Nov 18, 11:26 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've got an application that offers some search capabilities. When you
> search something, you can click on a Button and this will lead you to
> open a Tree in the location where the item you searched is.
>
> I can make an asynchronous call to a service who gives me the child
> names of a given node, which I use to build the TreeItems.
>
> For opening the tree in the right location, I need to call that
> service n times, one for each level I need to go down into. But these
> calls needs to be in a sequence, as the 2nd call will accept as input
> the TreeItem I found in the 1st call and so on.
>
> My tree isn't loaded entirely in memory, but it's updated on-demand
> (using a TreeListener). This is why, when I click on a search result,
> I need to build the hierarchy in memory prior of calling
> ensureSelectedItemVisible().
>
> What's the right way to approach this?
>
> Thank you.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
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