Roo/form/ComboBoxArray.js
[roojs1] / Roo / JsonView.js
index ee1d832..c4ff719 100644 (file)
@@ -16,7 +16,7 @@
 <pre><code>
 var view = new Roo.JsonView({
     container: "my-element",
-    template: '&lt;div id="{id}"&gt;{foo} - {bar}&lt;/div&gt;', // auto create template
+    tpl: '&lt;div id="{id}"&gt;{foo} - {bar}&lt;/div&gt;', // auto create template
     multiSelect: true, 
     jsonRoot: "data" 
 });
@@ -96,8 +96,7 @@ Roo.JsonView = function(config, depreciated_tpl, depreciated_config){
 };
 Roo.extend(Roo.JsonView, Roo.View, {
     /**
-     * 
-     * @cfg {String} The root property in the loaded JSON object that contains the data
+     * @type {String} The root property in the loaded JSON object that contains the data
      */
     jsonRoot : "",
 
@@ -157,7 +156,7 @@ Roo.extend(Roo.JsonView, Roo.View, {
             o = Roo.util.JSON.decode(response.responseText);
             if(this.jsonRoot){
                 
-                o = /** eval:var:o */ eval("o." + this.jsonRoot);
+                o = o[this.jsonRoot];
             }
         } catch(e){
         }