public/javascripts/yui/treeview/treeview.js
function(property, value) {
        var values = [];
        for (var i in this._nodes) {
            if (this._nodes.hasOwnProperty(i)) {
                var n = this._nodes[i];
                if ((property in n && n[property] == value) || (n.data && value == n.data[property])) {
                    values.push(n);
                }
            }
        }

        return (values.length) ? values : null;
    }
function(property, value) {
        var values = [];
        for (var i in this._nodes) {
            if (this._nodes.hasOwnProperty(i)) {
                var n = this._nodes[i];
                if ((property in n && n[property] == value) || (n.data && value == n.data[property])) {
                    values.push(n);
                }
            }
        }

        return (values.length) ? values : null;
    }
function ( property , value ) { var values = [ ] ; for ( var i in this . _nodes ) { if ( this . _nodes . hasOwnProperty ( i ) ) { var n = this . _nodes [ i ] ; if ( ( property in n && n [ property ] == value ) || ( n . data && value == n . data [ property ] ) ) { values . push ( n ) ; } } } return ( values . length ) ? values : null ; }
Returns a collection of nodes that have a matching property
and value in the data object that was passed into its constructor.
@method getNodesByProperty
@param {object} property the property to search (usually a string)
@param {object} value the value we want to find (usuall an int or string)
@return {Array} the matching collection of nodes, null if no match
Returns a collection of nodes that have a matching property and value in the data object that was passed into its constructor .