我有一个从网址中检索到的商店。 url接受参数以返回正确的值数组以填充下拉列表(选择)。我从完整列表初始化下拉列表,在用户交互后,我尝试使用新对象值更新商店和下拉列表。我可以获取代理URL并更新它,我可以获得商店并清除它。但每当我加载()或重载()原始列表(就好像代理与init相同)进入下拉列表而不是过滤后的列表。 另一个奇怪的事情是方法getProxy()和refresh()似乎不可用。我使用的是EXTjs 3.4 这就是我创建商店的方式:
Ext.namespace('Ext.emailData');
Ext.emailData.storedEmails = new Ext.data.Store({
reader: new Ext.data.JsonReader({
fields: ['email','id'],
root: 'result'
}),
proxy: new Ext.data.HttpProxy({
url: '/emailContact/list',
method: 'POST'
}),
sortInfo: {field: 'email', direction: 'ASC'}
});
//
// now this is how I try to update it after associating it with the selectbox
//
var myfield = Ext.getCmp('my_form').getForm().findField('recipient_input');
myfield.clearValue();
myfield.getStore().proxy.url = '/emailContact/list' + getListById();
myfield.getStore().reload();
//
// and this is how I add the store to the select
//
store: Ext.emailData.storedEmails,