slsb02
13 Oct 2012, 12:17 PM
Hello,
i have a question... The Combobox Store is empty, why?
Function:
var tax_classes_DataStore = new Array(); tax_classes_DataStore['data'] = new Array();
function function_tax_classes_DataStore(mainWindow) {
tax_classes_DataStore = Ext.create('Ext.data.Store', {
extend: 'Ext.data.Model',
fields: [
{name: 'tax_class_id', type: 'int'},
{name: 'tax_standard', type: 'string'},
{name: 'tax_rate', type: 'decimal'},
{name: 'name', type: 'string'},
],
proxy: {
actionMethods: { create: 'POST', read: 'POST', update: 'POST', destroy: 'POST' },
extraParams: { task: "get_db_tax_classes" },
type: 'ajax',
url : LoadDataHelperFile,
reader: {
type: 'json',
root: 'results',
totalProperty: 'total',
},
listeners: {
exception: function(proxy, response, operation) {
response = Ext.JSON.decode(response.responseText, true);
get_Proxy_Error_msg_box(response, "get_db_tax_classes", "load");
Ext.getCmp('PRODNew-addNewWindow').close();
}
}
}
}).load();
}
call Function:
if (tax_classes_DataStore.data.length <= 0) { function_tax_classes_DataStore('PRODNew-addNewWindow'); }
The Combox is add to a form. Select the Combobox the Store ist empty? When I look up the Store on the end of the function, the store is not empty...
i have a question... The Combobox Store is empty, why?
Function:
var tax_classes_DataStore = new Array(); tax_classes_DataStore['data'] = new Array();
function function_tax_classes_DataStore(mainWindow) {
tax_classes_DataStore = Ext.create('Ext.data.Store', {
extend: 'Ext.data.Model',
fields: [
{name: 'tax_class_id', type: 'int'},
{name: 'tax_standard', type: 'string'},
{name: 'tax_rate', type: 'decimal'},
{name: 'name', type: 'string'},
],
proxy: {
actionMethods: { create: 'POST', read: 'POST', update: 'POST', destroy: 'POST' },
extraParams: { task: "get_db_tax_classes" },
type: 'ajax',
url : LoadDataHelperFile,
reader: {
type: 'json',
root: 'results',
totalProperty: 'total',
},
listeners: {
exception: function(proxy, response, operation) {
response = Ext.JSON.decode(response.responseText, true);
get_Proxy_Error_msg_box(response, "get_db_tax_classes", "load");
Ext.getCmp('PRODNew-addNewWindow').close();
}
}
}
}).load();
}
call Function:
if (tax_classes_DataStore.data.length <= 0) { function_tax_classes_DataStore('PRODNew-addNewWindow'); }
The Combox is add to a form. Select the Combobox the Store ist empty? When I look up the Store on the end of the function, the store is not empty...