ext.form.basicform.html.svn-base

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

SVN-BASE
941
字号
function. The handler function's "this" context.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) An object containing handler configurationproperties. This may contain any of the following properties:<ul><li><b>scope</b> : Object<p class="sub-desc">The scope in which to execute the handler function. The handler function's "this" context.</p></li><li><b>delay</b> : Number<p class="sub-desc">The number of milliseconds to delay the invocation of the handler after the event fires.</p></li><li><b>single</b> : Boolean<p class="sub-desc">True to add a handler to handle just the next firing of the event, and then remove itself.</p></li><li><b>buffer</b> : Number<p class="sub-desc">Causes the handler to be scheduled to run in an <a ext:cls="Ext.util.DelayedTask" href="output/Ext.util.DelayedTask.html">Ext.util.DelayedTask</a> delayedby the specified number of milliseconds. If the event fires again within that time, the originalhandler is <em>not</em> invoked, but the new handler is scheduled in its place.</p></li></ul><br><p><b>Combining Options</b><br>Using the options argument, it is possible to combine different types of listeners:<br><br>A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)<pre><code>el.on(<em>'click'</em>, <b>this</b>.onClick, <b>this</b>, {    single: true,    delay: 100,    forumId: 4});</code></pre><p><b>Attaching multiple handlers in 1 call</b><br>The method also allows for a single argument to be passed which is a config object containing propertieswhich specify multiple handlers.<p><pre><code>foo.on({    <em>'click'</em> : {        fn: <b>this</b>.onClick,        scope: <b>this</b>,        delay: 100    },    <em>'mouseover'</em> : {        fn: <b>this</b>.onMouseOver,        scope: <b>this</b>    },    <em>'mouseout'</em> : {        fn: <b>this</b>.onMouseOut,        scope: <b>this</b>    }});</code></pre><p>Or a shorthand syntax:<br><pre><code>foo.on({    <em>'click'</em> : <b>this</b>.onClick,    <em>'mouseover'</em> : <b>this</b>.onMouseOver,    <em>'mouseout'</em> : <b>this</b>.onMouseOut,     scope: <b>this</b>});</code></pre></div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>void</code></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#addListener" href="output/Ext.util.Observable.html#addListener">Observable</a></td>
    </tr>
        <tr class="method-row expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.form.BasicForm-applyIfToFields"></a>
            <b>applyIfToFields</b>(&nbsp;<code>Object values</code>&nbsp;) : BasicForm            <div class="mdesc">
                        <div class="short">Calls <a ext:cls="Ext" ext:member="applyIf" href="output/Ext.html#applyIf">Ext.applyIf</a> for all field in this form with the passed object.</div>
            <div class="long">
                Calls <a ext:cls="Ext" ext:member="applyIf" href="output/Ext.html#applyIf">Ext.applyIf</a> for all field in this form with the passed object.    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>values</code> : Object<div class="sub-desc"></div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">BasicForm</td>
    </tr>
        <tr class="method-row alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.form.BasicForm-applyToFields"></a>
            <b>applyToFields</b>(&nbsp;<code>Object values</code>&nbsp;) : BasicForm            <div class="mdesc">
                        <div class="short">Calls <a ext:cls="Ext" ext:member="apply" href="output/Ext.html#apply">Ext.apply</a> for all fields in this form with the passed object.</div>
            <div class="long">
                Calls <a ext:cls="Ext" ext:member="apply" href="output/Ext.html#apply">Ext.apply</a> for all fields in this form with the passed object.    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>values</code> : Object<div class="sub-desc"></div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">BasicForm</td>
    </tr>
        <tr class="method-row expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.form.BasicForm-clearInvalid"></a>
            <b>clearInvalid</b>() : BasicForm            <div class="mdesc">
                        <div class="short">Clears all invalid messages in this form.</div>
            <div class="long">
                Clears all invalid messages in this form.    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li>None.</li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">BasicForm</td>
    </tr>
        <tr class="method-row alt expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.form.BasicForm-doAction"></a>
            <b>doAction</b>(&nbsp;<code>String/Object actionName</code>, <span class="optional" title="Optional">[<code>Object options</code>]</span>&nbsp;) : BasicForm            <div class="mdesc">
                        <div class="short">Performs a predefined action (Ext.form.Action.Submit orExt.form.Action.Load) or a custom extension of Ext.form.Actio...</div>
            <div class="long">
                Performs a predefined action (<a ext:cls="Ext.form.Action.Submit" href="output/Ext.form.Action.Submit.html">Ext.form.Action.Submit</a> or<a ext:cls="Ext.form.Action.Load" href="output/Ext.form.Action.Load.html">Ext.form.Action.Load</a>) or a custom extension of <a ext:cls="Ext.form.Action" href="output/Ext.form.Action.html">Ext.form.Action</a> to perform application-specific processing.    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>actionName</code> : String/Object<div class="sub-desc">The name of the predefined action type,or instance of <a ext:cls="Ext.form.Action" href="output/Ext.form.Action.html">Ext.form.Action</a> to perform.</div></li><li><code>options</code> : Object<div class="sub-desc">(optional) The options to pass to the <a ext:cls="Ext.form.Action" href="output/Ext.form.Action.html">Ext.form.Action</a>. All of the config options listed below are supported by both the submitand load actions unless otherwise noted (custom actions could also acceptother config options):<ul><li><b>url</b> : String<p style="margin-left:1em">The url for the action (defaultsto the form's url.)</p></li><li><b>method</b> : String<p style="margin-left:1em">The form method to use (defaultsto the form's method, or POST if not defined)</p></li><li><b>params</b> : String/Object<p style="margin-left:1em">The params to pass(defaults to the form's baseParams, or none if not defined)</p></li><li><b>headers</b> : Object<p style="margin-left:1em">Request headers to set for the action(defaults to the form's default headers)</p></li><li><b>success</b> : Function<p style="margin-left:1em">The callback that willbe invoked after a successful response. Note that this is HTTP success(the transaction was sent and received correctly), but the resulting response datacan still contain data errors. The function is passed the following parameters:<ul><li><code>form</code> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li><li><code>action</code> : Ext.form.Action<div class="sub-desc">The Action class. The <a ext:cls="Ext.form.Action" ext:member="result" href="output/Ext.form.Action.html#result">result</a>property of this object may be examined to perform custom postprocessing.</div></li></ul></p></li><li><b>failure</b> : Function<p style="margin-left:1em">The callback that willbe invoked after a failed transaction attempt. Note that this is HTTP failure,which means a non-successful HTTP code was returned from the server. The functionis passed the following parameters:<ul><li><code>form</code> : Ext.form.BasicForm<div class="sub-desc">The form that requested the action</div></li><li><code>action</code> : Ext.form.Action<div class="sub-desc">The Action class. If an Ajaxerror ocurred, the failure type will be in <a ext:cls="Ext.form.Action" ext:member="failureType" href="output/Ext.form.Action.html#failureType">failureType</a>. The <a ext:cls="Ext.form.Action" ext:member="result" href="output/Ext.form.Action.html#result">result</a>property of this object may be examined to perform custom postprocessing.</div></li></ul></p></li><li><b>scope</b> : Object<p style="margin-left:1em">The scope in which to call thecallback functions (The <tt>this</tt> reference for the callback functions).</p></li><li><b>clientValidation</b> : Boolean<p style="margin-left:1em">Submit Action only.Determines whether a Form's fields are validated in a final call to<a ext:cls="Ext.form.BasicForm" ext:member="isValid" href="output/Ext.form.BasicForm.html#isValid">isValid</a> prior to submission. Set to <tt>false</tt>to prevent this. If undefined, pre-submission field validation is performed.</p></li></ul></div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>BasicForm</code><div class="sub-desc">this</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">BasicForm</td>
    </tr>
        <tr class="method-row expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.form.BasicForm-findField"></a>
            <b>findField</b>(&nbsp;<code>String id</code>&nbsp;) : Field            <div class="mdesc">
                        <div class="short">Find a Ext.form.Field in this form by id, dataIndex, name or hiddenName.</div>
            <div class="long">
                Find a Ext.form.Field in this form by id, dataIndex, name or hiddenName.    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>id</code> : String<div class="sub-desc">The value to search for</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>Field</code></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">BasicForm</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.form.BasicForm-fireEvent"></a>
            <b>fireEvent</b>(&nbsp;<code>String eventName</code>, <code>Object... args</code>&nbsp;) : Boolean            <div class="mdesc">
                        <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
            <div class="long">
                Fires the specified event with the passed parameters (minus the event name).    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li><code>eventName</code> : String<div class="sub-desc"></div></li><li><code>args</code> : Object...<div class="sub-desc">Variable number of parameters are passed to handlers</div></li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>Boolean</code><div class="sub-desc">returns false if any of the handlers return false otherwise it returns true</div></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource"><a ext:cls="Ext.util.Observable" ext:member="#fireEvent" href="output/Ext.util.Observable.html#fireEvent">Observable</a></td>
    </tr>
        <tr class="method-row expandable">
        <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
        <td class="sig">
        <a id="Ext.form.BasicForm-getEl"></a>
            <b>getEl</b>() : Ext.Element            <div class="mdesc">
                        <div class="short">Get the HTML form Element</div>
            <div class="long">
                Get the HTML form Element    <div class="mdetail-params">
        <strong>Parameters:</strong>
        <ul><li>None.</li>        </ul>
        <strong>Returns:</strong>
        <ul>
            <li><code>Ext.Element</code></li>
        </ul>
    </div>
                </div>
                        </div>
        </td>
        <td class="msource">BasicForm</td>
    </tr>
        <tr class="method-row alt expandable">

⌨️ 快捷键说明

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