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)",
11 "memberOf" : "JsonView",
20 "desc" : "The config object",
28 "name" : "selectedClass",
30 "desc" : "The css class to add to selected nodes",
31 "memberOf" : "Roo.View",
38 "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>",
39 "memberOf" : "Roo.util.Observable",
46 "desc" : "the named area of the template to use as the data area\n Works with domtemplates roo-name=\"name\"",
47 "memberOf" : "Roo.View",
54 "desc" : "to display on mask (default Loading)",
55 "memberOf" : "Roo.View",
60 "name" : "multiSelect",
62 "desc" : "Allow multiple selection",
63 "memberOf" : "Roo.View",
70 "desc" : "The empty text to show when nothing is loaded.",
71 "memberOf" : "Roo.View",
77 "type" : "Roo.data.Store",
78 "desc" : "Data store to load data from.",
79 "memberOf" : "Roo.View",
84 "name" : "toggleSelect",
86 "desc" : "- selecting",
87 "memberOf" : "Roo.View",
92 "name" : "singleSelect",
94 "desc" : "Allow single selection",
95 "memberOf" : "Roo.View",
102 "desc" : "- selecting",
103 "memberOf" : "Roo.View",
109 "type" : "String|Roo.Element",
110 "desc" : "The container element.",
111 "memberOf" : "Roo.View",
117 "type" : "String|Roo.Template",
118 "desc" : "The template used by this View",
119 "memberOf" : "Roo.View",
126 "name" : "getNodeData",
127 "desc" : "Returns the JSON object for the specified node(s)",
129 "isConstructor" : false,
131 "memberOf" : "Roo.JsonView",
139 "type" : "HTMLElement/Array",
140 "desc" : "The node or an array of nodes",
147 "type" : "Object/Array",
148 "desc" : "If you pass in an array, you get an array back, otherwise\nyou get the JSON object for the node"
154 "desc" : "Get the number of records in the current JSON dataset",
156 "isConstructor" : false,
158 "memberOf" : "Roo.JsonView",
175 "desc" : "Sorts the data for this view and refreshes it.",
177 "isConstructor" : false,
179 "memberOf" : "Roo.JsonView",
188 "desc" : "A property on your JSON objects to sort on",
192 "name" : "direction",
194 "desc" : "(optional) \"desc\" or \"asc\" (defaults to \"asc\")",
200 "desc" : "(optional) A function to call to convert the data to a sortable value.",
209 "desc" : "Refreshes the view.",
211 "isConstructor" : false,
213 "memberOf" : "Roo.JsonView",
225 "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.",
227 "isConstructor" : false,
229 "memberOf" : "Roo.JsonView",
244 "desc" : "(optional) The scope of the function (defaults to this JsonView)",
252 "name" : "clearFilter",
253 "desc" : "Clears the current filter.",
255 "isConstructor" : false,
257 "memberOf" : "Roo.JsonView",
269 "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.",
271 "isConstructor" : false,
273 "memberOf" : "Roo.JsonView",
281 "type" : "Object/String/Function",
282 "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.",
287 "type" : "String/Object",
288 "desc" : "(optional) The parameters to pass, as either a URL encoded string \"param1=1&param2=2\" or an object {param1: 1, param2: 2}",
294 "desc" : "(optional) Callback when transaction is complete - called with signature (oElement, bSuccess)",
298 "name" : "discardUrl",
300 "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.",
309 "desc" : "Filter the data by a specific property.",
311 "isConstructor" : false,
313 "memberOf" : "Roo.JsonView",
322 "desc" : "A property on your JSON objects",
327 "type" : "String/RegExp",
328 "desc" : "Either string that the property values\nshould start with, or a RegExp to test against the property",
336 "name" : "getSelectedNodes",
337 "desc" : "Get the currently selected nodes.",
339 "isConstructor" : false,
341 "memberOf" : "Roo.View",
352 "desc" : "An array of HTMLElements"
358 "desc" : "Gets a range template nodes.",
360 "isConstructor" : false,
362 "memberOf" : "Roo.View",
369 "name" : "startIndex",
385 "desc" : "An array of nodes"
391 "desc" : "Selects nodes.",
393 "isConstructor" : false,
395 "memberOf" : "Roo.View",
403 "type" : "Array/HTMLElement/String/Number",
404 "desc" : "An HTMLElement template node, index of a template node, id of a template node or an array of any of those to select",
408 "name" : "keepExisting",
410 "desc" : "(optional) true to keep existing selections",
414 "name" : "suppressEvent",
416 "desc" : "(optional) true to skip firing of the selectionchange vent",
424 "name" : "clearSelections",
425 "desc" : "Clear all selections",
427 "isConstructor" : false,
429 "memberOf" : "Roo.View",
436 "name" : "suppressEvent",
438 "desc" : "(optional) true to skip firing of the selectionchange event",
446 "name" : "isSelected",
447 "desc" : "Returns true if the passed node is selected",
449 "isConstructor" : false,
451 "memberOf" : "Roo.View",
459 "type" : "HTMLElement/Number",
460 "desc" : "The node or node index",
473 "name" : "onBeforeLoad",
474 "desc" : "onbeforeLoad - masks the loading area.",
476 "isConstructor" : false,
478 "memberOf" : "Roo.View",
489 "name" : "getSelectedIndexes",
490 "desc" : "Get the indexes of the selected nodes.",
492 "isConstructor" : false,
494 "memberOf" : "Roo.View",
511 "desc" : "Finds the index of the passed node",
513 "isConstructor" : false,
515 "memberOf" : "Roo.View",
523 "type" : "HTMLElement/String/Number",
524 "desc" : "An HTMLElement template node, index of a template node or the id of a template node",
532 "desc" : "The index of the node or -1"
538 "desc" : "Returns the element this view is bound to.",
540 "isConstructor" : false,
542 "memberOf" : "Roo.View",
552 "type" : "Roo.Element",
559 "desc" : "Changes the data store this view uses and refresh the view.",
561 "isConstructor" : false,
563 "memberOf" : "Roo.View",
580 "name" : "refreshNode",
581 "desc" : "Refresh an individual node.",
583 "isConstructor" : false,
585 "memberOf" : "Roo.View",
602 "name" : "prepareData",
603 "desc" : "Function to override to reformat the data that is sent to\nthe template for each node.\nDEPRICATED - use the preparedata event handler.",
605 "isConstructor" : false,
607 "memberOf" : "Roo.View",
615 "type" : "Array/Object",
616 "desc" : "The raw data (array of colData for a data model bound view or\na JSON object for an UpdateManager bound view).",
624 "name" : "getSelectionCount",
625 "desc" : "Get the number of selected nodes.",
627 "isConstructor" : false,
629 "memberOf" : "Roo.View",
645 "name" : "findItemFromChild",
646 "desc" : "Returns the template node the passed child belongs to or null if it doesn't belong to one.",
648 "isConstructor" : false,
650 "memberOf" : "Roo.View",
658 "type" : "HTMLElement",
666 "type" : "HTMLElement",
667 "desc" : "The template node"
673 "desc" : "Unselects nodes.",
675 "isConstructor" : false,
677 "memberOf" : "Roo.View",
685 "type" : "Array/HTMLElement/String/Number",
686 "desc" : "An HTMLElement template node, index of a template node, id of a template node or an array of any of those to select",
690 "name" : "keepExisting",
692 "desc" : "(optional) true IGNORED (for campatibility with select)",
696 "name" : "suppressEvent",
698 "desc" : "(optional) true to skip firing of the selectionchange vent",
707 "desc" : "Gets a template node.",
709 "isConstructor" : false,
711 "memberOf" : "Roo.View",
719 "type" : "HTMLElement/String/Number",
720 "desc" : "An HTMLElement template node, index of a template node or the id of a template node",
727 "type" : "HTMLElement",
728 "desc" : "The node or null if it wasn't found"
733 "name" : "purgeListeners",
734 "desc" : "Removes all listeners for this object",
736 "isConstructor" : false,
738 "memberOf" : "Roo.util.Observable",
750 "desc" : "Appends an event handler to this element (shorthand for addListener)",
752 "isConstructor" : false,
754 "memberOf" : "Roo.util.Observable",
761 "name" : "eventName",
763 "desc" : "The type of event to listen for",
769 "desc" : "The method the event invokes",
775 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
781 "desc" : "(optional)",
790 "desc" : "Removes a listener (shorthand for removeListener)",
792 "isConstructor" : false,
794 "memberOf" : "Roo.util.Observable",
801 "name" : "eventName",
803 "desc" : "The type of event to listen for",
809 "desc" : "The handler to remove",
815 "desc" : "(optional) The scope (this object) for the handler",
823 "name" : "addEvents",
824 "desc" : "Used to define events on this Observable",
826 "isConstructor" : false,
828 "memberOf" : "Roo.util.Observable",
837 "desc" : "The object with the events defined",
845 "name" : "releaseCapture",
846 "desc" : "Removes <b>all</b> added captures from the Observable.",
848 "isConstructor" : false,
850 "memberOf" : "Roo.util.Observable",
858 "type" : "Observable",
859 "desc" : "The Observable to release",
867 "name" : "removeListener",
868 "desc" : "Removes a listener",
870 "isConstructor" : false,
872 "memberOf" : "Roo.util.Observable",
879 "name" : "eventName",
881 "desc" : "The type of event to listen for",
887 "desc" : "The handler to remove",
893 "desc" : "(optional) The scope (this object) for the handler",
901 "name" : "fireEvent",
902 "desc" : "Fires the specified event with the passed parameters (minus the event name).",
904 "isConstructor" : false,
906 "memberOf" : "Roo.util.Observable",
913 "name" : "eventName",
920 "type" : "Object...",
921 "desc" : "Variable number of parameters are passed to handlers",
929 "desc" : "returns false if any of the handlers return false otherwise it returns true"
934 "name" : "hasListener",
935 "desc" : "Checks to see if this object has any listeners for a specified event",
937 "isConstructor" : false,
939 "memberOf" : "Roo.util.Observable",
946 "name" : "eventName",
948 "desc" : "The name of the event to check for",
956 "desc" : "True if the event is being listened for, else false"
962 "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.",
964 "isConstructor" : false,
966 "memberOf" : "Roo.util.Observable",
974 "type" : "Observable",
975 "desc" : "The Observable to capture",
981 "desc" : "The function to call",
987 "desc" : "(optional) The scope (this object) for the fn",
995 "name" : "addListener",
996 "desc" : "Appends an event handler to this component",
998 "isConstructor" : false,
1000 "memberOf" : "Roo.util.Observable",
1007 "name" : "eventName",
1009 "desc" : "The type of event to listen for",
1010 "isOptional" : false
1014 "type" : "Function",
1015 "desc" : "The method the event invokes",
1016 "isOptional" : false
1021 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
1022 "isOptional" : false
1027 "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>",
1028 "isOptional" : false
1037 "name" : "loadexception",
1038 "desc" : "Fires when loading fails.",
1039 "memberOf" : "Roo.JsonView",
1047 "type" : "Roo.JsonView",
1049 "isOptional" : false
1052 "name" : "response",
1054 "desc" : "The raw Connect response object",
1055 "isOptional" : false
1063 "desc" : "Fires when data is loaded.",
1064 "memberOf" : "Roo.JsonView",
1072 "type" : "Roo.JsonView",
1074 "isOptional" : false
1079 "desc" : "The JSON data loaded",
1080 "isOptional" : false
1083 "name" : "response",
1085 "desc" : "The raw Connect response object",
1086 "isOptional" : false
1093 "name" : "beforerender",
1094 "desc" : "Fires before rendering of the downloaded JSON data.",
1095 "memberOf" : "Roo.JsonView",
1103 "type" : "Roo.JsonView",
1105 "isOptional" : false
1110 "desc" : "The JSON data loaded",
1111 "isOptional" : false
1118 "name" : "dblclick",
1119 "desc" : "Fires when a template node is double clicked.",
1120 "memberOf" : "Roo.View",
1128 "type" : "Roo.View",
1130 "isOptional" : false
1135 "desc" : "The index of the target node",
1136 "isOptional" : false
1140 "type" : "HTMLElement",
1141 "desc" : "The target node",
1142 "isOptional" : false
1146 "type" : "Roo.EventObject",
1147 "desc" : "The raw event object",
1148 "isOptional" : false
1155 "name" : "preparedata",
1156 "desc" : "Fires on every row to render, to allow you to change the data.",
1157 "memberOf" : "Roo.View",
1165 "type" : "Roo.View",
1167 "isOptional" : false
1172 "desc" : "to be rendered (change this)",
1173 "isOptional" : false
1180 "name" : "selectionchange",
1181 "desc" : "Fires when the selected nodes change.",
1182 "memberOf" : "Roo.View",
1190 "type" : "Roo.View",
1192 "isOptional" : false
1195 "name" : "selections",
1197 "desc" : "Array of the selected nodes",
1198 "isOptional" : false
1205 "name" : "beforeselect",
1206 "desc" : "Fires before a selection is made. If any handlers return false, the selection is cancelled.",
1207 "memberOf" : "Roo.View",
1215 "type" : "Roo.View",
1217 "isOptional" : false
1221 "type" : "HTMLElement",
1222 "desc" : "The node to be selected",
1223 "isOptional" : false
1226 "name" : "selections",
1228 "desc" : "Array of currently selected nodes",
1229 "isOptional" : false
1236 "name" : "beforeclick",
1237 "desc" : "Fires before a click is processed. Returns false to cancel the default action.",
1238 "memberOf" : "Roo.View",
1246 "type" : "Roo.View",
1248 "isOptional" : false
1253 "desc" : "The index of the target node",
1254 "isOptional" : false
1258 "type" : "HTMLElement",
1259 "desc" : "The target node",
1260 "isOptional" : false
1264 "type" : "Roo.EventObject",
1265 "desc" : "The raw event object",
1266 "isOptional" : false
1274 "desc" : "Fires when a template node is clicked.",
1275 "memberOf" : "Roo.View",
1283 "type" : "Roo.View",
1285 "isOptional" : false
1290 "desc" : "The index of the target node",
1291 "isOptional" : false
1295 "type" : "HTMLElement",
1296 "desc" : "The target node",
1297 "isOptional" : false
1301 "type" : "Roo.EventObject",
1302 "desc" : "The raw event object",
1303 "isOptional" : false
1310 "name" : "contextmenu",
1311 "desc" : "Fires when a template node is right clicked.",
1312 "memberOf" : "Roo.View",
1320 "type" : "Roo.View",
1322 "isOptional" : false
1327 "desc" : "The index of the target node",
1328 "isOptional" : false
1332 "type" : "HTMLElement",
1333 "desc" : "The target node",
1334 "isOptional" : false
1338 "type" : "Roo.EventObject",
1339 "desc" : "The raw event object",
1340 "isOptional" : false