[Users] How can I add more levels of nodes ?
Andreas Hocevar
ahocevar at opengeo.org
Fri Oct 22 09:39:44 CEST 2010
Hi,
On Oct 21, 2010, at 22:13 , Alexandre Dube wrote:
> In a TreePanel I'm currently working on, I have LayerContainer nodes
> directly added to the root node of the tree and I use a filter to group
> them. It's working quite well.
>
> Now, I'd like to add more level of nodes and I figured I could use
> standard TreeNodes as the firsts containers and the last one should be a
> LayerContainer with the filter, but it's not working as I thought it
> would. The first node never opens. Even though I can see that the node
> has childNodes, it stays at the "loading" state (and I see a spinning
> icone next to the node and nothing happens)...
>
> The idea is that each layer has a 'group' defining the groups
> seperated by "/", so a "one/two" group value would create 2 nodes, the
> first being a standard one and the last a LayerContainer node with the
> according filter.
>
> Here's a live demo of my issue, look for the last node named "one" :
> http://goloc-dev1.mapgears.com/geoext/ux-layertreebuilder2/geoext/examples/tree-builder.html
>
> Here's where I create the node, line 142 :
> http://goloc-dev1.mapgears.com/geoext/ux-layertreebuilder2/geoext/examples/LayerTreeBuilder.js
>
> Does anyone have any idea of what I'm doing wrong ?
Check for two things:
* Is the node in question an AsyncTreeNode? If so, you have to configure it with the correct loader (remember: applyLoader is set to false on the root)
* If you don't want the node to be an AsyncTreeNode, configure it with the appropriate node type (e.g. nodeType: "node").
Regards,
Andreas.
>
> Thanks,
>
> --
> Alexandre Dubé
> Mapgears
> www.mapgears.com
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list