On 20.03.2009 18:10, Derrell Lipman wrote:
2009/3/20 A.Yerenkow <[email protected] <mailto:[email protected]>>

    Second question, can be TreeVirtual configured to have only one
    leaf opened at time?
    For example, I have
    /root
        /a
        /b
        /c

    If I open (expand)  /root/a - all others will collapse; /root/b,
    /root/c
    Is this configurable, or I need to write own listener? :)


That functionality is not available out of the box, but should be easy to implement with your own listener.

You could add it to "out-of-box", here is implementation.
And, of course I'm understand that inclusion of this code not guaranteed at all :)

        closeAllExceptNode: function(tree, node)
        {
            if(node.parentNodeId == 0)
                return;
            var arr = tree.getDataModel().getData();
            var parent = arr[node.parentNodeId];

            for(var i = 0; i < parent.children.length; i++)
            {
                if(parent.children[i] != node.nodeId)
                {
                    var child = arr[parent.children[i]];
                    if(child.bOpened)
                    {
                        child.bOpened = false;
                    }
                }
            }
            this.closeAllExceptNode(tree, parent);
        },



Derrell


------------------------------------------------------------------------

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to