extjs data store load data on fly
Posted
by
CKeven
on Stack Overflow
See other posts from Stack Overflow
or by CKeven
Published on 2010-12-21T17:45:25Z
Indexed on
2010/12/21
18:54 UTC
Read the original article
Hit count: 340
I'm trying to create a data store that will load the data schema and records on fly. Here is the current code i have and I'm not sure how to setup the array reader properly since i don't have the schema before query returns.
ds = new Ext.data.Store({
url: 'http://10.10.97.83/cgi-bin/cgiip.exe/WService=wsdev/majax/jsbrdgx.p',
baseParams: {
cr: Ext.util.JSON.encode(omgtobxParms)
},
reader: new Ext.data.ArrayReader({
//root:data.value.records
}, col_names)
});
{"name": "tmp_buy_book",
"schema": [
{ "name": "a", "type": "C"},
{ "name": "b", "type": "C"}
"records": [["1", ""],
["1",""]]}
© Stack Overflow or respective owner