ext 级联菜单

 var modelStore =  new Ext.data.JsonStore({
   url:'<%=path%>/servlet/common?action=getModel',
      fields : ['modelid', 'model_name']
     
  });
    modelStore.load();
 var modelbox = new Ext.form.ComboBox({  
        fieldLabel : '选择(输入)模板',
       
        hiddenName : 'model_name',
        store :modelStore,  
        valueField : 'model_name',  
        displayField : 'model_name',  
        typeAhead : true,  
        mode : 'local',  
        triggerAction : 'all',  
        allowBlank:false,  
        blankText : '请选择或者输入模板',  
        emptyText : '选择或者输入模板',
        editable: true,
        selectOnFocus : true,  
        width : 190

     });
     var orgStore =  new Ext.data.JsonStore({
   url:'<%=path%>/servlet/common?action=getajtype',
      fields : ['ajtypeid', 'classname']
     
  });
  orgStore.load();
 var orgbox = new Ext.form.ComboBox({  
        fieldLabel : '选择案件类型',
       
        hiddenName : 'ajtypeid',
        store :orgStore,  
        valueField : 'ajtypeid',  
        displayField : 'classname',  
        typeAhead : true,  
        mode : 'local',  
        triggerAction : 'all',  
        allowBlank:false,  
        blankText : '请选择案件类型',  
        emptyText : '选择案件类型',
        editable: true,
        selectOnFocus : true,  
        width : 190,
        listeners:{
         "select":function(orgbox,record,index){
           var codeId = orgbox.getValue();
           //modelStore.load({params:{code:codeId}});
           modelStore.proxy=new Ext.data.HttpProxy({url:'<%=path%>/servlet/common?action=getModel&code='+codeId});
           modelStore.load();
           Ext.getCmp(modelbox.id).setValue('');
          } 
        }

     });

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值