1 <div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.CompositeElementLite-props"><img src="resources/images/default/s.gif" class="item-icon icon-prop">Properties</a> <a class="inner-link" href="#Ext.CompositeElementLite-methods"><img src="resources/images/default/s.gif" class="item-icon icon-method">Methods</a> <a class="inner-link" href="#Ext.CompositeElementLite-events"><img src="resources/images/default/s.gif" class="item-icon icon-event">Events</a> <a class="bookmark" href="../docs/?class=Ext.CompositeElementLite"><img src="resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a> </div><h1>Class <a href="source/CompositeElementLite.html#cls-Ext.CompositeElementLite">Ext.CompositeElementLite</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr><tr><td class="label">Defined In:</td><td class="hd-info">CompositeElementLite.js, CompositeElementLite-more.js</td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/CompositeElementLite.html#cls-Ext.CompositeElementLite">CompositeElementLite</a></td></tr><tr><td class="label">Subclasses:</td><td class="hd-info"><a href="output/Ext.CompositeElement.html" ext:cls="Ext.CompositeElement">CompositeElement</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr></table><div class="description">Flyweight composite class. Reuses the same Ext.Element for element operations.
\r
2 <pre><code><b>var</b> els = Ext.select(<em>"#some-el div.some-class"</em>);
\r
3 <i>// or select directly from an existing element
\r</i>
4 <b>var</b> el = Ext.get(<em>'some-el'</em>);
\r
5 el.select(<em>'div.some-class'</em>);
\r
7 els.setWidth(100); <i>// all elements become 100 width
\r</i>
8 els.hide(true); <i>// all elements fade out and hide
\r</i>
10 els.setWidth(100).hide(true);</code></pre><br><br>
\r
11 <b>NOTE: Although they are not listed, this class supports all of the set/update methods of Ext.Element. All Ext.Element
\r
12 actions will be performed on all the elements in this collection.</b></div><div class="hr"></div><a id="Ext.CompositeElementLite-props"></a><h2>Public Properties</h2><div class="no-members">This class has no public properties.</div><a id="Ext.CompositeElementLite-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.CompositeElementLite-clear"></a><b><a href="source/CompositeElementLite.html#method-Ext.CompositeElementLite-clear">clear</a></b>()
14 void<div class="mdesc"><div class="short">Removes all elements.</div><div class="long">Removes all elements.<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">CompositeElementLite</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.CompositeElementLite-contains"></a><b><a href="source/CompositeElementLite-more.html#method-Ext.CompositeElementLite-contains">contains</a></b>( <code>el {Mixed}</code> )
16 Boolean<div class="mdesc"><div class="short">Returns true if this composite contains the passed element</div><div class="long">Returns true if this composite contains the passed element<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>{Mixed}</code> : el<div class="sub-desc">The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.</div></li></ul><strong>Returns:</strong><ul><li><code>Boolean</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">CompositeElementLite</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.CompositeElementLite-each"></a><b><a href="source/CompositeElementLite.html#method-Ext.CompositeElementLite-each">each</a></b>( <code>Function fn</code>, <span title="Optional" class="optional">[<code>Object scope</code>]</span> )
18 CompositeElement<div class="mdesc"><div class="short">Calls the passed function passing (el, this, index) for each element in this composite. The element
19 passed is the fl...</div><div class="long">Calls the passed function passing (el, this, index) for each element in this composite. <b>The element
\r
20 passed is the flyweight (shared) Ext.Element instance, so if you require a
\r
21 a reference to the dom node, use el.dom.</b><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>fn</code> : Function<div class="sub-desc">The function to call</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The <i>this</i> object (defaults to the element)</div></li></ul><strong>Returns:</strong><ul><li><code>CompositeElement</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">CompositeElementLite</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.CompositeElementLite-fill"></a><b><a href="source/CompositeElementLite-more.html#method-Ext.CompositeElementLite-fill">fill</a></b>( <code>String/Array els</code> )
23 CompositeElement<div class="mdesc"><div class="short">Clears this composite and adds the elements returned by the passed selector.</div><div class="long">Clears this composite and adds the elements returned by the passed selector.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>els</code> : String/Array<div class="sub-desc">A string CSS selector, an array of elements or an element</div></li></ul><strong>Returns:</strong><ul><li><code>CompositeElement</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">CompositeElementLite</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.CompositeElementLite-filter"></a><b><a href="source/CompositeElementLite-more.html#method-Ext.CompositeElementLite-filter">filter</a></b>( <code>String selector</code> )
25 CompositeElement<div class="mdesc"><div class="short">Filters this composite to only elements that match the passed selector.</div><div class="long">Filters this composite to only elements that match the passed selector.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>selector</code> : String<div class="sub-desc">A string CSS selector</div></li></ul><strong>Returns:</strong><ul><li><code>CompositeElement</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">CompositeElementLite</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.CompositeElementLite-first"></a><b><a href="source/CompositeElementLite-more.html#method-Ext.CompositeElementLite-first">first</a></b>()
27 Ext.Element<div class="mdesc"><div class="short">Returns the first Element</div><div class="long">Returns the first Element<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Ext.Element</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">CompositeElementLite</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.CompositeElementLite-getCount"></a><b><a href="source/CompositeElementLite.html#method-Ext.CompositeElementLite-getCount">getCount</a></b>()
29 Number<div class="mdesc"><div class="short">Returns the number of elements in this composite</div><div class="long">Returns the number of elements in this composite<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Number</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">CompositeElementLite</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.CompositeElementLite-indexOf"></a><b><a href="source/CompositeElementLite.html#method-Ext.CompositeElementLite-indexOf">indexOf</a></b>( <code>el {Mixed}</code> )
31 Number<div class="mdesc"><div class="short">Find the index of the passed element within the composite collection.</div><div class="long">Find the index of the passed element within the composite collection.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>{Mixed}</code> : el<div class="sub-desc">The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection.</div></li></ul><strong>Returns:</strong><ul><li><code>Number</code><div class="sub-desc">The index of the passed Ext.Element in the composite collection, or -1 if not found.</div></li></ul></div></div></div></td><td class="msource">CompositeElementLite</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.CompositeElementLite-item"></a><b><a href="source/CompositeElementLite.html#method-Ext.CompositeElementLite-item">item</a></b>( <code>Number index</code> )
33 Ext.Element<div class="mdesc"><div class="short">Returns a flyweight Element of the dom element object at the specified index</div><div class="long">Returns a flyweight Element of the dom element object at the specified index<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>index</code> : Number<div class="sub-desc"></div></li></ul><strong>Returns:</strong><ul><li><code>Ext.Element</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">CompositeElementLite</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.CompositeElementLite-last"></a><b><a href="source/CompositeElementLite-more.html#method-Ext.CompositeElementLite-last">last</a></b>()
35 Ext.Element<div class="mdesc"><div class="short">Returns the last Element</div><div class="long">Returns the last Element<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li><code>Ext.Element</code><div class="sub-desc"></div></li></ul></div></div></div></td><td class="msource">CompositeElementLite</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.CompositeElementLite-removeElement"></a><b><a href="source/CompositeElementLite-more.html#method-Ext.CompositeElementLite-removeElement">removeElement</a></b>( <code>Mixed el</code>, <span title="Optional" class="optional">[<code>Boolean removeDom</code>]</span> )
37 CompositeElement<div class="mdesc"><div class="short">Removes the specified element(s).</div><div class="long">Removes the specified element(s).<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>el</code> : Mixed<div class="sub-desc">The id of an element, the Element itself, the index of the element in this composite
\r
38 or an array of any of those.</div></li><li><code>removeDom</code> : Boolean<div class="sub-desc">(optional) True to also remove the element from the document</div></li></ul><strong>Returns:</strong><ul><li><code>CompositeElement</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">CompositeElementLite</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.CompositeElementLite-replaceElement"></a><b><a href="source/CompositeElementLite.html#method-Ext.CompositeElementLite-replaceElement">replaceElement</a></b>( <code>Mixed el</code>, <code>Mixed replacement</code>, <span title="Optional" class="optional">[<code>Boolean domReplace</code>]</span> )
40 CompositeElement<div class="mdesc"><div class="short">Replaces the specified element with the passed element.</div><div class="long">Replaces the specified element with the passed element.<div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>el</code> : Mixed<div class="sub-desc">The id of an element, the Element itself, the index of the element in this composite
\r
41 to replace.</div></li><li><code>replacement</code> : Mixed<div class="sub-desc">The id of an element or the Element itself.</div></li><li><code>domReplace</code> : Boolean<div class="sub-desc">(Optional) True to remove and replace the element in the document too.</div></li></ul><strong>Returns:</strong><ul><li><code>CompositeElement</code><div class="sub-desc">this</div></li></ul></div></div></div></td><td class="msource">CompositeElementLite</td></tr></tbody></table><a id="Ext.CompositeElementLite-events"></a><h2>Public Events</h2><div class="no-members">This class has no public events.</div></div>