EXTJS4.2 级联 下拉

items: [
        {
            xtype: "fieldcontainer",
            layout: "hbox",
            items: [{
                xtype: 'combo', 
                name: 'ModelId',
                fieldLabel: '服务模型',
                store: comStore_CCServiceModel,
                valueField: "ModelId",
                displayField: "ModelName",
                mode: 'remote',//local
                editable: false,
                triggerAction: 'all',
                autoload: true,
                listeners: {
                    "select": function (combo, store, index) {

                        var CCTypeId = form.form.findField('CCTypeId');
                        CCTypeId.clearValue();

                        var ModelId = form.form.findField("ModelId").getValue();
                        CCTypeId.store.load({
                            params: {
                                ModelId: ModelId
                            }
                        });
                    }
                }              
            }]
        },{
            xtype: "fieldcontainer",
            layout: "hbox",
            items: [{
                xtype: 'combo',
                name: 'CCTypeId',
                fieldLabel: '服务方式',
                store: comStore_CCServiceCategory,
                valueField: "CCTypeId",
                displayField: "CCTypeName",
                editable: false,
                triggerAction: 'all',
                allowBlank: false,
                autoload: false,
                queryMode: 'local',
            }]
        },

 

posted @ 2017-01-11 15:26  秋风过、枯叶落  阅读(331)  评论(0编辑  收藏  举报