6 "desc" : "Create a \"View\" for an element based on a data model or UpdateManager and the supplied DomHelper template. \nThis class also supports single and multi selection modes. <br>\nCreate a data model bound view:\n <pre><code>\n var store = new Roo.data.Store(...);\n\n var view = new Roo.View({\n el : \"my-element\",\n tpl : '<div id=\"{0}\">{2} - {1}</div>', // auto create template\n \n singleSelect: true,\n selectedClass: \"ydataview-selected\",\n store: store\n });\n\n // listen for node click?\n view.on(\"click\", function(vw, index, node, e){\n alert('Node \"' + node.id + '\" at index: ' + index + \" was clicked.\");\n });\n\n // load XML data\n dataModel.load(\"foobar.xml\");\n </code></pre>\n For an example of creating a JSON/UpdateManager view, see {@link Roo.JsonView}.\n<br><br>\n<b>Note: The root of your template must be a single node. Table/row implementations may work but are not supported due to\nIE\"s limited insertion support with tables and Opera\"s faulty event bubbling.</b>\n\nNote: old style constructor is still suported (container, template, config)",
19 "desc" : "The config object",
26 "name" : "selectedClass",
28 "desc" : "The css class to add to selected nodes",
29 "memberOf" : "Roo.View",
35 "desc" : "list of events and functions to call for this object, \nFor example :\n<pre><code>\n listeners : { \n 'click' : function(e) {\n ..... \n } ,\n .... \n } \n </code></pre>",
36 "memberOf" : "Roo.util.Observable",
42 "desc" : "the named area of the template to use as the data area\n Works with domtemplates roo-name=\"name\"",
43 "memberOf" : "Roo.View",
49 "desc" : "to display on mask (default Loading)",
50 "memberOf" : "Roo.View",
54 "name" : "multiSelect",
56 "desc" : "Allow multiple selection",
57 "memberOf" : "Roo.View",
63 "desc" : "The empty text to show when nothing is loaded.",
64 "memberOf" : "Roo.View",
69 "type" : "Roo.data.Store",
70 "desc" : "Data store to load data from.",
71 "memberOf" : "Roo.View",
75 "name" : "toggleSelect",
77 "desc" : "- selecting",
78 "memberOf" : "Roo.View",
82 "name" : "singleSelect",
84 "desc" : "Allow single selection",
85 "memberOf" : "Roo.View",
91 "desc" : "- selecting",
92 "memberOf" : "Roo.View",
97 "type" : "String|Roo.Element",
98 "desc" : "The container element.",
99 "memberOf" : "Roo.View",
104 "type" : "String|Roo.Template",
105 "desc" : "The template used by this View",
106 "memberOf" : "Roo.View",
112 "name" : "getSelectedNodes",
113 "desc" : "Get the currently selected nodes.",
115 "isConstructor" : false,
117 "memberOf" : "Roo.View",
127 "desc" : "An array of HTMLElements"
133 "desc" : "Gets a range template nodes.",
135 "isConstructor" : false,
137 "memberOf" : "Roo.View",
144 "name" : "startIndex",
160 "desc" : "An array of nodes"
166 "desc" : "Selects nodes.",
168 "isConstructor" : false,
170 "memberOf" : "Roo.View",
178 "type" : "Array/HTMLElement/String/Number",
179 "desc" : "An HTMLElement template node, index of a template node, id of a template node or an array of any of those to select",
183 "name" : "keepExisting",
185 "desc" : "(optional) true to keep existing selections",
189 "name" : "suppressEvent",
191 "desc" : "(optional) true to skip firing of the selectionchange vent",
198 "name" : "clearSelections",
199 "desc" : "Clear all selections",
201 "isConstructor" : false,
203 "memberOf" : "Roo.View",
210 "name" : "suppressEvent",
212 "desc" : "(optional) true to skip firing of the selectionchange event",
219 "name" : "isSelected",
220 "desc" : "Returns true if the passed node is selected",
222 "isConstructor" : false,
224 "memberOf" : "Roo.View",
232 "type" : "HTMLElement/Number",
233 "desc" : "The node or node index",
247 "desc" : "Refreshes the view. - called by datachanged on the store. - do not call directly.",
249 "isConstructor" : false,
251 "memberOf" : "Roo.View",
260 "name" : "onBeforeLoad",
261 "desc" : "onbeforeLoad - masks the loading area.",
263 "isConstructor" : false,
265 "memberOf" : "Roo.View",
274 "name" : "getSelectedIndexes",
275 "desc" : "Get the indexes of the selected nodes.",
277 "isConstructor" : false,
279 "memberOf" : "Roo.View",
295 "desc" : "Finds the index of the passed node",
297 "isConstructor" : false,
299 "memberOf" : "Roo.View",
307 "type" : "HTMLElement/String/Number",
308 "desc" : "An HTMLElement template node, index of a template node or the id of a template node",
316 "desc" : "The index of the node or -1"
322 "desc" : "Returns the element this view is bound to.",
324 "isConstructor" : false,
326 "memberOf" : "Roo.View",
335 "type" : "Roo.Element",
342 "desc" : "Changes the data store this view uses and refresh the view.",
344 "isConstructor" : false,
346 "memberOf" : "Roo.View",
362 "name" : "refreshNode",
363 "desc" : "Refresh an individual node.",
365 "isConstructor" : false,
367 "memberOf" : "Roo.View",
383 "name" : "prepareData",
384 "desc" : "Function to override to reformat the data that is sent to\nthe template for each node.\nDEPRICATED - use the preparedata event handler.",
386 "isConstructor" : false,
388 "memberOf" : "Roo.View",
396 "type" : "Array/Object",
397 "desc" : "The raw data (array of colData for a data model bound view or\na JSON object for an UpdateManager bound view).",
404 "name" : "getSelectionCount",
405 "desc" : "Get the number of selected nodes.",
407 "isConstructor" : false,
409 "memberOf" : "Roo.View",
424 "name" : "findItemFromChild",
425 "desc" : "Returns the template node the passed child belongs to or null if it doesn't belong to one.",
427 "isConstructor" : false,
429 "memberOf" : "Roo.View",
437 "type" : "HTMLElement",
445 "type" : "HTMLElement",
446 "desc" : "The template node"
452 "desc" : "Unselects nodes.",
454 "isConstructor" : false,
456 "memberOf" : "Roo.View",
464 "type" : "Array/HTMLElement/String/Number",
465 "desc" : "An HTMLElement template node, index of a template node, id of a template node or an array of any of those to select",
469 "name" : "keepExisting",
471 "desc" : "(optional) true IGNORED (for campatibility with select)",
475 "name" : "suppressEvent",
477 "desc" : "(optional) true to skip firing of the selectionchange vent",
485 "desc" : "Gets a template node.",
487 "isConstructor" : false,
489 "memberOf" : "Roo.View",
497 "type" : "HTMLElement/String/Number",
498 "desc" : "An HTMLElement template node, index of a template node or the id of a template node",
505 "type" : "HTMLElement",
506 "desc" : "The node or null if it wasn't found"
511 "name" : "purgeListeners",
512 "desc" : "Removes all listeners for this object",
514 "isConstructor" : false,
516 "memberOf" : "Roo.util.Observable",
526 "desc" : "Appends an event handler to this element (shorthand for addListener)",
528 "isConstructor" : false,
530 "memberOf" : "Roo.util.Observable",
537 "name" : "eventName",
539 "desc" : "The type of event to listen for",
545 "desc" : "The method the event invokes",
551 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
557 "desc" : "(optional)",
565 "desc" : "Removes a listener (shorthand for removeListener)",
567 "isConstructor" : false,
569 "memberOf" : "Roo.util.Observable",
576 "name" : "eventName",
578 "desc" : "The type of event to listen for",
584 "desc" : "The handler to remove",
590 "desc" : "(optional) The scope (this object) for the handler",
597 "name" : "addEvents",
598 "desc" : "Used to define events on this Observable",
600 "isConstructor" : false,
602 "memberOf" : "Roo.util.Observable",
611 "desc" : "The object with the events defined",
618 "name" : "releaseCapture",
619 "desc" : "Removes <b>all</b> added captures from the Observable.",
621 "isConstructor" : false,
623 "memberOf" : "Roo.util.Observable",
631 "type" : "Observable",
632 "desc" : "The Observable to release",
639 "name" : "removeListener",
640 "desc" : "Removes a listener",
642 "isConstructor" : false,
644 "memberOf" : "Roo.util.Observable",
651 "name" : "eventName",
653 "desc" : "The type of event to listen for",
659 "desc" : "The handler to remove",
665 "desc" : "(optional) The scope (this object) for the handler",
672 "name" : "fireEvent",
673 "desc" : "Fires the specified event with the passed parameters (minus the event name).",
675 "isConstructor" : false,
677 "memberOf" : "Roo.util.Observable",
684 "name" : "eventName",
691 "type" : "Object...",
692 "desc" : "Variable number of parameters are passed to handlers",
700 "desc" : "returns false if any of the handlers return false otherwise it returns true"
705 "name" : "hasListener",
706 "desc" : "Checks to see if this object has any listeners for a specified event",
708 "isConstructor" : false,
710 "memberOf" : "Roo.util.Observable",
717 "name" : "eventName",
719 "desc" : "The name of the event to check for",
727 "desc" : "True if the event is being listened for, else false"
733 "desc" : "Starts capture on the specified Observable. All events will be passed\nto the supplied function with the event name + standard signature of the event\n<b>before</b> the event is fired. If the supplied function returns false,\nthe event will not fire.",
735 "isConstructor" : false,
737 "memberOf" : "Roo.util.Observable",
745 "type" : "Observable",
746 "desc" : "The Observable to capture",
752 "desc" : "The function to call",
758 "desc" : "(optional) The scope (this object) for the fn",
765 "name" : "addListener",
766 "desc" : "Appends an event handler to this component",
768 "isConstructor" : false,
770 "memberOf" : "Roo.util.Observable",
777 "name" : "eventName",
779 "desc" : "The type of event to listen for",
785 "desc" : "The method the event invokes",
791 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
797 "desc" : "(optional) An object containing handler configuration\nproperties. This may contain any of the following properties:<ul>\n<li>scope {Object} The scope in which to execute the handler function. The handler function's \"this\" context.</li>\n<li>delay {Number} The number of milliseconds to delay the invocation of the handler after te event fires.</li>\n<li>single {Boolean} True to add a handler to handle just the next firing of the event, and then remove itself.</li>\n<li>buffer {Number} Causes the handler to be scheduled to run in an {@link Roo.util.DelayedTask} delayed\nby the specified number of milliseconds. If the event fires again within that time, the original\nhandler is <em>not</em> invoked, but the new handler is scheduled in its place.</li>\n</ul><br>\n<p>\n<b>Combining Options</b><br>\nUsing the options argument, it is possible to combine different types of listeners:<br>\n<br>\nA normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)\n\t\t<pre><code>\n\t\tel.on('click', this.onClick, this, {\n \t\t\tsingle: true,\n \t\tdelay: 100,\n \t\tforumId: 4\n\t\t});\n\t\t</code></pre>\n<p>\n<b>Attaching multiple handlers in 1 call</b><br>\nThe method also allows for a single argument to be passed which is a config object containing properties\nwhich specify multiple handlers.\n<pre><code>\n\t\tel.on({\n\t\t\t'click': {\n \t\tfn: this.onClick,\n \t\tscope: this,\n \t\tdelay: 100\n \t\t}, \n \t\t'mouseover': {\n \t\tfn: this.onMouseOver,\n \t\tscope: this\n \t\t},\n \t\t'mouseout': {\n \t\tfn: this.onMouseOut,\n \t\tscope: this\n \t\t}\n\t\t});\n\t\t</code></pre>\n<p>\nOr a shorthand syntax which passes the same scope object to all handlers:\n \t<pre><code>\n\t\tel.on({\n\t\t\t'click': this.onClick,\n \t\t'mouseover': this.onMouseOver,\n \t\t'mouseout': this.onMouseOut,\n \t\tscope: this\n\t\t});\n\t\t</code></pre>",
807 "desc" : "Fires when a template node is double clicked.",
808 "memberOf" : "Roo.View",
823 "desc" : "The index of the target node",
828 "type" : "HTMLElement",
829 "desc" : "The target node",
834 "type" : "Roo.EventObject",
835 "desc" : "The raw event object",
842 "name" : "preparedata",
843 "desc" : "Fires on every row to render, to allow you to change the data.",
844 "memberOf" : "Roo.View",
859 "desc" : "to be rendered (change this)",
866 "name" : "selectionchange",
867 "desc" : "Fires when the selected nodes change.",
868 "memberOf" : "Roo.View",
881 "name" : "selections",
883 "desc" : "Array of the selected nodes",
890 "name" : "beforeselect",
891 "desc" : "Fires before a selection is made. If any handlers return false, the selection is cancelled.",
892 "memberOf" : "Roo.View",
906 "type" : "HTMLElement",
907 "desc" : "The node to be selected",
911 "name" : "selections",
913 "desc" : "Array of currently selected nodes",
920 "name" : "beforeclick",
921 "desc" : "Fires before a click is processed. Returns false to cancel the default action.",
922 "memberOf" : "Roo.View",
937 "desc" : "The index of the target node",
942 "type" : "HTMLElement",
943 "desc" : "The target node",
948 "type" : "Roo.EventObject",
949 "desc" : "The raw event object",
957 "desc" : "Fires when a template node is clicked.",
958 "memberOf" : "Roo.View",
973 "desc" : "The index of the target node",
978 "type" : "HTMLElement",
979 "desc" : "The target node",
984 "type" : "Roo.EventObject",
985 "desc" : "The raw event object",
992 "name" : "contextmenu",
993 "desc" : "Fires when a template node is right clicked.",
994 "memberOf" : "Roo.View",
1002 "type" : "Roo.View",
1004 "isOptional" : false
1009 "desc" : "The index of the target node",
1010 "isOptional" : false
1014 "type" : "HTMLElement",
1015 "desc" : "The target node",
1016 "isOptional" : false
1020 "type" : "Roo.EventObject",
1021 "desc" : "The raw event object",
1022 "isOptional" : false