2 "name" : "Roo.JsonView",
7 "desc" : "Shortcut class to create a JSON + {@link Roo.UpdateManager} template view. Usage:\n<pre><code>\nvar view = new Roo.JsonView({\n container: \"my-element\",\n tpl: '<div id=\"{id}\">{foo} - {bar}</div>', // auto create template\n multiSelect: true, \n jsonRoot: \"data\" \n});\n\n// listen for node click?\nview.on(\"click\", function(vw, index, node, e){\n alert('Node \"' + node.id + '\" at index: ' + index + \" was clicked.\");\n});\n\n// direct load of JSON data\nview.load(\"foobar.php\");\n\n// Example from my blog list\nvar tpl = new Roo.Template(\n '<div class=\"entry\">' +\n '<a class=\"entry-title\" href=\"{link}\">{title}</a>' +\n \"<h4>{date} by {author} | {comments} Comments</h4>{description}\" +\n \"</div><hr />\"\n);\n\nvar moreView = new Roo.JsonView({\n container : \"entry-list\", \n template : tpl,\n jsonRoot: \"posts\"\n});\nmoreView.on(\"beforerender\", this.sortEntries, this);\nmoreView.load({\n url: \"/blog/get-posts.php\",\n params: \"allposts=true\",\n text: \"Loading Blog Entries...\"\n});\n</code></pre>\n\nNote: old code is supported with arguments : (container, template, config)",
13 "name" : "selectedClass",
15 "desc" : "The css class to add to selected nodes",
16 "memberOf" : "Roo.View",
23 "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>",
24 "memberOf" : "Roo.util.Observable",
31 "desc" : "the named area of the template to use as the data area\n Works with domtemplates roo-name=\"name\"",
32 "memberOf" : "Roo.View",
39 "desc" : "to display on mask (default Loading)",
40 "memberOf" : "Roo.View",
45 "name" : "multiSelect",
47 "desc" : "Allow multiple selection",
48 "memberOf" : "Roo.View",
55 "desc" : "The empty text to show when nothing is loaded.",
56 "memberOf" : "Roo.View",
62 "type" : "Roo.data.Store",
63 "desc" : "Data store to load data from.",
64 "memberOf" : "Roo.View",
69 "name" : "toggleSelect",
71 "desc" : "- selecting",
72 "memberOf" : "Roo.View",
77 "name" : "singleSelect",
79 "desc" : "Allow single selection",
80 "memberOf" : "Roo.View",
87 "desc" : "- selecting",
88 "memberOf" : "Roo.View",
94 "type" : "String|Roo.Element",
95 "desc" : "The container element.",
96 "memberOf" : "Roo.View",
102 "type" : "String|Roo.Template",
103 "desc" : "The template used by this View",
104 "memberOf" : "Roo.View",
111 "name" : "getNodeData",
112 "desc" : "Returns the JSON object for the specified node(s)",
114 "isConstructor" : false,
116 "memberOf" : "Roo.JsonView",
124 "type" : "HTMLElement/Array",
125 "desc" : "The node or an array of nodes",
132 "type" : "Object/Array",
133 "desc" : "If you pass in an array, you get an array back, otherwise\nyou get the JSON object for the node"
139 "desc" : "Get the number of records in the current JSON dataset",
141 "isConstructor" : false,
143 "memberOf" : "Roo.JsonView",
160 "desc" : "Sorts the data for this view and refreshes it.",
162 "isConstructor" : false,
164 "memberOf" : "Roo.JsonView",
173 "desc" : "A property on your JSON objects to sort on",
177 "name" : "direction",
179 "desc" : "(optional) \"desc\" or \"asc\" (defaults to \"asc\")",
185 "desc" : "(optional) A function to call to convert the data to a sortable value.",
194 "desc" : "Refreshes the view.",
196 "isConstructor" : false,
198 "memberOf" : "Roo.JsonView",
210 "desc" : "Filter by a function. The passed function will be called with each\nobject in the current dataset. If the function returns true the value is kept,\notherwise it is filtered.",
212 "isConstructor" : false,
214 "memberOf" : "Roo.JsonView",
229 "desc" : "(optional) The scope of the function (defaults to this JsonView)",
237 "name" : "clearFilter",
238 "desc" : "Clears the current filter.",
240 "isConstructor" : false,
242 "memberOf" : "Roo.JsonView",
254 "desc" : "Performs an async HTTP request, and loads the JSON from the response. If <i>params</i> are specified it uses POST, otherwise it uses GET.",
256 "isConstructor" : false,
258 "memberOf" : "Roo.JsonView",
266 "type" : "Object/String/Function",
267 "desc" : "The URL for this request, or a function to call to get the URL, or a config object containing any of the following options:\n <pre><code>\n view.load({\n url: \"your-url.php\",\n params: {param1: \"foo\", param2: \"bar\"}, // or a URL encoded string\n callback: yourFunction,\n scope: yourObject, //(optional scope)\n discardUrl: false,\n nocache: false,\n text: \"Loading...\",\n timeout: 30,\n scripts: false\n });\n </code></pre>\nThe only required property is <i>url</i>. The optional properties <i>nocache</i>, <i>text</i> and <i>scripts</i>\nare respectively shorthand for <i>disableCaching</i>, <i>indicatorText</i>, and <i>loadScripts</i> and are used to set their associated property on this UpdateManager instance.",
272 "type" : "String/Object",
273 "desc" : "(optional) The parameters to pass, as either a URL encoded string \"param1=1&param2=2\" or an object {param1: 1, param2: 2}",
279 "desc" : "(optional) Callback when transaction is complete - called with signature (oElement, bSuccess)",
283 "name" : "discardUrl",
285 "desc" : "(optional) By default when you execute an update the defaultUrl is changed to the last used URL. If true, it will not store the URL.",
294 "desc" : "Filter the data by a specific property.",
296 "isConstructor" : false,
298 "memberOf" : "Roo.JsonView",
307 "desc" : "A property on your JSON objects",
312 "type" : "String/RegExp",
313 "desc" : "Either string that the property values\nshould start with, or a RegExp to test against the property",
321 "name" : "getSelectedNodes",
322 "desc" : "Get the currently selected nodes.",
324 "isConstructor" : false,
326 "memberOf" : "Roo.View",
337 "desc" : "An array of HTMLElements"
343 "desc" : "Gets a range template nodes.",
345 "isConstructor" : false,
347 "memberOf" : "Roo.View",
354 "name" : "startIndex",
370 "desc" : "An array of nodes"
376 "desc" : "Selects nodes.",
378 "isConstructor" : false,
380 "memberOf" : "Roo.View",
388 "type" : "Array/HTMLElement/String/Number",
389 "desc" : "An HTMLElement template node, index of a template node, id of a template node or an array of any of those to select",
393 "name" : "keepExisting",
395 "desc" : "(optional) true to keep existing selections",
399 "name" : "suppressEvent",
401 "desc" : "(optional) true to skip firing of the selectionchange vent",
409 "name" : "clearSelections",
410 "desc" : "Clear all selections",
412 "isConstructor" : false,
414 "memberOf" : "Roo.View",
421 "name" : "suppressEvent",
423 "desc" : "(optional) true to skip firing of the selectionchange event",
431 "name" : "isSelected",
432 "desc" : "Returns true if the passed node is selected",
434 "isConstructor" : false,
436 "memberOf" : "Roo.View",
444 "type" : "HTMLElement/Number",
445 "desc" : "The node or node index",
458 "name" : "onBeforeLoad",
459 "desc" : "onbeforeLoad - masks the loading area.",
461 "isConstructor" : false,
463 "memberOf" : "Roo.View",
474 "name" : "getSelectedIndexes",
475 "desc" : "Get the indexes of the selected nodes.",
477 "isConstructor" : false,
479 "memberOf" : "Roo.View",
496 "desc" : "Finds the index of the passed node",
498 "isConstructor" : false,
500 "memberOf" : "Roo.View",
508 "type" : "HTMLElement/String/Number",
509 "desc" : "An HTMLElement template node, index of a template node or the id of a template node",
517 "desc" : "The index of the node or -1"
523 "desc" : "Returns the element this view is bound to.",
525 "isConstructor" : false,
527 "memberOf" : "Roo.View",
537 "type" : "Roo.Element",
544 "desc" : "Changes the data store this view uses and refresh the view.",
546 "isConstructor" : false,
548 "memberOf" : "Roo.View",
565 "name" : "refreshNode",
566 "desc" : "Refresh an individual node.",
568 "isConstructor" : false,
570 "memberOf" : "Roo.View",
587 "name" : "prepareData",
588 "desc" : "Function to override to reformat the data that is sent to\nthe template for each node.\nDEPRICATED - use the preparedata event handler.",
590 "isConstructor" : false,
592 "memberOf" : "Roo.View",
600 "type" : "Array/Object",
601 "desc" : "The raw data (array of colData for a data model bound view or\na JSON object for an UpdateManager bound view).",
609 "name" : "getSelectionCount",
610 "desc" : "Get the number of selected nodes.",
612 "isConstructor" : false,
614 "memberOf" : "Roo.View",
630 "name" : "findItemFromChild",
631 "desc" : "Returns the template node the passed child belongs to or null if it doesn't belong to one.",
633 "isConstructor" : false,
635 "memberOf" : "Roo.View",
643 "type" : "HTMLElement",
651 "type" : "HTMLElement",
652 "desc" : "The template node"
658 "desc" : "Unselects nodes.",
660 "isConstructor" : false,
662 "memberOf" : "Roo.View",
670 "type" : "Array/HTMLElement/String/Number",
671 "desc" : "An HTMLElement template node, index of a template node, id of a template node or an array of any of those to select",
675 "name" : "keepExisting",
677 "desc" : "(optional) true IGNORED (for campatibility with select)",
681 "name" : "suppressEvent",
683 "desc" : "(optional) true to skip firing of the selectionchange vent",
692 "desc" : "Gets a template node.",
694 "isConstructor" : false,
696 "memberOf" : "Roo.View",
704 "type" : "HTMLElement/String/Number",
705 "desc" : "An HTMLElement template node, index of a template node or the id of a template node",
712 "type" : "HTMLElement",
713 "desc" : "The node or null if it wasn't found"
718 "name" : "purgeListeners",
719 "desc" : "Removes all listeners for this object",
721 "isConstructor" : false,
723 "memberOf" : "Roo.util.Observable",
735 "desc" : "Appends an event handler to this element (shorthand for addListener)",
737 "isConstructor" : false,
739 "memberOf" : "Roo.util.Observable",
746 "name" : "eventName",
748 "desc" : "The type of event to listen for",
754 "desc" : "The method the event invokes",
760 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
766 "desc" : "(optional)",
775 "desc" : "Removes a listener (shorthand for removeListener)",
777 "isConstructor" : false,
779 "memberOf" : "Roo.util.Observable",
786 "name" : "eventName",
788 "desc" : "The type of event to listen for",
794 "desc" : "The handler to remove",
800 "desc" : "(optional) The scope (this object) for the handler",
808 "name" : "addEvents",
809 "desc" : "Used to define events on this Observable",
811 "isConstructor" : false,
813 "memberOf" : "Roo.util.Observable",
822 "desc" : "The object with the events defined",
830 "name" : "releaseCapture",
831 "desc" : "Removes <b>all</b> added captures from the Observable.",
833 "isConstructor" : false,
835 "memberOf" : "Roo.util.Observable",
843 "type" : "Observable",
844 "desc" : "The Observable to release",
852 "name" : "removeListener",
853 "desc" : "Removes a listener",
855 "isConstructor" : false,
857 "memberOf" : "Roo.util.Observable",
864 "name" : "eventName",
866 "desc" : "The type of event to listen for",
872 "desc" : "The handler to remove",
878 "desc" : "(optional) The scope (this object) for the handler",
886 "name" : "fireEvent",
887 "desc" : "Fires the specified event with the passed parameters (minus the event name).",
889 "isConstructor" : false,
891 "memberOf" : "Roo.util.Observable",
898 "name" : "eventName",
905 "type" : "Object...",
906 "desc" : "Variable number of parameters are passed to handlers",
914 "desc" : "returns false if any of the handlers return false otherwise it returns true"
919 "name" : "hasListener",
920 "desc" : "Checks to see if this object has any listeners for a specified event",
922 "isConstructor" : false,
924 "memberOf" : "Roo.util.Observable",
931 "name" : "eventName",
933 "desc" : "The name of the event to check for",
941 "desc" : "True if the event is being listened for, else false"
947 "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.",
949 "isConstructor" : false,
951 "memberOf" : "Roo.util.Observable",
959 "type" : "Observable",
960 "desc" : "The Observable to capture",
966 "desc" : "The function to call",
972 "desc" : "(optional) The scope (this object) for the fn",
980 "name" : "addListener",
981 "desc" : "Appends an event handler to this component",
983 "isConstructor" : false,
985 "memberOf" : "Roo.util.Observable",
992 "name" : "eventName",
994 "desc" : "The type of event to listen for",
1000 "desc" : "The method the event invokes",
1001 "isOptional" : false
1006 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
1007 "isOptional" : false
1012 "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>",
1013 "isOptional" : false
1022 "name" : "loadexception",
1023 "desc" : "Fires when loading fails.",
1032 "type" : "Roo.JsonView",
1034 "isOptional" : false
1037 "name" : "response",
1039 "desc" : "The raw Connect response object",
1040 "isOptional" : false
1048 "desc" : "Fires when data is loaded.",
1057 "type" : "Roo.JsonView",
1059 "isOptional" : false
1064 "desc" : "The JSON data loaded",
1065 "isOptional" : false
1068 "name" : "response",
1070 "desc" : "The raw Connect response object",
1071 "isOptional" : false
1078 "name" : "beforerender",
1079 "desc" : "Fires before rendering of the downloaded JSON data.",
1088 "type" : "Roo.JsonView",
1090 "isOptional" : false
1095 "desc" : "The JSON data loaded",
1096 "isOptional" : false
1103 "name" : "dblclick",
1104 "desc" : "Fires when a template node is double clicked.",
1105 "memberOf" : "Roo.View",
1113 "type" : "Roo.View",
1115 "isOptional" : false
1120 "desc" : "The index of the target node",
1121 "isOptional" : false
1125 "type" : "HTMLElement",
1126 "desc" : "The target node",
1127 "isOptional" : false
1131 "type" : "Roo.EventObject",
1132 "desc" : "The raw event object",
1133 "isOptional" : false
1140 "name" : "preparedata",
1141 "desc" : "Fires on every row to render, to allow you to change the data.",
1142 "memberOf" : "Roo.View",
1150 "type" : "Roo.View",
1152 "isOptional" : false
1157 "desc" : "to be rendered (change this)",
1158 "isOptional" : false
1165 "name" : "selectionchange",
1166 "desc" : "Fires when the selected nodes change.",
1167 "memberOf" : "Roo.View",
1175 "type" : "Roo.View",
1177 "isOptional" : false
1180 "name" : "selections",
1182 "desc" : "Array of the selected nodes",
1183 "isOptional" : false
1190 "name" : "beforeselect",
1191 "desc" : "Fires before a selection is made. If any handlers return false, the selection is cancelled.",
1192 "memberOf" : "Roo.View",
1200 "type" : "Roo.View",
1202 "isOptional" : false
1206 "type" : "HTMLElement",
1207 "desc" : "The node to be selected",
1208 "isOptional" : false
1211 "name" : "selections",
1213 "desc" : "Array of currently selected nodes",
1214 "isOptional" : false
1221 "name" : "beforeclick",
1222 "desc" : "Fires before a click is processed. Returns false to cancel the default action.",
1223 "memberOf" : "Roo.View",
1231 "type" : "Roo.View",
1233 "isOptional" : false
1238 "desc" : "The index of the target node",
1239 "isOptional" : false
1243 "type" : "HTMLElement",
1244 "desc" : "The target node",
1245 "isOptional" : false
1249 "type" : "Roo.EventObject",
1250 "desc" : "The raw event object",
1251 "isOptional" : false
1259 "desc" : "Fires when a template node is clicked.",
1260 "memberOf" : "Roo.View",
1268 "type" : "Roo.View",
1270 "isOptional" : false
1275 "desc" : "The index of the target node",
1276 "isOptional" : false
1280 "type" : "HTMLElement",
1281 "desc" : "The target node",
1282 "isOptional" : false
1286 "type" : "Roo.EventObject",
1287 "desc" : "The raw event object",
1288 "isOptional" : false
1295 "name" : "contextmenu",
1296 "desc" : "Fires when a template node is right clicked.",
1297 "memberOf" : "Roo.View",
1305 "type" : "Roo.View",
1307 "isOptional" : false
1312 "desc" : "The index of the target node",
1313 "isOptional" : false
1317 "type" : "HTMLElement",
1318 "desc" : "The target node",
1319 "isOptional" : false
1323 "type" : "Roo.EventObject",
1324 "desc" : "The raw event object",
1325 "isOptional" : false