ext.tree.treeloader.html.svn-base

来自「PHP 知识管理系统(基于树结构的知识管理系统), 英文原版的PHP源码。」· SVN-BASE 代码 · 共 549 行 · 第 1/3 页

SVN-BASE
549
字号
        <div class="body-wrap">        <div class="top-tools">            <a class="inner-link" href="#Ext.tree.TreeLoader-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>            <a class="inner-link" href="#Ext.tree.TreeLoader-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>            <a class="inner-link" href="#Ext.tree.TreeLoader-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>                            <a class="inner-link" href="#Ext.tree.TreeLoader-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>                        <a class="bookmark" href="../docs/?class=Ext.tree.TreeLoader"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>        </div>                <div class="inheritance res-block"><pre class="res-block-inner"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a>  <img src="resources/elbow-end.gif"/>TreeLoader</pre></div>                <h1>Class Ext.tree.TreeLoader</h1>        <table cellspacing="0">            <tr><td class="label">Package:</td><td class="hd-info">Ext.tree</td></tr>            <tr><td class="label">Defined In:</td><td class="hd-info">TreeLoader.js</td></tr>            <tr><td class="label">Class:</td><td class="hd-info">TreeLoader</td></tr>                                    <tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.util.Observable" ext:member="" href="output/Ext.util.Observable.html">Observable</a></td></tr>                    </table>        <div class="description">            A TreeLoader provides for lazy loading of an <a ext:cls="Ext.tree.TreeNode" href="output/Ext.tree.TreeNode.html">Ext.tree.TreeNode</a>'s childnodes from a specified URL. The response must be a JavaScript Array definitionwhose elements are node definition objects. eg:<pre><code>[{        id: 1,        text: <em>'A leaf Node'</em>,        leaf: true    },{        id: 2,        text: <em>'A folder Node'</em>,        children: [{            id: 3,            text: <em>'A child Node'</em>,            leaf: true        }]   }]</code></pre><br><br>A server request is sent, and child nodes are loaded only when a node is expanded.The loading node's id is passed to the server under the parameter name "node" toenable the server to produce the correct child nodes.<br><br>To pass extra parameters, an event handler may be attached to the "beforeload"event, and the parameters specified in the TreeLoader's baseParams property:<pre><code>myTreeLoader.on(<em>"beforeload"</em>, <b>function</b>(treeLoader, node) {        <b>this</b>.baseParams.category = node.attributes.category;    }, <b>this</b>);</code></pre><This would pass an HTTP parameter called "category" to the server containingthe value of the Node's "category" attribute.        </div>                <div class="hr"></div>                <a id="Ext.tree.TreeLoader-configs"></a>        <h2>Config Options</h2>        <table cellspacing="0" class="member-table">            <tr>                <th class="sig-header" colspan="2">Config Options</th>                <th class="msource-header">Defined By</th>            </tr>                <tr class="config-row expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.tree.TreeLoader-baseAttrs"></a>
            <b>baseAttrs</b> : Object            <div class="mdesc">
                        <div class="short">(optional) An object containing attributes to be added to all nodes created by this loader. If the attributes sent by...</div>
            <div class="long">
                (optional) An object containing attributes to be added to all nodes created by this loader. If the attributes sent by the server have an attribute in this object, they take priority.            </div>
                        </div>
        </td>
        <td class="msource">TreeLoader</td>
    </tr>
        <tr class="config-row alt">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.tree.TreeLoader-baseParams"></a>
            <b>baseParams</b> : Object            <div class="mdesc">
                            (optional) An object containing properties which specify HTTP parameters to be passed to each request for child nodes.                        </div>
        </td>
        <td class="msource">TreeLoader</td>
    </tr>
        <tr class="config-row">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.tree.TreeLoader-clearOnLoad"></a>
            <b>clearOnLoad</b> : Boolean            <div class="mdesc">
                            (optional) Default to true. Remove previously existing child nodes before loading.                        </div>
        </td>
        <td class="msource">TreeLoader</td>
    </tr>
        <tr class="config-row alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.tree.TreeLoader-dataUrl"></a>
            <b>dataUrl</b> : String            <div class="mdesc">
                        <div class="short">The URL from which to request a Json string which specifies an array of node definition objects representing the chil...</div>
            <div class="long">
                The URL from which to request a Json string which specifies an array of node definition objects representing the child nodes to be loaded.            </div>
                        </div>
        </td>
        <td class="msource">TreeLoader</td>
    </tr>
        <tr class="config-row inherited expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.tree.TreeLoader-listeners"></a>
            <b>listeners</b> : Object            <div class="mdesc">
                        <div class="short">A config object containing one or more event handlers to be added to this object during initialization. This should b...</div>
            <div class="long">
                A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the <a ext:cls="Ext.util.Observable" ext:member="addListener" href="output/Ext.util.Observable.html#addListener">addListener</a> example for attaching multiple handlers at once.            </div>
                        </div>
        </td>
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#listeners" href="output/Ext.util.Observable.html#listeners">Observable</a></td>
    </tr>
        <tr class="config-row alt">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.tree.TreeLoader-preloadChildren"></a>
            <b>preloadChildren</b> : Boolean            <div class="mdesc">
                            If set to true, the loader recursively loads "children" attributes when doing the first load on nodes.                        </div>
        </td>
        <td class="msource">TreeLoader</td>
    </tr>
        <tr class="config-row">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.tree.TreeLoader-requestMethod"></a>
            <b>requestMethod</b> : String            <div class="mdesc">
                            The HTTP request method for loading data (defaults to the value of <a ext:cls="Ext.Ajax" ext:member="method" href="output/Ext.Ajax.html#method">Ext.Ajax.method</a>).                        </div>
        </td>
        <td class="msource">TreeLoader</td>
    </tr>
        <tr class="config-row alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.tree.TreeLoader-uiProviders"></a>
            <b>uiProviders</b> : Object            <div class="mdesc">
                        <div class="short">(optional) An object containing properties which specify custom Ext.tree.TreeNodeUI implementations. If the optional ...</div>
            <div class="long">
                (optional) An object containing properties which specify custom <a ext:cls="Ext.tree.TreeNodeUI" href="output/Ext.tree.TreeNodeUI.html">Ext.tree.TreeNodeUI</a> implementations. If the optional <i>uiProvider</i> attribute of a returned child node is a string rather than a reference to a TreeNodeUI implementation, then that string value is used as a property name in the uiProviders object.            </div>
                        </div>
        </td>
        <td class="msource">TreeLoader</td>
    </tr>
        <tr class="config-row">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.tree.TreeLoader-url"></a>
            <b>url</b> : String            <div class="mdesc">
                            Equivalent to <a ext:cls="Ext.tree.TreeLoader" ext:member="dataUrl" href="output/Ext.tree.TreeLoader.html#dataUrl">dataUrl</a>.                        </div>
        </td>
        <td class="msource">TreeLoader</td>
    </tr>
            </table>                <a id="Ext.tree.TreeLoader-props"></a>        <h2>Public Properties</h2>        <div class="no-members">This class has no public properties.</div>        <a id="Ext.tree.TreeLoader-methods"></a>        <h2>Public Methods</h2>                <table cellspacing="0" class="member-table">            <tr>                <th class="sig-header" colspan="2">Method</th>                <th class="msource-header">Defined By</th>            </tr>                <tr class="method-row expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.tree.TreeLoader-TreeLoader"></a>
            <b>TreeLoader</b>(&nbsp;<code>Object config</code>&nbsp;)            <div class="mdesc">
                        <div class="short">Creates a new Treeloader.</div>
            <div class="long">
                Creates a new Treeloader.    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>config</code> : Object<div class="sub-desc">A config object containing config properties.</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code></code></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">TreeLoader</td>
    </tr>
        <tr class="method-row inherited alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.tree.TreeLoader-addEvents"></a>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?