public/javascripts/yui/treeview/treeview.js
function(property, value) {
        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])) {
                    return n;
                }
            }
        }

        return null;
    }
function(property, value) {
        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])) {
                    return n;
                }
            }
        }

        return null;
    }
function ( property , value ) { 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 ] ) ) { return n ; } } } return null ; }
Returns a node that has a matching property and value in the data
object that was passed into its constructor.
@method getNodeByProperty
@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 {Node} the matching node, null if no match
Returns a node that has a matching property and value in the data object that was passed into its constructor .