gmeans
21 Sep 2010, 1:06 PM
I had hard coded a JSON type array for developing my application similar to this:
App.JSONArray = [{
key: 'value',
key2: 'value2'
},{
key: 'value',
key2: 'value2'
}];
I then created a Ext.data.Store object, and used App.JSONArray as the data.
Where I ran into an issue was trying to use the App.JSONArray as the values for an XTemplate operation. The template would render for each item in the array, but wouldn't render any of the values.
I noticed that if I don't use App.JSONArray as the data element of the store, everything works fine.
1 ) Why does Ext.data.Store do something to the data array that renders it unusable by XTemplate?
2 ) Is there a way to do this without having to create 2 hard coded arrays?
Thanks!
App.JSONArray = [{
key: 'value',
key2: 'value2'
},{
key: 'value',
key2: 'value2'
}];
I then created a Ext.data.Store object, and used App.JSONArray as the data.
Where I ran into an issue was trying to use the App.JSONArray as the values for an XTemplate operation. The template would render for each item in the array, but wouldn't render any of the values.
I noticed that if I don't use App.JSONArray as the data element of the store, everything works fine.
1 ) Why does Ext.data.Store do something to the data array that renders it unusable by XTemplate?
2 ) Is there a way to do this without having to create 2 hard coded arrays?
Thanks!