1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <meta http-equiv="content-type" content="text/html; charset=undefined" />
8 <meta name="generator" content="JsDoc Toolkit" />
11 <title>JsDoc Reference - Roo.XComponent</title>
14 <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
15 <link rel="stylesheet" type="text/css" href="../default.css" />
18 <script type="text/javascript" src="../page.js">
25 <body onload="RooDocsPage.onload();">
28 <div class="body-wrap">
30 <!-- ============================== links to methods. ================================= -->
32 <div class="top-tools">
34 <a class="inner-link" href="#Roo.XComponent-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35 <a class="inner-link" href="#Roo.XComponent-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36 <a class="inner-link" href="#Roo.XComponent-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37 <a class="inner-link" href="#Roo.XComponent-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
38 <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
43 <!-- ============================== inheritance Block. ================================= -->
45 <div class="inheritance res-block">
46 <pre class="res-block-inner"><a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
47 <img src="../../images/default/s.gif" height="1" width="20"/><img class="elbow" src="../../images/default/tree/elbow-end.gif"/>Roo.XComponent
52 <!-- ============================== class title / details ============================ -->
55 <h1 class="classTitle">
60 <table cellspacing="0" class="class-summary-table">
62 <tr><td class="label">Package:</td><td class="hd-info">Roo</td></tr>
64 <tr><td class="label">Defined In:</td><td class="hd-info">
66 <a href="./src/Roo_XComponent.js.html">Roo/XComponent.js</a>.
69 <tr><td class="label">Class:</td><td class="hd-info">XComponent</td></tr>
74 <tr><td class="label">Extends:</td><td class="hd-info">
75 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
83 <!-- ============================== class summary ========================== -->
84 <div class="description">
85 A delayed Element creator...<br/>Or a way to group chunks of interface together.<br/>technically this is a wrapper around a tree of Roo elements (which defines a 'module'),<br/> used in conjunction with XComponent.build() it will create an instance of each element,<br/> then call addxtype() to build the User interface.<br/><br/>Mypart.xyx = new Roo.XComponent({<br/><br/> parent : 'Mypart.xyz', // empty == document.element.!!<br/> order : '001',<br/> name : 'xxxx'<br/> region : 'xxxx'<br/> disabled : function() {} <br/> <br/> tree : function() { // return an tree of xtype declared components<br/> var MODULE = this;<br/> return <br/> {<br/> xtype : 'NestedLayoutPanel',<br/> // technicall<br/> }<br/> ]<br/>})<br/><br/><br/>It can be used to build a big heiracy, with parent etc.<br/>or you can just use this to render a single compoent to a dom element<br/>MYPART.render(Roo.Element | String(id) | dom_element )<br/><br/><br/>Usage patterns.<br/><br/>Classic Roo<br/><br/>Roo is designed primarily as a single page application, so the UI build for a standard interface will<br/>expect a single 'TOP' level module normally indicated by the 'parent' of the XComponent definition being defined as false.<br/><br/>Each sub module is expected to have a parent pointing to the class name of it's parent module.<br/><br/>When the top level is false, a 'Roo.BorderLayout' is created and the element is flagged as 'topModule'<br/>- if mulitple topModules exist, the last one is defined as the top module.<br/><br/>Embeded Roo<br/><br/>When the top level or multiple modules are to embedded into a existing HTML page,<br/>the parent element can container '<b>id</b>' of the element where the module will be drawn.<br/><br/>Bootstrap Roo<br/><br/>Unlike classic Roo, the bootstrap tends not to be used as a single page.<br/>it relies more on a include mechanism, where sub modules are included into an outer page.<br/>This is normally managed by the builder tools using Roo.apply( options, Included.Sub.Module )<br/><br/>Bootstrap Roo Included elements<br/><br/>Our builder application needs the ability to preview these sub compoennts. They will normally have parent=false set,<br/>hence confusing the component builder as it thinks there are multiple top level elements. <br/><br/>String Over-ride & Translations<br/><br/>Our builder application writes all the strings as _strings and _named_strings. This is to enable the translation of elements,<br/>and also the 'overlaying of string values - needed when different versions of the same application with different text content<br/>are needed. <b>see</b> Roo.XComponent.overlayString
89 <!-- ============================== Class comment block... ========================== -->
91 <div class="comments">
92 <b>Class Comments / Notes</B> =>
93 <u onclick="parent.CommentDialog.showCommentId = 'Roo.XComponent';">[Add Your comment/notes about this class]</u>
95 <iframe frameborder="0" id="comments-Roo" style="border: none;width:100%;"
96 src="/blog.php/GtkDjsComments/Roo.XComponent.html"></iframe>
101 <!-- ============================== config options ========================== -->
106 <div class="hr"></div>
107 <a id="Roo.XComponent-configs"></a>
113 <table cellspacing="0" class="member-table">
114 <caption>Config Options (Usually are also Properties)</caption>
118 <th class="sig-header" colspan="2">Options</th>
120 <th class="msource-header">Defined By</th>
127 <tr class="config-row expandable config-row-alt0 notInherited">
128 <td class="micon"><a class="exi" href="#expand"> </a></td>
131 <a id="Roo.XComponent-cfg-disabled" name=".disabled"></a>
132 <div class="fixedFont">
133 <b class="itemname">disabled</b> : <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a>|boolean
139 <div class="short">If this module is disabled by some rule, return true from the funtion</div>
144 If this module is disabled by some rule, return true from the funtion
160 <tr class="config-row expandable config-row-alt1 notInherited">
161 <td class="micon"><a class="exi" href="#expand"> </a></td>
164 <a id="Roo.XComponent-cfg-items" name=".items"></a>
165 <div class="fixedFont">
166 <b class="itemname">items</b> : <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>
172 <div class="short">A single item array - the first element is the root of the tree.</div>
177 A single item array - the first element is the root of the tree..<br/>It's done this way to stay compatible with the Xtype system...
193 <tr class="config-row expandable config-row-alt0">
194 <td class="micon"><a class="exi" href="#expand"> </a></td>
197 <a id="Roo.util.Observable-cfg-listeners" name=".listeners"></a>
198 <div class="fixedFont">
199 <b class="itemname">listeners</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
205 <div class="short">list of events and functions to call for this object, <br/>For example :<br/><pre><code><br/> listeners : { <br/> 'click' : function(e) {<br/> .</div>
210 list of events and functions to call for this object, <br/>For example :<br/><pre><code><br/> listeners : { <br/> 'click' : function(e) {<br/> ..... <br/> } ,<br/> .... <br/> } <br/> </code></pre>
220 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
226 <tr class="config-row expandable config-row-alt1 notInherited">
227 <td class="micon"><a class="exi" href="#expand"> </a></td>
230 <a id="Roo.XComponent-cfg-name" name=".name"></a>
231 <div class="fixedFont">
232 <b class="itemname">name</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
238 <div class="short">String to display while loading.</div>
243 String to display while loading.
259 <tr class="config-row expandable config-row-alt0 notInherited">
260 <td class="micon"><a class="exi" href="#expand"> </a></td>
263 <a id="Roo.XComponent-cfg-order" name=".order"></a>
264 <div class="fixedFont">
265 <b class="itemname">order</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
271 <div class="short">Used to set the order in which elements are created (usefull for multiple tabs)</div>
276 Used to set the order in which elements are created (usefull for multiple tabs)
292 <tr class="config-row expandable config-row-alt1 notInherited">
293 <td class="micon"><a class="exi" href="#expand"> </a></td>
296 <a id="Roo.XComponent-cfg-parent" name=".parent"></a>
297 <div class="fixedFont">
298 <b class="itemname">parent</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
304 <div class="short">Name of parent element which it get xtype added to.</div>
309 Name of parent element which it get xtype added to..
325 <tr class="config-row expandable config-row-alt0 notInherited">
326 <td class="micon"><a class="exi" href="#expand"> </a></td>
329 <a id="Roo.XComponent-cfg-region" name=".region"></a>
330 <div class="fixedFont">
331 <b class="itemname">region</b> : <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>
337 <div class="short">Region to render component to (defaults to center)</div>
342 Region to render component to (defaults to center)
368 <!-- ============================== public properties ==================== -->
372 <a id="Roo.XComponent-props"></a>
380 <table cellspacing="0" class="member-table">
381 <caption>Public Properties </caption>
383 <th class="sig-header" colspan="2">Property</th>
384 <th class="sig-header">Description</th>
385 <th class="msource-header">Defined By</th>
395 <tr class="property-row config-row-alt0 notInherited">
397 <a class="exi" href="#expand"> </a>
400 <a id="Roo.XComponent-prop-buildCompleted" name=".buildCompleted"></a>
401 <div class="fixedFont">
402 <span class="attributes">Roo.XComponent.</span><b class="itemname">buildCompleted</b> :
403 <span type="etype"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span>
411 True when the builder has completed building the interface.
419 True when the builder has completed building the interface.
434 <tr class="property-row config-row-alt1 notInherited">
436 <a class="exi" href="#expand"> </a>
439 <a id="Roo.XComponent-prop-build_from_html" name=".build_from_html"></a>
440 <div class="fixedFont">
441 <span class="attributes">Roo.XComponent.</span><b class="itemname">build_from_html</b> :
442 <span type="etype">(default false)</span>
450 Build elements from html - used by bootstrap HTML stuff <br/> - this is cleared after build is completed
458 Build elements from html - used by bootstrap HTML stuff <br/> - this is cleared after build is completed
473 <tr class="property-row config-row-alt0 notInherited">
475 <a class="exi" href="#expand"> </a>
478 <a id="Roo.XComponent-prop-elmodules" name=".elmodules"></a>
479 <div class="fixedFont">
480 <span class="attributes">Roo.XComponent.</span><b class="itemname">elmodules</b> :
481 <span type="etype">of Roo.XComponent</span>
489 array of modules to be created by which use <b>ID</b>
497 array of modules to be created by which use <b>ID</b>
512 <tr class="property-row config-row-alt1 notInherited">
514 <a class="exi" href="#expand"> </a>
517 <a id="Roo.XComponent-prop-event" name=".event"></a>
518 <div class="fixedFont">
519 <span class="attributes">Roo.XComponent.</span><b class="itemname">event</b> :
520 <span type="etype"></span>
551 <tr class="property-row config-row-alt0 notInherited">
553 <a class="exi" href="#expand"> </a>
556 <a id="Roo.XComponent-prop-hideProgress" name=".hideProgress"></a>
557 <div class="fixedFont">
558 <span class="attributes">Roo.XComponent.</span><b class="itemname">hideProgress</b> :
559 <span type="etype"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span>
567 true to disable the building progress bar.
575 true to disable the building progress bar.. usefull on single page renders.
590 <tr class="property-row config-row-alt1 notInherited">
592 <a class="exi" href="#expand"> </a>
595 <a id="Roo.XComponent-prop-is_alt" name=".is_alt"></a>
596 <div class="fixedFont">
597 <span class="attributes">Roo.XComponent.</span><b class="itemname">is_alt</b> :
598 <span type="etype">(default false)</span>
606 Is an alternative Root - normally used by bootstrap or other systems,<br/> where the top element in the tree can wrap 'body'
614 Is an alternative Root - normally used by bootstrap or other systems,<br/> where the top element in the tree can wrap 'body'
629 <tr class="property-row config-row-alt0 notInherited">
631 <a class="exi" href="#expand"> </a>
634 <a id="Roo.XComponent-prop-modules" name=".modules"></a>
635 <div class="fixedFont">
636 <span class="attributes">Roo.XComponent.</span><b class="itemname">modules</b> :
637 <span type="etype">of Roo.XComponent</span>
645 array of modules to be created by registration system.
653 array of modules to be created by registration system.
668 <tr class="property-row config-row-alt1 notInherited">
670 <a class="exi" href="#expand"> </a>
673 <a id="Roo.XComponent-prop-on" name=".on"></a>
674 <div class="fixedFont">
675 <span class="attributes">Roo.XComponent.</span><b class="itemname">on</b> :
676 <span type="etype"></span>
684 wrapper for event.on - aliased later.
692 wrapper for event.on - aliased later.. <br/>Typically use to register a event handler for register:<br/><br/>eg. Roo.XComponent.on('register', function(comp) { comp.disable = true } );
707 <tr class="property-row config-row-alt0 notInherited">
709 <a class="exi" href="#expand"> </a>
712 <a id="Roo.XComponent-prop-topModule" name=".topModule"></a>
713 <div class="fixedFont">
714 <span class="attributes">Roo.XComponent.</span><b class="itemname">topModule</b> :
715 <span type="etype"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span>
723 the upper most module - uses document.element as it's constructor.
731 the upper most module - uses document.element as it's constructor.
747 <!-- TODO: implement this alt row. also notice non-linked "Defined by" when property is a part of this class.
748 <tr class="property-row alt">
755 <!-- ============================== methods summary / details ======================== -->
758 <a id="Roo.XComponent-methods"></a>
759 <!-- constructor?? -->
766 <!-- then dynamics first -->
773 <table cellspacing="0" class="member-table">
774 <caption>Public Methods</caption>
776 <th class="sig-header" colspan="2">Method</th>
777 <th class="msource-header">Defined By</th>
787 <tr class="method-row config-row-alt0 expandable notInherited">
788 <td class="micon"><a class="exi" href="#expand"> </a></td>
792 <a id="Roo-method-XComponent" name=".XComponent"></a>
793 <div class="fixedFont">
794 <span class="attributes">new <B>Roo.</B></span><b class="itemname">XComponent</b>
804 <div class="short">Create a new Roo.XComponent</div>
811 Create a new Roo.XComponent
814 <dl class="detailList">
815 <dt class="heading">Parameters:</dt>
821 <dd>{Object} configuration of component</dd>
845 <tr class="method-row config-row-alt1 expandable notInherited">
846 <td class="micon"><a class="exi" href="#expand"> </a></td>
850 <a id="Roo.XComponent-method-build" name=".build"></a>
851 <div class="fixedFont">
852 <span class="attributes">Roo.XComponent.</span><b class="itemname">build</b>
854 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>parent</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>optional</i></B>)
861 <div class="short">Build the registered modules.</div>
867 Build the registered modules.
874 <dl class="detailList">
875 <dt class="heading">Parameters:</dt>
878 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>parent</b>
884 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>optional</b>
887 <dd>method to call after module has been added.</dd>
913 <tr class="method-row config-row-alt0 expandable notInherited">
914 <td class="micon"><a class="exi" href="#expand"> </a></td>
918 <a id="Roo.XComponent-method-buildOrder" name=".buildOrder"></a>
919 <div class="fixedFont">
920 <span class="attributes">Roo.XComponent.</span><b class="itemname">buildOrder</b>
928 <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>
937 <div class="short">make a list of modules to build.</div>
943 make a list of modules to build.
954 <dl class="detailList">
955 <dt class="heading">Returns:</dt>
957 <dd><span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span> list of modules.</dd>
979 <tr class="method-row config-row-alt1 expandable notInherited">
980 <td class="micon"><a class="exi" href="#expand"> </a></td>
984 <a id="Roo.XComponent-method-overlayStrings" name=".overlayStrings"></a>
985 <div class="fixedFont">
986 <span class="attributes">Roo.XComponent.</span><b class="itemname">overlayStrings</b>
988 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>element</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>associative</i></B>)
995 <div class="short">Overlay a set of modified strings onto a component<br/>This is dependant on our builder exporting the strings and 'named strings' elements.</div>
1001 Overlay a set of modified strings onto a component<br/>This is dependant on our builder exporting the strings and 'named strings' elements.
1008 <dl class="detailList">
1009 <dt class="heading">Parameters:</dt>
1012 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>element</b>
1015 <dd>to overlay on - eg. Pman.Dialog.Login</dd>
1018 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>associative</b>
1021 <dd>array of 'named' string and it's new value.</dd>
1039 <td class="msource">
1047 <tr class="method-row config-row-alt0 expandable notInherited">
1048 <td class="micon"><a class="exi" href="#expand"> </a></td>
1052 <a id="Roo.XComponent-method-preBuild" name=".preBuild"></a>
1053 <div class="fixedFont">
1054 <span class="attributes">Roo.XComponent.</span><b class="itemname">preBuild</b>
1063 <div class="short">move modules into their correct place in the tree.</div>
1069 move modules into their correct place in the tree..
1090 <td class="msource">
1098 <tr class="method-row config-row-alt1 expandable notInherited">
1099 <td class="micon"><a class="exi" href="#expand"> </a></td>
1103 <a id="Roo.XComponent-method-register" name=".register"></a>
1104 <div class="fixedFont">
1105 <span class="attributes">Roo.XComponent.</span><b class="itemname">register</b>
1114 <div class="short">Register components to be built later.</div>
1120 Register components to be built later.<br/><br/>This solves the following issues<br/>- Building is not done on page load, but after an authentication process has occured.<br/>- Interface elements are registered on page load<br/>- Parent Interface elements may not be loaded before child, so this handles that..<br/><br/><br/>example:<br/><br/>MyApp.register({<br/> order : '000001',<br/> module : 'Pman.Tab.projectMgr',<br/> region : 'center',<br/> parent : 'Pman.layout',<br/> disabled : false, // or use a function..<br/> })<br/>* <b>param</b> {Object} details about module
1141 <td class="msource">
1149 <tr class="method-row config-row-alt0 expandable notInherited">
1150 <td class="micon"><a class="exi" href="#expand"> </a></td>
1154 <a id="Roo.XComponent-method-toObject" name=".toObject"></a>
1155 <div class="fixedFont">
1156 <span class="attributes">Roo.XComponent.</span><b class="itemname">toObject</b>
1165 <div class="short">convert a string to an object.</div>
1171 convert a string to an object..<br/>eg. 'AAA.BBB' -> finds AAA.BBB
1192 <td class="msource">
1200 <tr class="method-row config-row-alt1 expandable">
1201 <td class="micon"><a class="exi" href="#expand"> </a></td>
1205 <a id="Roo.util.Observable-method-addEvents" name=".addEvents"></a>
1206 <div class="fixedFont">
1207 <span class="attributes"></span><b class="itemname">addEvents</b>
1209 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>object</i></B>)
1216 <div class="short">Used to define events on this Observable</div>
1222 Used to define events on this Observable
1229 <dl class="detailList">
1230 <dt class="heading">Parameters:</dt>
1233 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>object</b>
1236 <dd>The object with the events defined</dd>
1254 <td class="msource">
1256 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1262 <tr class="method-row config-row-alt0 expandable">
1263 <td class="micon"><a class="exi" href="#expand"> </a></td>
1267 <a id="Roo.util.Observable-method-addListener" name=".addListener"></a>
1268 <div class="fixedFont">
1269 <span class="attributes"></span><b class="itemname">addListener</b>
1271 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>handler</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>options</i></B>)
1278 <div class="short">Appends an event handler to this component</div>
1284 Appends an event handler to this component
1291 <dl class="detailList">
1292 <dt class="heading">Parameters:</dt>
1295 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1298 <dd>The type of event to listen for</dd>
1301 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
1304 <dd>The method the event invokes</dd>
1307 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
1310 <dd>(optional) The scope in which to execute the handler<br/>function. The handler function's "this" context.</dd>
1313 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>options</b>
1316 <dd>(optional) An object containing handler configuration<br/>properties. This may contain any of the following properties:<ul><br/><li>scope {Object} The scope in which to execute the handler function. The handler function's "this" context.</li><br/><li>delay {Number} The number of milliseconds to delay the invocation of the handler after te event fires.</li><br/><li>single {Boolean} True to add a handler to handle just the next firing of the event, and then remove itself.</li><br/><li>buffer {Number} Causes the handler to be scheduled to run in an {<b>link</b> Roo.util.DelayedTask} delayed<br/>by the specified number of milliseconds. If the event fires again within that time, the original<br/>handler is <em>not</em> invoked, but the new handler is scheduled in its place.</li><br/></ul><br><br/><p><br/><b>Combining Options</b><br><br/>Using the options argument, it is possible to combine different types of listeners:<br><br/><br><br/>A normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)<br/> <pre><code><br/> el.on('click', this.onClick, this, {<br/> single: true,<br/> delay: 100,<br/> forumId: 4<br/> });<br/> </code></pre><br/><p><br/><b>Attaching multiple handlers in 1 call</b><br><br/>The method also allows for a single argument to be passed which is a config object containing properties<br/>which specify multiple handlers.<br/><pre><code><br/> el.on({<br/> 'click': {<br/> fn: this.onClick,<br/> scope: this,<br/> delay: 100<br/> }, <br/> 'mouseover': {<br/> fn: this.onMouseOver,<br/> scope: this<br/> },<br/> 'mouseout': {<br/> fn: this.onMouseOut,<br/> scope: this<br/> }<br/> });<br/> </code></pre><br/><p><br/>Or a shorthand syntax which passes the same scope object to all handlers:<br/> <pre><code><br/> el.on({<br/> 'click': this.onClick,<br/> 'mouseover': this.onMouseOver,<br/> 'mouseout': this.onMouseOut,<br/> scope: this<br/> });<br/> </code></pre></dd>
1334 <td class="msource">
1336 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1342 <tr class="method-row config-row-alt1 expandable">
1343 <td class="micon"><a class="exi" href="#expand"> </a></td>
1347 <a id="Roo.util.Observable-method-fireEvent" name=".fireEvent"></a>
1348 <div class="fixedFont">
1349 <span class="attributes"></span><b class="itemname">fireEvent</b>
1351 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object...</a> <B><i>args</i></B>)
1357 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
1366 <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
1372 Fires the specified event with the passed parameters (minus the event name).
1379 <dl class="detailList">
1380 <dt class="heading">Parameters:</dt>
1383 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1389 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object...</a></span> <b>args</b>
1392 <dd>Variable number of parameters are passed to handlers</dd>
1400 <dl class="detailList">
1401 <dt class="heading">Returns:</dt>
1403 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> returns false if any of the handlers return false otherwise it returns true</dd>
1417 <td class="msource">
1419 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1425 <tr class="method-row config-row-alt0 expandable">
1426 <td class="micon"><a class="exi" href="#expand"> </a></td>
1430 <a id="Roo.util.Observable-method-hasListener" name=".hasListener"></a>
1431 <div class="fixedFont">
1432 <span class="attributes"></span><b class="itemname">hasListener</b>
1434 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>)
1440 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
1449 <div class="short">Checks to see if this object has any listeners for a specified event</div>
1455 Checks to see if this object has any listeners for a specified event
1462 <dl class="detailList">
1463 <dt class="heading">Parameters:</dt>
1466 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1469 <dd>The name of the event to check for</dd>
1477 <dl class="detailList">
1478 <dt class="heading">Returns:</dt>
1480 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> True if the event is being listened for, else false</dd>
1494 <td class="msource">
1496 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1502 <tr class="method-row config-row-alt1 expandable">
1503 <td class="micon"><a class="exi" href="#expand"> </a></td>
1507 <a id="Roo.util.Observable-method-purgeListeners" name=".purgeListeners"></a>
1508 <div class="fixedFont">
1509 <span class="attributes"></span><b class="itemname">purgeListeners</b>
1518 <div class="short">Removes all listeners for this object</div>
1524 Removes all listeners for this object
1545 <td class="msource">
1547 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1553 <tr class="method-row config-row-alt0 expandable">
1554 <td class="micon"><a class="exi" href="#expand"> </a></td>
1558 <a id="Roo.util.Observable-method-removeListener" name=".removeListener"></a>
1559 <div class="fixedFont">
1560 <span class="attributes"></span><b class="itemname">removeListener</b>
1562 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>handler</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>)
1569 <div class="short">Removes a listener</div>
1582 <dl class="detailList">
1583 <dt class="heading">Parameters:</dt>
1586 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1589 <dd>The type of event to listen for</dd>
1592 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
1595 <dd>The handler to remove</dd>
1598 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
1601 <dd>(optional) The scope (this object) for the handler</dd>
1619 <td class="msource">
1621 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1627 <tr class="method-row config-row-alt1 expandable notInherited">
1628 <td class="micon"><a class="exi" href="#expand"> </a></td>
1632 <a id="Roo.XComponent-method-render" name=".render"></a>
1633 <div class="fixedFont">
1634 <span class="attributes"></span><b class="itemname">render</b>
1636 (<a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a>|<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>|DomElement <B><i>optional</i></B>)
1643 <div class="short">render<br/>render element to dom or tree</div>
1649 render<br/>render element to dom or tree
1656 <dl class="detailList">
1657 <dt class="heading">Parameters:</dt>
1660 <span class="fixedFont"><a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a>|<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>|DomElement</span> <b>optional</b>
1663 <dd>render to if parent is not set.</dd>
1681 <td class="msource">
1689 <tr class="method-row config-row-alt0 expandable">
1690 <td class="micon"><a class="exi" href="#expand"> </a></td>
1694 <a id="Roo.util.Observable-method-un" name=".un"></a>
1695 <div class="fixedFont">
1696 <span class="attributes"></span><b class="itemname">un</b>
1698 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>, <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>handler</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>)
1705 <div class="short">Removes a listener (shorthand for removeListener)</div>
1711 Removes a listener (shorthand for removeListener)
1718 <dl class="detailList">
1719 <dt class="heading">Parameters:</dt>
1722 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1725 <dd>The type of event to listen for</dd>
1728 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
1731 <dd>The handler to remove</dd>
1734 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
1737 <dd>(optional) The scope (this object) for the handler</dd>
1755 <td class="msource">
1757 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1766 <!-- ============================== events summary / details ======================== -->
1769 <a id="Roo.XComponent-events"></a>
1778 <table cellspacing="0" class="member-table">
1779 <caption>Events</caption>
1782 <th class="sig-header" colspan="2">Event</th>
1783 <th class="msource-header">Defined By</th>
1792 <tr class="method-row expandable config-row-alt0 notInherited">
1793 <td class="micon"><a class="exi" href="#expand"> </a></td>
1796 <a id="Roo.XComponent-event-*built"></a>
1798 <div class="fixedFont">
1799 <b class="itemname">built</b> (<a href="./Roo.XComponent.html#constructor" roo:cls="Roo.XComponent.html#constructor">Roo.XComponent</a> <B><i>c</i></B>)
1805 <div class="short">Fires when this the componnt is built
1811 Fires when this the componnt is built
1817 <dl class="detailList">
1818 <dt class="heading">Parameters:</dt>
1821 <span class="fixedFont"><a href="./Roo.XComponent.html#constructor" roo:cls="Roo.XComponent.html#constructor">Roo.XComponent</a></span> <b>c</b>
1824 <dd>the component</dd>
1842 <td class="msource">
1854 <!-- ============================== footer ================================= -->
1855 <div class="fineprint" style="clear:both">
1857 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Fri Jul 13 2018 14:10:53 GMT+0800 (HKT)
1859 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>