Hi Kornel
Thanks for the pointer,
however  not sure I follow. you cant check or uncheck a node that is not
rendered, right?
so i would imagine this cant happen...
Cheers


Andrea



On Thu, Jul 9, 2009 at 12:45 PM, Kornel Csaszar <[email protected]> wrote:

> Andrea,
> It's good to be careful with getting info back from widgets like that. If
> the widget
> is not yet rendered you will get a very nasty general error (yellow
> triangle).
>
> If you need that info and you are not certain the component
> will have been rendered by that time, it's often best to keep collections
> of
> objects on your own of the tree node references.
>
> -kornel
>
>
> On Mon, Jul 6, 2009 at 10:30 AM, Roundcrisis <[email protected]>wrote:
>
>> Yeah that does work thanks :D
>> Andrea
>>
>>
>>
>>
>> On Mon, Jul 6, 2009 at 12:57 PM, Patrizio De Michele <[email protected]
>> > wrote:
>>
>>> hi,
>>> maybe you can use this code, try it and make me know:
>>>
>>> final List<Node> checkedNodes = new ArrayList<Node>();
>>> final List<Node> allNodes = new ArrayList<Node>();
>>>         treePanel.getRootNode().cascade(new NodeTraversalCallback() {
>>>             public boolean execute(Node node) {
>>>                 if (Boolean.valueOf(node.getAttribute("checked"))) {
>>>                     checkedNodes.add(node);
>>>                 }
>>>                 allNodes.add(node);
>>>                 return true;
>>>             }
>>>         });
>>>
>>> bye Patrizio
>>>
>>>
>>> 2009/7/6 Andrea <[email protected]>
>>>
>>>
>>>> Hi there
>>>>
>>>> I m using a TreePanel that can be checked; and was wondering what is
>>>> the best way to get info back from the tree: ie all nodes whether they
>>>> are checked or not , and I would like to know if they are.
>>>>
>>>> I know i can use treePanel.getChecked()  but that only gets me the
>>>> checked ones
>>>> or I can use  root.getChildNodes() but here I m not terribly sure how
>>>> to know if its checked or not, it also seems quite cumbersome to
>>>> navigate the tree structure this way
>>>>
>>>> any other alternatives? or recomended way to deal with trees in
>>>> general?
>>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" 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/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to