json - Load date from store to combobox -
hello server date store "url: /book/price" . , response comes server { status: "success", msg: "операция завершена успешно", data: [ "500", "600" ] }
this information "data" want insert in combobox. create store, don't know write there: store:
ext.define('tpl.store.price.book', { extend: 'ext.data.basestore', autoload: true, proxy: { type: 'ajax', url: '/book/price', reader: { type: 'json', root: 'data', successproperty: 'success' } }});
and in combobox don't know write in valuefield
{ xtype: 'combobox', width: 350, store: 'price.book', valuefield: '???' }
thanks answers
your proxy should be:
proxy: { type: 'ajax', url: '/book/price', reader: { type: 'json', root: 'data', successproperty: 'status' <- } }
and can ommit valuefield
property if store has data in array format.
Comments
Post a Comment