六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 30|回复: 0

国家、省市区县Combox联动,动态加载数据

[复制链接]

升级  84%

10

主题

10

主题

10

主题

童生

Rank: 1

积分
42
 楼主| 发表于 2013-1-29 11:35:39 | 显示全部楼层 |阅读模式
国家、省市区县Combox联动,动态加载数据{fieldLabel : '组织所属国家',hiddenName : 'sysOrganize.country',id : 'country',xtype : 'combo',editable : false,emptyText : '请选择······',mode : "local",lazyInit : false,allowBlank : false,forceSelection: true,    displayField : 'country',valueField : 'country',triggerAction : 'all',anchor : '95%',store : new Ext.data.SimpleStore({autoLoad : true,url : __ctxPath+ '/sys/base/loadSysDictionary.do?dataType=TYPE56fd7c4d',fields : ['country', 'country']}),listeners : {'select' : function(combo, record,index) {   var parent = Ext.getCmp('province')   parent.clearValue();   var paStore = parent.getStore();   Ext.Ajax.request({       url : __ctxPath+ '/sys/base/loadSysDictionary.do',   method : 'post',        params:{        dataType:combo.value       },       success : function(response) {var result = Ext.util.JSON.decode(response.responseText);paStore.loadData(result);}        })}}}, {fieldLabel : '所属省',hiddenName : 'sysOrganize.province',id : 'province',xtype : 'combo',    displayField : 'province',valueField : 'province',editable : false,mode : "local",emptyText : '请选择······',lazyInit : false,forceSelection: true,allowBlank : false,triggerAction : 'all',anchor : '95%',store : [],listeners : {'select' : function(combo, record,index) {   var parent = Ext.getCmp('city')   parent.clearValue();   var paStore = parent.getStore();   Ext.Ajax.request({       url : __ctxPath+ '/sys/base/loadSysDictionary.do',   method : 'post',        params:{        dataType:combo.value       },       success : function(response) {var result = Ext.util.JSON.decode(response.responseText);paStore.loadData(result);}        })}}}, {fieldLabel : '市(区、县、镇、乡)',hiddenName : 'sysOrganize.city',id : 'city',xtype : 'combo',    displayField : 'city',valueField : 'city',editable : false,mode : "local",emptyText : '请选择······',lazyInit : false,forceSelection: true,allowBlank : false,triggerAction : 'all',anchor : '95%',store : []},
 
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表