View Full Version : Load date from store to combobox

14 Apr 2014, 3:45 AM
Hello i am get from server date to store with "url: /book/price" . And this response comes from the server

{status: "SUCCESS",
msg: "???????? ????????? ???????",
data: ["500","600"]}

This information from "data" I want to insert in combobox. I am create store, but don't know what write there: this store:

{extend: 'Ext.data.BaseStore',
autoLoad: true,proxy:
{ type: 'ajax',
url: '/book/price',
reader: {
type: 'json',
root: 'data',
successProperty: 'success' }}});
And in combobox i am don't know what write in valuefield

xtype: 'combobox',
width: 350,
store: 'price.Book',
valueField: '???'
Thanks for all answers

14 Apr 2014, 4:05 AM
Need to set the valueField as date field name, which is defined in BaseStore

Response should be in below format

data: [{"date": "500"},{"date": "600"}];

15 Apr 2014, 3:40 AM
If i am haven't field name in response from server i am have only this

{status: "SUCCESS",
msg: "???????? ????????? ???????",
data: ["500","600"]}

is there any other ways to solve this problem?

17 Apr 2014, 3:06 AM
i am want this data insert to combobox.
help me:)