[Users] How to get unrendered child nodes

Eric Lemoine eric.lemoine at camptocamp.com
Tue Dec 7 13:26:19 CET 2010


On Mon, Dec 6, 2010 at 10:04 PM, Alexandre Dube <adube at mapgears.com> wrote:
> Hi,
>
>   This is more a Ext question, but since I know this is a good resource
> place...
>
>   When a TreeNode hasn't been expanded yet, none if its child nodes are
> created so I don't have a way to know which one if 'checked' to check
> the parent accordingly (if all child nodes are checked).
>
>   How can I access the uncreated child nodes ?

Hi Alexandre

For a project of mine I had to do things like this:

    setSelectedNode: function() {
        this.root.cascade(function(n) {
            var expanded = n.isExpanded();
            if (!expanded) {
                n.expand();
            }
            if (n.id == this.selectedNodeId) {
                this.selectNode(n);
                n.ensureVisible();
                this.selectedNode = n;
                return false;
            } else if (!expanded) {
                n.collapse();
            }
        }, this);
    },

I'm not sure this can help you...

Good luck!


-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com


More information about the Users mailing list