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.View</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.View-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35 <a class="inner-link" href="#Roo.View-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36 <a class="inner-link" href="#Roo.View-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37 <a class="inner-link" href="#Roo.View-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.View
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_View.js.html">Roo/View.js</a>.
69 <tr><td class="label">Class:</td><td class="hd-info">View</td></tr>
72 <tr><td class="label">Subclasses:</td><td class="hd-info">
73 <a href="./Roo.JsonView.html#constructor" roo:cls="Roo.JsonView.html#constructor">Roo.JsonView</a>
81 <tr><td class="label">Extends:</td><td class="hd-info">
82 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
90 <!-- ============================== class summary ========================== -->
91 <div class="description">
92 Create a "View" for an element based on a data model or UpdateManager and the supplied DomHelper template. <br/>This class also supports single and multi selection modes. <br><br/>Create a data model bound view:<br/> <pre><code><br/> var store = new Roo.data.Store(...);<br/><br/> var view = new Roo.View("my-element",<br/> '<div id="{0}">{2} - {1}</div>', // auto create template<br/> {<br/> singleSelect: true,<br/> selectedClass: "ydataview-selected",<br/> store: store<br/> });<br/><br/> // listen for node click?<br/> view.on("click", function(vw, index, node, e){<br/> alert('Node "' + node.id + '" at index: ' + index + " was clicked.");<br/> });<br/><br/> // load XML data<br/> dataModel.load("foobar.xml");<br/> </code></pre><br/> For an example of creating a JSON/UpdateManager view, see {<b>link</b> Roo.JsonView}.<br/><br><br><br/><b>Note: The root of your template must be a single node. Table/row implementations may work but are not supported due to<br/>IE"s limited insertion support with tables and Opera"s faulty event bubbling.</b>
96 <!-- ============================== Class comment block... ========================== -->
98 <div class="comments">
99 <b>Class Comments / Notes</B> =>
100 <u onclick="parent.CommentDialog.showCommentId = 'Roo.View';">[Add Your comment/notes about this class]</u>
102 <iframe frameborder="0" id="comments-Roo" style="border: none;width:100%;"
103 src="/blog.php/GtkDjsComments/Roo.View.html"></iframe>
108 <!-- ============================== config options ========================== -->
113 <div class="hr"></div>
114 <a id="Roo.View-configs"></a>
120 <table cellspacing="0" class="member-table">
121 <caption>Config Options (Usually are also Properties)</caption>
125 <th class="sig-header" colspan="2">Options</th>
127 <th class="msource-header">Defined By</th>
134 <tr class="config-row expandable config-row-alt0">
135 <td class="micon"><a class="exi" href="#expand"> </a></td>
138 <a id="Roo.util.Observable-cfg-listeners" name=".listeners"></a>
139 <div class="fixedFont">
140 <b class="itemname">listeners</b> : <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a>
146 <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>
150 <div class="long">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></div>
158 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
174 <!-- ============================== public properties ==================== -->
178 <a id="Roo.View-props"></a>
184 <table cellspacing="0" class="member-table">
185 <caption class="Empty">Public Properties - Has None</caption>
191 <!-- ============================== methods summary / details ======================== -->
194 <a id="Roo.View-methods"></a>
195 <!-- constructor?? -->
202 <!-- then dynamics first -->
209 <table cellspacing="0" class="member-table">
210 <caption>Public Methods</caption>
212 <th class="sig-header" colspan="2">Method</th>
213 <th class="msource-header">Defined By</th>
223 <tr class="method-row config-row-alt0 expandable notInherited">
224 <td class="micon"><a class="exi" href="#expand"> </a></td>
228 <a id="Roo-method-View" name=".View"></a>
229 <div class="fixedFont">
230 <span class="attributes">new <B>Roo.</B></span><b class="itemname">View</b>
232 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Element <B><i>container</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/DomHelper.Template <B><i>tpl</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>config</i></B>)
240 <div class="short">Create a new Roo.View</div>
247 Create a new Roo.View
250 <dl class="detailList">
251 <dt class="heading">Parameters:</dt>
254 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Element</span> <b>container</b>
257 <dd>The container element where the view is to be rendered.</dd>
260 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/DomHelper.Template</span> <b>tpl</b>
263 <dd>The rendering template or a string to create a template with</dd>
266 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>config</b>
269 <dd>The config object</dd>
293 <tr class="method-row config-row-alt1 expandable">
294 <td class="micon"><a class="exi" href="#expand"> </a></td>
298 <a id="Roo.util.Observable-method-addEvents" name=".addEvents"></a>
299 <div class="fixedFont">
300 <span class="attributes"></span><b class="itemname">addEvents</b>
302 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>object</i></B>)
309 <div class="short">Used to define events on this Observable</div>
315 Used to define events on this Observable
322 <dl class="detailList">
323 <dt class="heading">Parameters:</dt>
326 <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>
329 <dd>The object with the events defined</dd>
349 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
355 <tr class="method-row config-row-alt0 expandable">
356 <td class="micon"><a class="exi" href="#expand"> </a></td>
360 <a id="Roo.util.Observable-method-addListener" name=".addListener"></a>
361 <div class="fixedFont">
362 <span class="attributes"></span><b class="itemname">addListener</b>
364 (<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>)
371 <div class="short">Appends an event handler to this component</div>
377 Appends an event handler to this component
384 <dl class="detailList">
385 <dt class="heading">Parameters:</dt>
388 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
391 <dd>The type of event to listen for</dd>
394 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
397 <dd>The method the event invokes</dd>
400 <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>
403 <dd>(optional) The scope in which to execute the handler<br/>function. The handler function's "this" context.</dd>
406 <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>
409 <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>
429 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
435 <tr class="method-row config-row-alt1 expandable notInherited">
436 <td class="micon"><a class="exi" href="#expand"> </a></td>
440 <a id="Roo.View-method-clearSelections" name=".clearSelections"></a>
441 <div class="fixedFont">
442 <span class="attributes"></span><b class="itemname">clearSelections</b>
444 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>suppressEvent</i></B>)
451 <div class="short">Clear all selections</div>
464 <dl class="detailList">
465 <dt class="heading">Parameters:</dt>
468 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>suppressEvent</b>
471 <dd>(optional) true to skip firing of the selectionchange event</dd>
497 <tr class="method-row config-row-alt0 expandable notInherited">
498 <td class="micon"><a class="exi" href="#expand"> </a></td>
502 <a id="Roo.View-method-findItemFromChild" name=".findItemFromChild"></a>
503 <div class="fixedFont">
504 <span class="attributes"></span><b class="itemname">findItemFromChild</b>
506 (<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a> <B><i>node</i></B>)
512 <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>
521 <div class="short">Returns the template node the passed child belongs to or null if it doesn't belong to one.</div>
527 Returns the template node the passed child belongs to or null if it doesn't belong to one.
534 <dl class="detailList">
535 <dt class="heading">Parameters:</dt>
538 <span class="fixedFont"><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a></span> <b>node</b>
549 <dl class="detailList">
550 <dt class="heading">Returns:</dt>
552 <dd><span class="fixedFont"><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a></span> The template node</dd>
574 <tr class="method-row config-row-alt1 expandable">
575 <td class="micon"><a class="exi" href="#expand"> </a></td>
579 <a id="Roo.util.Observable-method-fireEvent" name=".fireEvent"></a>
580 <div class="fixedFont">
581 <span class="attributes"></span><b class="itemname">fireEvent</b>
583 (<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>)
589 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
598 <div class="short">Fires the specified event with the passed parameters (minus the event name).</div>
604 Fires the specified event with the passed parameters (minus the event name).
611 <dl class="detailList">
612 <dt class="heading">Parameters:</dt>
615 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
621 <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>
624 <dd>Variable number of parameters are passed to handlers</dd>
632 <dl class="detailList">
633 <dt class="heading">Returns:</dt>
635 <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>
651 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
657 <tr class="method-row config-row-alt0 expandable notInherited">
658 <td class="micon"><a class="exi" href="#expand"> </a></td>
662 <a id="Roo.View-method-getEl" name=".getEl"></a>
663 <div class="fixedFont">
664 <span class="attributes"></span><b class="itemname">getEl</b>
672 <a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a>
681 <div class="short">Returns the element this view is bound to.</div>
687 Returns the element this view is bound to.
698 <dl class="detailList">
699 <dt class="heading">Returns:</dt>
701 <dd><span class="fixedFont"><a href="./Roo.Element.html#constructor" roo:cls="Roo.Element.html#constructor">Roo.Element</a></span> </dd>
723 <tr class="method-row config-row-alt1 expandable notInherited">
724 <td class="micon"><a class="exi" href="#expand"> </a></td>
728 <a id="Roo.View-method-getNode" name=".getNode"></a>
729 <div class="fixedFont">
730 <span class="attributes"></span><b class="itemname">getNode</b>
732 (<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/String/Number <B><i>nodeInfo</i></B>)
738 <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>
747 <div class="short">Gets a template node.</div>
753 Gets a template node.
760 <dl class="detailList">
761 <dt class="heading">Parameters:</dt>
764 <span class="fixedFont"><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/String/Number</span> <b>nodeInfo</b>
767 <dd>An HTMLElement template node, index of a template node or the id of a template node</dd>
775 <dl class="detailList">
776 <dt class="heading">Returns:</dt>
778 <dd><span class="fixedFont"><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a></span> The node or null if it wasn't found</dd>
800 <tr class="method-row config-row-alt0 expandable notInherited">
801 <td class="micon"><a class="exi" href="#expand"> </a></td>
805 <a id="Roo.View-method-getNodes" name=".getNodes"></a>
806 <div class="fixedFont">
807 <span class="attributes"></span><b class="itemname">getNodes</b>
809 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>startIndex</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>endIndex</i></B>)
815 <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>
824 <div class="short">Gets a range template nodes.</div>
830 Gets a range template nodes.
837 <dl class="detailList">
838 <dt class="heading">Parameters:</dt>
841 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>startIndex</b>
847 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>endIndex</b>
858 <dl class="detailList">
859 <dt class="heading">Returns:</dt>
861 <dd><span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span> An array of nodes</dd>
883 <tr class="method-row config-row-alt1 expandable notInherited">
884 <td class="micon"><a class="exi" href="#expand"> </a></td>
888 <a id="Roo.View-method-getSelectedIndexes" name=".getSelectedIndexes"></a>
889 <div class="fixedFont">
890 <span class="attributes"></span><b class="itemname">getSelectedIndexes</b>
898 <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>
907 <div class="short">Get the indexes of the selected nodes.</div>
913 Get the indexes of the selected nodes.
924 <dl class="detailList">
925 <dt class="heading">Returns:</dt>
927 <dd><span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span> </dd>
949 <tr class="method-row config-row-alt0 expandable notInherited">
950 <td class="micon"><a class="exi" href="#expand"> </a></td>
954 <a id="Roo.View-method-getSelectedNodes" name=".getSelectedNodes"></a>
955 <div class="fixedFont">
956 <span class="attributes"></span><b class="itemname">getSelectedNodes</b>
964 <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>
973 <div class="short">Get the currently selected nodes.</div>
979 Get the currently selected nodes.
990 <dl class="detailList">
991 <dt class="heading">Returns:</dt>
993 <dd><span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span> An array of HTMLElements</dd>
1007 <td class="msource">
1015 <tr class="method-row config-row-alt1 expandable notInherited">
1016 <td class="micon"><a class="exi" href="#expand"> </a></td>
1020 <a id="Roo.View-method-getSelectionCount" name=".getSelectionCount"></a>
1021 <div class="fixedFont">
1022 <span class="attributes"></span><b class="itemname">getSelectionCount</b>
1030 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
1039 <div class="short">Get the number of selected nodes.</div>
1045 Get the number of selected nodes.
1056 <dl class="detailList">
1057 <dt class="heading">Returns:</dt>
1059 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> </dd>
1073 <td class="msource">
1081 <tr class="method-row config-row-alt0 expandable">
1082 <td class="micon"><a class="exi" href="#expand"> </a></td>
1086 <a id="Roo.util.Observable-method-hasListener" name=".hasListener"></a>
1087 <div class="fixedFont">
1088 <span class="attributes"></span><b class="itemname">hasListener</b>
1090 (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>eventName</i></B>)
1096 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
1105 <div class="short">Checks to see if this object has any listeners for a specified event</div>
1111 Checks to see if this object has any listeners for a specified event
1118 <dl class="detailList">
1119 <dt class="heading">Parameters:</dt>
1122 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1125 <dd>The name of the event to check for</dd>
1133 <dl class="detailList">
1134 <dt class="heading">Returns:</dt>
1136 <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>
1150 <td class="msource">
1152 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1158 <tr class="method-row config-row-alt1 expandable notInherited">
1159 <td class="micon"><a class="exi" href="#expand"> </a></td>
1163 <a id="Roo.View-method-indexOf" name=".indexOf"></a>
1164 <div class="fixedFont">
1165 <span class="attributes"></span><b class="itemname">indexOf</b>
1167 (<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/String/Number <B><i>nodeInfo</i></B>)
1173 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
1182 <div class="short">Finds the index of the passed node</div>
1188 Finds the index of the passed node
1195 <dl class="detailList">
1196 <dt class="heading">Parameters:</dt>
1199 <span class="fixedFont"><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/String/Number</span> <b>nodeInfo</b>
1202 <dd>An HTMLElement template node, index of a template node or the id of a template node</dd>
1210 <dl class="detailList">
1211 <dt class="heading">Returns:</dt>
1213 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> The index of the node or -1</dd>
1227 <td class="msource">
1235 <tr class="method-row config-row-alt0 expandable notInherited">
1236 <td class="micon"><a class="exi" href="#expand"> </a></td>
1240 <a id="Roo.View-method-isSelected" name=".isSelected"></a>
1241 <div class="fixedFont">
1242 <span class="attributes"></span><b class="itemname">isSelected</b>
1244 (<a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/Number <B><i>node</i></B>)
1250 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
1259 <div class="short">Returns true if the passed node is selected</div>
1265 Returns true if the passed node is selected
1272 <dl class="detailList">
1273 <dt class="heading">Parameters:</dt>
1276 <span class="fixedFont"><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a>/Number</span> <b>node</b>
1279 <dd>The node or node index</dd>
1287 <dl class="detailList">
1288 <dt class="heading">Returns:</dt>
1290 <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> </dd>
1304 <td class="msource">
1312 <tr class="method-row config-row-alt1 expandable">
1313 <td class="micon"><a class="exi" href="#expand"> </a></td>
1317 <a id="Roo.util.Observable-method-on" name=".on"></a>
1318 <div class="fixedFont">
1319 <span class="attributes"></span><b class="itemname">on</b>
1321 (<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>)
1328 <div class="short">Appends an event handler to this element (shorthand for addListener)</div>
1334 Appends an event handler to this element (shorthand for addListener)
1341 <dl class="detailList">
1342 <dt class="heading">Parameters:</dt>
1345 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1348 <dd>The type of event to listen for</dd>
1351 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
1354 <dd>The method the event invokes</dd>
1357 <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>
1360 <dd>(optional) The scope in which to execute the handler<br/>function. The handler function's "this" context.</dd>
1363 <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>
1384 <td class="msource">
1386 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1392 <tr class="method-row config-row-alt0 expandable notInherited">
1393 <td class="micon"><a class="exi" href="#expand"> </a></td>
1397 <a id="Roo.View-method-prepareData" name=".prepareData"></a>
1398 <div class="fixedFont">
1399 <span class="attributes"></span><b class="itemname">prepareData</b>
1401 (<a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>/Object <B><i>data</i></B>)
1408 <div class="short">Function to override to reformat the data that is sent to<br/>the template for each node.</div>
1414 Function to override to reformat the data that is sent to<br/>the template for each node.
1421 <dl class="detailList">
1422 <dt class="heading">Parameters:</dt>
1425 <span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>/Object</span> <b>data</b>
1428 <dd>The raw data (array of colData for a data model bound view or<br/>a JSON object for an UpdateManager bound view).</dd>
1446 <td class="msource">
1454 <tr class="method-row config-row-alt1 expandable">
1455 <td class="micon"><a class="exi" href="#expand"> </a></td>
1459 <a id="Roo.util.Observable-method-purgeListeners" name=".purgeListeners"></a>
1460 <div class="fixedFont">
1461 <span class="attributes"></span><b class="itemname">purgeListeners</b>
1470 <div class="short">Removes all listeners for this object</div>
1476 Removes all listeners for this object
1497 <td class="msource">
1499 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1505 <tr class="method-row config-row-alt0 expandable notInherited">
1506 <td class="micon"><a class="exi" href="#expand"> </a></td>
1510 <a id="Roo.View-method-refresh" name=".refresh"></a>
1511 <div class="fixedFont">
1512 <span class="attributes"></span><b class="itemname">refresh</b>
1521 <div class="short">Refreshes the view.</div>
1548 <td class="msource">
1556 <tr class="method-row config-row-alt1 expandable notInherited">
1557 <td class="micon"><a class="exi" href="#expand"> </a></td>
1561 <a id="Roo.View-method-refreshNode" name=".refreshNode"></a>
1562 <div class="fixedFont">
1563 <span class="attributes"></span><b class="itemname">refreshNode</b>
1565 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>)
1572 <div class="short">Refresh an individual node.</div>
1578 Refresh an individual node.
1585 <dl class="detailList">
1586 <dt class="heading">Parameters:</dt>
1589 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
1610 <td class="msource">
1618 <tr class="method-row config-row-alt0 expandable">
1619 <td class="micon"><a class="exi" href="#expand"> </a></td>
1623 <a id="Roo.util.Observable-method-removeListener" name=".removeListener"></a>
1624 <div class="fixedFont">
1625 <span class="attributes"></span><b class="itemname">removeListener</b>
1627 (<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>)
1634 <div class="short">Removes a listener</div>
1647 <dl class="detailList">
1648 <dt class="heading">Parameters:</dt>
1651 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1654 <dd>The type of event to listen for</dd>
1657 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
1660 <dd>The handler to remove</dd>
1663 <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>
1666 <dd>(optional) The scope (this object) for the handler</dd>
1684 <td class="msource">
1686 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1692 <tr class="method-row config-row-alt1 expandable notInherited">
1693 <td class="micon"><a class="exi" href="#expand"> </a></td>
1697 <a id="Roo.View-method-select" name=".select"></a>
1698 <div class="fixedFont">
1699 <span class="attributes"></span><b class="itemname">select</b>
1701 (<a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>/HTMLElement/String/Number <B><i>nodeInfo</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>keepExisting</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>suppressEvent</i></B>)
1708 <div class="short">Selects nodes.</div>
1721 <dl class="detailList">
1722 <dt class="heading">Parameters:</dt>
1725 <span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>/HTMLElement/String/Number</span> <b>nodeInfo</b>
1728 <dd>An HTMLElement template node, index of a template node, id of a template node or an array of any of those to select</dd>
1731 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>keepExisting</b>
1734 <dd>(optional) true to keep existing selections</dd>
1737 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>suppressEvent</b>
1740 <dd>(optional) true to skip firing of the selectionchange vent</dd>
1758 <td class="msource">
1766 <tr class="method-row config-row-alt0 expandable notInherited">
1767 <td class="micon"><a class="exi" href="#expand"> </a></td>
1771 <a id="Roo.View-method-setStore" name=".setStore"></a>
1772 <div class="fixedFont">
1773 <span class="attributes"></span><b class="itemname">setStore</b>
1775 (Store <B><i>store</i></B>)
1782 <div class="short">Changes the data store this view uses and refresh the view.</div>
1788 Changes the data store this view uses and refresh the view.
1795 <dl class="detailList">
1796 <dt class="heading">Parameters:</dt>
1799 <span class="fixedFont">Store</span> <b>store</b>
1820 <td class="msource">
1828 <tr class="method-row config-row-alt1 expandable">
1829 <td class="micon"><a class="exi" href="#expand"> </a></td>
1833 <a id="Roo.util.Observable-method-un" name=".un"></a>
1834 <div class="fixedFont">
1835 <span class="attributes"></span><b class="itemname">un</b>
1837 (<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>)
1844 <div class="short">Removes a listener (shorthand for removeListener)</div>
1850 Removes a listener (shorthand for removeListener)
1857 <dl class="detailList">
1858 <dt class="heading">Parameters:</dt>
1861 <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>eventName</b>
1864 <dd>The type of event to listen for</dd>
1867 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>handler</b>
1870 <dd>The handler to remove</dd>
1873 <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>
1876 <dd>(optional) The scope (this object) for the handler</dd>
1894 <td class="msource">
1896 <a href="./Roo.util.Observable.html#constructor" roo:cls="Roo.util.Observable.html#constructor">Roo.util.Observable</a>
1905 <!-- ============================== events summary / details ======================== -->
1908 <a id="Roo.View-events"></a>
1917 <table cellspacing="0" class="member-table">
1918 <caption>Events</caption>
1921 <th class="sig-header" colspan="2">Event</th>
1922 <th class="msource-header">Defined By</th>
1931 <tr class="method-row expandable config-row-alt0 notInherited">
1932 <td class="micon"><a class="exi" href="#expand"> </a></td>
1935 <a id="Roo.View-event-*beforeclick"></a>
1937 <div class="fixedFont">
1938 <b class="itemname">beforeclick</b> (<a href="./Roo.View.html#constructor" roo:cls="Roo.View.html#constructor">Roo.View</a> <B><i>this</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>, <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a> <B><i>node</i></B>, <a href="./Roo.EventObject.html#constructor" roo:cls="Roo.EventObject.html#constructor">Roo.EventObject</a> <B><i>e</i></B>)
1944 <div class="short">Fires before a click is processed.
1950 Fires before a click is processed. Returns false to cancel the default action.
1956 <dl class="detailList">
1957 <dt class="heading">Parameters:</dt>
1960 <span class="fixedFont"><a href="./Roo.View.html#constructor" roo:cls="Roo.View.html#constructor">Roo.View</a></span> <b>this</b>
1966 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
1969 <dd>The index of the target node</dd>
1972 <span class="fixedFont"><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a></span> <b>node</b>
1975 <dd>The target node</dd>
1978 <span class="fixedFont"><a href="./Roo.EventObject.html#constructor" roo:cls="Roo.EventObject.html#constructor">Roo.EventObject</a></span> <b>e</b>
1981 <dd>The raw event object</dd>
1999 <td class="msource">
2004 <tr class="method-row expandable config-row-alt1 notInherited">
2005 <td class="micon"><a class="exi" href="#expand"> </a></td>
2008 <a id="Roo.View-event-*beforeselect"></a>
2010 <div class="fixedFont">
2011 <b class="itemname">beforeselect</b> (<a href="./Roo.View.html#constructor" roo:cls="Roo.View.html#constructor">Roo.View</a> <B><i>this</i></B>, <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a> <B><i>node</i></B>, <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a> <B><i>selections</i></B>)
2017 <div class="short">Fires before a selection is made.
2023 Fires before a selection is made. If any handlers return false, the selection is cancelled.
2029 <dl class="detailList">
2030 <dt class="heading">Parameters:</dt>
2033 <span class="fixedFont"><a href="./Roo.View.html#constructor" roo:cls="Roo.View.html#constructor">Roo.View</a></span> <b>this</b>
2039 <span class="fixedFont"><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a></span> <b>node</b>
2042 <dd>The node to be selected</dd>
2045 <span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span> <b>selections</b>
2048 <dd>Array of currently selected nodes</dd>
2066 <td class="msource">
2071 <tr class="method-row expandable config-row-alt0 notInherited">
2072 <td class="micon"><a class="exi" href="#expand"> </a></td>
2075 <a id="Roo.View-event-*click"></a>
2077 <div class="fixedFont">
2078 <b class="itemname">click</b> (<a href="./Roo.View.html#constructor" roo:cls="Roo.View.html#constructor">Roo.View</a> <B><i>this</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>, <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a> <B><i>node</i></B>, <a href="./Roo.EventObject.html#constructor" roo:cls="Roo.EventObject.html#constructor">Roo.EventObject</a> <B><i>e</i></B>)
2084 <div class="short">Fires when a template node is clicked.
2090 Fires when a template node is clicked.
2096 <dl class="detailList">
2097 <dt class="heading">Parameters:</dt>
2100 <span class="fixedFont"><a href="./Roo.View.html#constructor" roo:cls="Roo.View.html#constructor">Roo.View</a></span> <b>this</b>
2106 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
2109 <dd>The index of the target node</dd>
2112 <span class="fixedFont"><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a></span> <b>node</b>
2115 <dd>The target node</dd>
2118 <span class="fixedFont"><a href="./Roo.EventObject.html#constructor" roo:cls="Roo.EventObject.html#constructor">Roo.EventObject</a></span> <b>e</b>
2121 <dd>The raw event object</dd>
2139 <td class="msource">
2144 <tr class="method-row expandable config-row-alt1 notInherited">
2145 <td class="micon"><a class="exi" href="#expand"> </a></td>
2148 <a id="Roo.View-event-*contextmenu"></a>
2150 <div class="fixedFont">
2151 <b class="itemname">contextmenu</b> (<a href="./Roo.View.html#constructor" roo:cls="Roo.View.html#constructor">Roo.View</a> <B><i>this</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>, <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a> <B><i>node</i></B>, <a href="./Roo.EventObject.html#constructor" roo:cls="Roo.EventObject.html#constructor">Roo.EventObject</a> <B><i>e</i></B>)
2157 <div class="short">Fires when a template node is right clicked.
2163 Fires when a template node is right clicked.
2169 <dl class="detailList">
2170 <dt class="heading">Parameters:</dt>
2173 <span class="fixedFont"><a href="./Roo.View.html#constructor" roo:cls="Roo.View.html#constructor">Roo.View</a></span> <b>this</b>
2179 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
2182 <dd>The index of the target node</dd>
2185 <span class="fixedFont"><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a></span> <b>node</b>
2188 <dd>The target node</dd>
2191 <span class="fixedFont"><a href="./Roo.EventObject.html#constructor" roo:cls="Roo.EventObject.html#constructor">Roo.EventObject</a></span> <b>e</b>
2194 <dd>The raw event object</dd>
2212 <td class="msource">
2217 <tr class="method-row expandable config-row-alt0 notInherited">
2218 <td class="micon"><a class="exi" href="#expand"> </a></td>
2221 <a id="Roo.View-event-*dblclick"></a>
2223 <div class="fixedFont">
2224 <b class="itemname">dblclick</b> (<a href="./Roo.View.html#constructor" roo:cls="Roo.View.html#constructor">Roo.View</a> <B><i>this</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>index</i></B>, <a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a> <B><i>node</i></B>, <a href="./Roo.EventObject.html#constructor" roo:cls="Roo.EventObject.html#constructor">Roo.EventObject</a> <B><i>e</i></B>)
2230 <div class="short">Fires when a template node is double clicked.
2236 Fires when a template node is double clicked.
2242 <dl class="detailList">
2243 <dt class="heading">Parameters:</dt>
2246 <span class="fixedFont"><a href="./Roo.View.html#constructor" roo:cls="Roo.View.html#constructor">Roo.View</a></span> <b>this</b>
2252 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>index</b>
2255 <dd>The index of the target node</dd>
2258 <span class="fixedFont"><a href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-58190037">HTMLElement</a></span> <b>node</b>
2261 <dd>The target node</dd>
2264 <span class="fixedFont"><a href="./Roo.EventObject.html#constructor" roo:cls="Roo.EventObject.html#constructor">Roo.EventObject</a></span> <b>e</b>
2267 <dd>The raw event object</dd>
2285 <td class="msource">
2290 <tr class="method-row expandable config-row-alt1 notInherited">
2291 <td class="micon"><a class="exi" href="#expand"> </a></td>
2294 <a id="Roo.View-event-*selectionchange"></a>
2296 <div class="fixedFont">
2297 <b class="itemname">selectionchange</b> (<a href="./Roo.View.html#constructor" roo:cls="Roo.View.html#constructor">Roo.View</a> <B><i>this</i></B>, <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a> <B><i>selections</i></B>)
2303 <div class="short">Fires when the selected nodes change.
2309 Fires when the selected nodes change.
2315 <dl class="detailList">
2316 <dt class="heading">Parameters:</dt>
2319 <span class="fixedFont"><a href="./Roo.View.html#constructor" roo:cls="Roo.View.html#constructor">Roo.View</a></span> <b>this</b>
2325 <span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span> <b>selections</b>
2328 <dd>Array of the selected nodes</dd>
2346 <td class="msource">
2358 <!-- ============================== footer ================================= -->
2359 <div class="fineprint" style="clear:both">
2361 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Mon Jul 19 2010 11:50:46 GMT+0800 (HKT)
2363 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>