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",
27 "name" : "selectedClass",
29 "desc" : "The css class to add to selected nodes",
30 "memberOf" : "Roo.View",
36 "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>",
37 "memberOf" : "Roo.util.Observable",
43 "desc" : "the named area of the template to use as the data area\n Works with domtemplates roo-name=\"name\"",
44 "memberOf" : "Roo.View",
50 "desc" : "to display on mask (default Loading)",
51 "memberOf" : "Roo.View",
55 "name" : "multiSelect",
57 "desc" : "Allow multiple selection",
58 "memberOf" : "Roo.View",
64 "desc" : "The empty text to show when nothing is loaded.",
65 "memberOf" : "Roo.View",
70 "type" : "Roo.data.Store",
71 "desc" : "Data store to load data from.",
72 "memberOf" : "Roo.View",
76 "name" : "toggleSelect",
78 "desc" : "- selecting",
79 "memberOf" : "Roo.View",
83 "name" : "singleSelect",
85 "desc" : "Allow single selection",
86 "memberOf" : "Roo.View",
92 "desc" : "- selecting",
93 "memberOf" : "Roo.View",
98 "type" : "String|Roo.Element",
99 "desc" : "The container element.",
100 "memberOf" : "Roo.View",
105 "type" : "String|Roo.Template",
106 "desc" : "The template used by this View",
107 "memberOf" : "Roo.View",
113 "name" : "getNodeData",
114 "desc" : "Returns the JSON object for the specified node(s)",
116 "isConstructor" : false,
118 "memberOf" : "Roo.JsonView",
126 "type" : "HTMLElement/Array",
127 "desc" : "The node or an array of nodes",
134 "type" : "Object/Array",
135 "desc" : "If you pass in an array, you get an array back, otherwise\nyou get the JSON object for the node"
141 "desc" : "Get the number of records in the current JSON dataset",
143 "isConstructor" : false,
145 "memberOf" : "Roo.JsonView",
161 "desc" : "Sorts the data for this view and refreshes it.",
163 "isConstructor" : false,
165 "memberOf" : "Roo.JsonView",
174 "desc" : "A property on your JSON objects to sort on",
178 "name" : "direction",
180 "desc" : "(optional) \"desc\" or \"asc\" (defaults to \"asc\")",
186 "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",
208 "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.",
210 "isConstructor" : false,
212 "memberOf" : "Roo.JsonView",
227 "desc" : "(optional) The scope of the function (defaults to this JsonView)",
234 "name" : "clearFilter",
235 "desc" : "Clears the current filter.",
237 "isConstructor" : false,
239 "memberOf" : "Roo.JsonView",
249 "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.",
251 "isConstructor" : false,
253 "memberOf" : "Roo.JsonView",
261 "type" : "Object/String/Function",
262 "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.",
267 "type" : "String/Object",
268 "desc" : "(optional) The parameters to pass, as either a URL encoded string \"param1=1&param2=2\" or an object {param1: 1, param2: 2}",
274 "desc" : "(optional) Callback when transaction is complete - called with signature (oElement, bSuccess)",
278 "name" : "discardUrl",
280 "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.",
288 "desc" : "Filter the data by a specific property.",
290 "isConstructor" : false,
292 "memberOf" : "Roo.JsonView",
301 "desc" : "A property on your JSON objects",
306 "type" : "String/RegExp",
307 "desc" : "Either string that the property values\nshould start with, or a RegExp to test against the property",
314 "name" : "getSelectedNodes",
315 "desc" : "Get the currently selected nodes.",
317 "isConstructor" : false,
319 "memberOf" : "Roo.View",
329 "desc" : "An array of HTMLElements"
335 "desc" : "Gets a range template nodes.",
337 "isConstructor" : false,
339 "memberOf" : "Roo.View",
346 "name" : "startIndex",
362 "desc" : "An array of nodes"
368 "desc" : "Selects nodes.",
370 "isConstructor" : false,
372 "memberOf" : "Roo.View",
380 "type" : "Array/HTMLElement/String/Number",
381 "desc" : "An HTMLElement template node, index of a template node, id of a template node or an array of any of those to select",
385 "name" : "keepExisting",
387 "desc" : "(optional) true to keep existing selections",
391 "name" : "suppressEvent",
393 "desc" : "(optional) true to skip firing of the selectionchange vent",
400 "name" : "clearSelections",
401 "desc" : "Clear all selections",
403 "isConstructor" : false,
405 "memberOf" : "Roo.View",
412 "name" : "suppressEvent",
414 "desc" : "(optional) true to skip firing of the selectionchange event",
421 "name" : "isSelected",
422 "desc" : "Returns true if the passed node is selected",
424 "isConstructor" : false,
426 "memberOf" : "Roo.View",
434 "type" : "HTMLElement/Number",
435 "desc" : "The node or node index",
448 "name" : "onBeforeLoad",
449 "desc" : "onbeforeLoad - masks the loading area.",
451 "isConstructor" : false,
453 "memberOf" : "Roo.View",
462 "name" : "getSelectedIndexes",
463 "desc" : "Get the indexes of the selected nodes.",
465 "isConstructor" : false,
467 "memberOf" : "Roo.View",
483 "desc" : "Finds the index of the passed node",
485 "isConstructor" : false,
487 "memberOf" : "Roo.View",
495 "type" : "HTMLElement/String/Number",
496 "desc" : "An HTMLElement template node, index of a template node or the id of a template node",
504 "desc" : "The index of the node or -1"
510 "desc" : "Returns the element this view is bound to.",
512 "isConstructor" : false,
514 "memberOf" : "Roo.View",
523 "type" : "Roo.Element",
530 "desc" : "Changes the data store this view uses and refresh the view.",
532 "isConstructor" : false,
534 "memberOf" : "Roo.View",
550 "name" : "refreshNode",
551 "desc" : "Refresh an individual node.",
553 "isConstructor" : false,
555 "memberOf" : "Roo.View",
571 "name" : "prepareData",
572 "desc" : "Function to override to reformat the data that is sent to\nthe template for each node.\nDEPRICATED - use the preparedata event handler.",
574 "isConstructor" : false,
576 "memberOf" : "Roo.View",
584 "type" : "Array/Object",
585 "desc" : "The raw data (array of colData for a data model bound view or\na JSON object for an UpdateManager bound view).",
592 "name" : "getSelectionCount",
593 "desc" : "Get the number of selected nodes.",
595 "isConstructor" : false,
597 "memberOf" : "Roo.View",
612 "name" : "findItemFromChild",
613 "desc" : "Returns the template node the passed child belongs to or null if it doesn't belong to one.",
615 "isConstructor" : false,
617 "memberOf" : "Roo.View",
625 "type" : "HTMLElement",
633 "type" : "HTMLElement",
634 "desc" : "The template node"
640 "desc" : "Unselects nodes.",
642 "isConstructor" : false,
644 "memberOf" : "Roo.View",
652 "type" : "Array/HTMLElement/String/Number",
653 "desc" : "An HTMLElement template node, index of a template node, id of a template node or an array of any of those to select",
657 "name" : "keepExisting",
659 "desc" : "(optional) true IGNORED (for campatibility with select)",
663 "name" : "suppressEvent",
665 "desc" : "(optional) true to skip firing of the selectionchange vent",
673 "desc" : "Gets a template node.",
675 "isConstructor" : false,
677 "memberOf" : "Roo.View",
685 "type" : "HTMLElement/String/Number",
686 "desc" : "An HTMLElement template node, index of a template node or the id of a template node",
693 "type" : "HTMLElement",
694 "desc" : "The node or null if it wasn't found"
699 "name" : "purgeListeners",
700 "desc" : "Removes all listeners for this object",
702 "isConstructor" : false,
704 "memberOf" : "Roo.util.Observable",
714 "desc" : "Appends an event handler to this element (shorthand for addListener)",
716 "isConstructor" : false,
718 "memberOf" : "Roo.util.Observable",
725 "name" : "eventName",
727 "desc" : "The type of event to listen for",
733 "desc" : "The method the event invokes",
739 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
745 "desc" : "(optional)",
753 "desc" : "Removes a listener (shorthand for removeListener)",
755 "isConstructor" : false,
757 "memberOf" : "Roo.util.Observable",
764 "name" : "eventName",
766 "desc" : "The type of event to listen for",
772 "desc" : "The handler to remove",
778 "desc" : "(optional) The scope (this object) for the handler",
785 "name" : "addEvents",
786 "desc" : "Used to define events on this Observable",
788 "isConstructor" : false,
790 "memberOf" : "Roo.util.Observable",
799 "desc" : "The object with the events defined",
806 "name" : "releaseCapture",
807 "desc" : "Removes <b>all</b> added captures from the Observable.",
809 "isConstructor" : false,
811 "memberOf" : "Roo.util.Observable",
819 "type" : "Observable",
820 "desc" : "The Observable to release",
827 "name" : "removeListener",
828 "desc" : "Removes a listener",
830 "isConstructor" : false,
832 "memberOf" : "Roo.util.Observable",
839 "name" : "eventName",
841 "desc" : "The type of event to listen for",
847 "desc" : "The handler to remove",
853 "desc" : "(optional) The scope (this object) for the handler",
860 "name" : "fireEvent",
861 "desc" : "Fires the specified event with the passed parameters (minus the event name).",
863 "isConstructor" : false,
865 "memberOf" : "Roo.util.Observable",
872 "name" : "eventName",
879 "type" : "Object...",
880 "desc" : "Variable number of parameters are passed to handlers",
888 "desc" : "returns false if any of the handlers return false otherwise it returns true"
893 "name" : "hasListener",
894 "desc" : "Checks to see if this object has any listeners for a specified event",
896 "isConstructor" : false,
898 "memberOf" : "Roo.util.Observable",
905 "name" : "eventName",
907 "desc" : "The name of the event to check for",
915 "desc" : "True if the event is being listened for, else false"
921 "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.",
923 "isConstructor" : false,
925 "memberOf" : "Roo.util.Observable",
933 "type" : "Observable",
934 "desc" : "The Observable to capture",
940 "desc" : "The function to call",
946 "desc" : "(optional) The scope (this object) for the fn",
953 "name" : "addListener",
954 "desc" : "Appends an event handler to this component",
956 "isConstructor" : false,
958 "memberOf" : "Roo.util.Observable",
965 "name" : "eventName",
967 "desc" : "The type of event to listen for",
973 "desc" : "The method the event invokes",
979 "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
985 "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>",
994 "name" : "loadexception",
995 "desc" : "Fires when loading fails.",
996 "memberOf" : "Roo.JsonView",
1004 "type" : "Roo.JsonView",
1006 "isOptional" : false
1009 "name" : "response",
1011 "desc" : "The raw Connect response object",
1012 "isOptional" : false
1019 "desc" : "Fires when data is loaded.",
1020 "memberOf" : "Roo.JsonView",
1028 "type" : "Roo.JsonView",
1030 "isOptional" : false
1035 "desc" : "The JSON data loaded",
1036 "isOptional" : false
1039 "name" : "response",
1041 "desc" : "The raw Connect response object",
1042 "isOptional" : false
1048 "name" : "beforerender",
1049 "desc" : "Fires before rendering of the downloaded JSON data.",
1050 "memberOf" : "Roo.JsonView",
1058 "type" : "Roo.JsonView",
1060 "isOptional" : false
1065 "desc" : "The JSON data loaded",
1066 "isOptional" : false
1072 "name" : "dblclick",
1073 "desc" : "Fires when a template node is double clicked.",
1074 "memberOf" : "Roo.View",
1082 "type" : "Roo.View",
1084 "isOptional" : false
1089 "desc" : "The index of the target node",
1090 "isOptional" : false
1094 "type" : "HTMLElement",
1095 "desc" : "The target node",
1096 "isOptional" : false
1100 "type" : "Roo.EventObject",
1101 "desc" : "The raw event object",
1102 "isOptional" : false
1108 "name" : "preparedata",
1109 "desc" : "Fires on every row to render, to allow you to change the data.",
1110 "memberOf" : "Roo.View",
1118 "type" : "Roo.View",
1120 "isOptional" : false
1125 "desc" : "to be rendered (change this)",
1126 "isOptional" : false
1132 "name" : "selectionchange",
1133 "desc" : "Fires when the selected nodes change.",
1134 "memberOf" : "Roo.View",
1142 "type" : "Roo.View",
1144 "isOptional" : false
1147 "name" : "selections",
1149 "desc" : "Array of the selected nodes",
1150 "isOptional" : false
1156 "name" : "beforeselect",
1157 "desc" : "Fires before a selection is made. If any handlers return false, the selection is cancelled.",
1158 "memberOf" : "Roo.View",
1166 "type" : "Roo.View",
1168 "isOptional" : false
1172 "type" : "HTMLElement",
1173 "desc" : "The node to be selected",
1174 "isOptional" : false
1177 "name" : "selections",
1179 "desc" : "Array of currently selected nodes",
1180 "isOptional" : false
1186 "name" : "beforeclick",
1187 "desc" : "Fires before a click is processed. Returns false to cancel the default action.",
1188 "memberOf" : "Roo.View",
1196 "type" : "Roo.View",
1198 "isOptional" : false
1203 "desc" : "The index of the target node",
1204 "isOptional" : false
1208 "type" : "HTMLElement",
1209 "desc" : "The target node",
1210 "isOptional" : false
1214 "type" : "Roo.EventObject",
1215 "desc" : "The raw event object",
1216 "isOptional" : false
1223 "desc" : "Fires when a template node is clicked.",
1224 "memberOf" : "Roo.View",
1232 "type" : "Roo.View",
1234 "isOptional" : false
1239 "desc" : "The index of the target node",
1240 "isOptional" : false
1244 "type" : "HTMLElement",
1245 "desc" : "The target node",
1246 "isOptional" : false
1250 "type" : "Roo.EventObject",
1251 "desc" : "The raw event object",
1252 "isOptional" : false
1258 "name" : "contextmenu",
1259 "desc" : "Fires when a template node is right 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