examples/layout/viewpanel.bjs
authorChris <chris@roojs.com>
Mon, 21 Oct 2013 10:21:47 +0000 (18:21 +0800)
committerChris <chris@roojs.com>
Mon, 21 Oct 2013 10:21:47 +0000 (18:21 +0800)
examples/layout/viewpanel.js

examples/layout/viewpanel.bjs
examples/layout/viewpanel.js

index ea95113..d273eff 100644 (file)
@@ -44,7 +44,7 @@
                                     "id": "id",
                                     "root": "images",
                                     "xtype": "JsonReader",
-                                    "|fields": "function() {\n    \n}\n",
+                                    "|fields": "[\n    {name: 'name', type: 'string'},\n    {name: 'size', type: 'string'},\n    {name: 'lastmod', type: 'string'},\n    {name: 'url', type: 'string'}\n]",
                                     "|xns": "Roo.data"
                                 }
                             ]
index 776fc3b..99ee9af 100644 (file)
@@ -51,9 +51,12 @@ viewpanel = new Roo.XComponent({
                             xns: Roo.data,
                             id : 'id',
                             root : 'images',
-                            fields : function() {
-                                
-                            }
+                            fields : [
+                                {name: 'name', type: 'string'},
+                                {name: 'size', type: 'string'},
+                                {name: 'lastmod', type: 'string'},
+                                {name: 'url', type: 'string'}
+                            ]
                         }
                     }
                 }