deathzbr
14 Feb 2012, 3:35 PM
Hi guys,
I'm also new to Ext JS and I'm trying it out to replace jQuery on projects and obviosly I'm having trouble doing it. Currently what is keeping me stuck is trying to RE-load data from a Store into a Combobox.
Store code goes as follows:
var supplierStore = new Ext.data.Store({
model: 'supplierModel'
,autoLoad: false
,proxy: {
type: 'ajax'
,url: '/Webservice.aspx?QueryTemplate=Capacity%2FSelectSupplierPlant&IsTesting=T&Content-Type=text%2Fxml'
,reader: {
type: 'xml'
,record: 'Row'
,idProperty: 'ID'
}
}
});
This store is build with a Webservice that I have that returns a XML structure from a SQL query.
Then I have a combo box that uses this store as follows:
{columnWidth: .36
,border: false
,items:[{
xtype: 'combo'
,fieldLabel: 'Supplier'
,store: supplierStore
,width: 336
,labelWidth: 80
,valueField: 'ID_SUPPLIER'
,displayField: 'DS_SUPPLIER'
,queryMode: 'local'
,lastQuery: null
,triggerAction: 'all'
,id: 'comboSupplier'
,ready: false
}]
}
Now my problem is, sometimes I have to pass one parameter to the store in order to change the suppliers available for my datacenter, so I do it with the following command:
var datacenter = Ext.getCmp('datacenter').getValue();
Ext.apply(supplierStore.getProxy().extraParams, {
'Param.1' : datacenter
});
supplierStore.load();
When I do this, the suppliers Combobox is actually reloaded with the correct informatoin, but there is a Loading mask in front of it that will NOT go away.
What can I do?
Thanks and Best regards,
Guilherme
I'm also new to Ext JS and I'm trying it out to replace jQuery on projects and obviosly I'm having trouble doing it. Currently what is keeping me stuck is trying to RE-load data from a Store into a Combobox.
Store code goes as follows:
var supplierStore = new Ext.data.Store({
model: 'supplierModel'
,autoLoad: false
,proxy: {
type: 'ajax'
,url: '/Webservice.aspx?QueryTemplate=Capacity%2FSelectSupplierPlant&IsTesting=T&Content-Type=text%2Fxml'
,reader: {
type: 'xml'
,record: 'Row'
,idProperty: 'ID'
}
}
});
This store is build with a Webservice that I have that returns a XML structure from a SQL query.
Then I have a combo box that uses this store as follows:
{columnWidth: .36
,border: false
,items:[{
xtype: 'combo'
,fieldLabel: 'Supplier'
,store: supplierStore
,width: 336
,labelWidth: 80
,valueField: 'ID_SUPPLIER'
,displayField: 'DS_SUPPLIER'
,queryMode: 'local'
,lastQuery: null
,triggerAction: 'all'
,id: 'comboSupplier'
,ready: false
}]
}
Now my problem is, sometimes I have to pass one parameter to the store in order to change the suppliers available for my datacenter, so I do it with the following command:
var datacenter = Ext.getCmp('datacenter').getValue();
Ext.apply(supplierStore.getProxy().extraParams, {
'Param.1' : datacenter
});
supplierStore.load();
When I do this, the suppliers Combobox is actually reloaded with the correct informatoin, but there is a Loading mask in front of it that will NOT go away.
What can I do?
Thanks and Best regards,
Guilherme