у меня есть этот код
loadProducts: function(grid, rowData, newId){
return request.post(dojoConfig.urls.LOAD_PRODUCTS_SERVICES, {
handleAs: "json",
data: {accType: "Sales"}
}).then(lang.hitch(this, function(data){
data=data.data;
this.barcodeStore.setData(data);
this.barcodeObjStore = new ObjectStore({objectStore: this.barcodeStore});
}))
},
this.barcodeStore = new Memory({idProperty: 'id', data: []});
this.barcodeObjStore = new ObjectStore({objectStore: this.barcodeStore});
var barcodeColumn = {
field: 'barcode',
label: dojoConfig.i18n.barcode,
className: 'hand',
editor: Select,
autoSave: true,
editorArgs: {
searchAttr: 'barcode',
labelAttr: "barcode",
style: 'width: 95%',
store: this.barcodeObjStore
}
};
data in **loadProducts** method has this data
0: {id: 638, name: "General Product", barcode: "12345", rate: "0.0"}
1: {id: 639, name: "General Service", barcode: "asd1234, rate: "0.0"}
2: {id: 689, name: "sadsa", barcode: "4567", rate: "543.0"}
3: {id: 645, name: "product", barcode: "barfd", rate: "400.0"}
так что мой вопрос, как загрузить данные "штрих-кода" в this.barcodeObjStore ????
любая помощь будет принята с благодарностью .... и извините меня, поскольку я новичок в додзё