PDA

View Full Version : how to get param from combo in store url



willsun52000
22 Mar 2012, 9:30 PM
How to get the valuesfrom 'type' from details form in store url

Ext.define('model', {
extend : 'Ext.data.Model',
fields : [ {
name : 'name'
}, {
name : 'value'
} ]
});
var store = Ext.create('Ext.data.Store', {
autoLoad : false,
model : 'model',
proxy : {
type : 'ajax',
url : webContext + '/getOptionList.do?valuesfrom=...',
reader : {
type : 'json',
root : 'Option'
}
}
});
var details = Ext.create('Ext.form.Panel', {
items:{
xtype : 'combobox',
fieldLabel : 'type',
allowBlank : false,
displayField : 'name',
valueField : 'value',
store : store,
queryMode : 'remote',


valuesfrom : 'type'


},{
xtype : 'combobox',
fieldLabel : 'flag',
allowBlank : false,
displayField : 'name',
valueField : 'value',
store : store,
queryMode : 'remote',


valuesfrom : 'flag'


}

})

vietits
22 Mar 2012, 10:39 PM
Not sure what you want. Do you want to get value of valuesfrom property and append it to proxy url?

willsun52000
22 Mar 2012, 11:56 PM
Not sure what you want. Do you want to get value of valuesfrom property and append it to proxy url?
correct

vietits
23 Mar 2012, 12:15 AM
It seems that you can not do that because you create store before you create comboboxes. And there are two comboboxes, which combobox would you like to access to?