我有三个组合框,一次选择第一个,我希望第二个和第三个组合框加载尊重的值。这是我的代码片段。
{
xtype : 'combo',
store : 'product.CategoryComboBox',
name: 'category',
displayField: 'name',
valueField: 'idProductCategory',
multiSelect : false,
fieldLabel: 'Category',
allowBlank: false,
allowQueryAll : false,
forceSelection : true,
typeAhead: true,
triggerAction: 'all',
delimiter : ',',
width: 300,
mode: 'local',
listeners:{select:{fn:function(combo, value) {
var attribute = Ext.getCmp('attributes');
var feature = Ext.getCmp('features');
attribute.setValue('');
attribute.store.removeAll();
attribute.setDisabled(false);
attribute.store.load({
params: {id: 5}
});
feature.setValue('');
feature.setDisabled(false);
feature.store.removeAll();
feature.store.load({
params: {id: 5}
});
//attribute.store.filter('abbr', 1);
}}}
}
这里我遇到的问题是,我必须首先选择第二个和第三个组合框,然后选择第一个组合框才能正确加载数据。如果先选择第一个组合框,则不会在第二个和第三个组合上加载选项。
发布于 2013-01-30 17:31:52
使用change listener而不是select listener,我想你可以做到这一点。
https://stackoverflow.com/questions/14604881
复制相似问题