getNodeInfo is called for every item, irrespective of which level it is in.
Below code is what i am doing in getNodeInfo.
based on TreeItemType, i make a new nodeinfo. i know nothing about which
level etc. it is in, only the type of the item.

In your case u will have 2 ifs one for FOlder and one for File. For File,
there will be "static" data provider. isLeaf will return true for File.
In case of Folder u will most probably make a AsyncDataProvider and
onSuccess call updateRows(....).
This folder-dataprovider will retrieve Folders and Files and again call
getNodeInfo on each.

I really dont see the issue with different object types at the same level.
If u want a working example, i can help you build one. Hope i understood
your issue correctly.


            NavTreeItem nti=(NavTreeItem)value;//this is the value passed to
getNodeInfo.
            if(nti.getType()==TreeItemType.RECORD_SET){//get the type of
item.

                .....//build the data provider,cell, keyprovidr,
valueupdater.
........

                return new DefaultNodeInfo<NavTreeItem>(recSetDataProvider,
recSetCell,multiSelectModel,null);

            }else if(nti.getType()==TreeItemType.CHILD_ITEM1){
                ....//build a different dataprovider, a different cell, etc.
....
                NodeInfo<NavTreeItem>childItem1NodeInfo= new
DefaultNodeInfo<NavTreeItem>(conceptDataProvider,
conceptCell,multiSelectModel,null);

                return childItem1NodeInfo;

            }else if(nti.getType()==TreeItemType.CHILD_ITEM_WITH_BAR){
                ....//build the 3rd type of data.
.....
                return new DefaultNodeInfo<NavTreeItem>(conceptDataProvider,
cc,multiSelectModel,null);
            }

On Sat, Dec 4, 2010 at 2:07 PM, metalhammer29a <metalhammer...@gmail.com>wrote:

> >>see the code for this example. What you describe is implemented in the
> >>example below, with 3 levels, (ie 3 different objects).
>
> yes, they are 3 different objects, in 3 levels,
> but at any given level, there is only ONE type.
>
> Composer Node, contains ONLY PlayList.
> PlayList Node contains ONLY Songs.
>
> the case I described, is another use case.
>
> Folder can contain FOLDERS AND FILES
>
> my question is about different types existing in a level.
>
> --
> 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-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to