-
- var parentStore = new Ext.data.Store({
- proxy: new Ext.data.HttpProxy({
- url: 'loadByParentid.action?parentid=1001'
- }),
- reader: new Ext.data.JsonReader({
- root: 'list',
- id: 'id'
- }, [
- {name: 'id', mapping: 'id'},
- {name: 'mc', mapping: 'name'}
- ])
- });
-
- var childStore = new Ext.data.Store({
- proxy: new Ext.data.HttpProxy({
-
- url: 'loadByParentid.action?parentid=1001'
- }),
- reader: new Ext.data.JsonReader({
- root: 'list',
- id: 'id'
- }, [
- {name: 'id', mapping: 'id'},
- {name: 'mc', mapping: 'name'}
- ])
- });
-
- {
- fieldLabel: '请选择分类',
- xtype:'combo',
- store: parentStore,
- valueField :"id",
- displayField: "mc",
- mode: 'local',
- forceSelection: true,
- emptyText:'请选择分类...',
- hiddenName:'interviewsDetail.parent_category',
- editable: false,
- triggerAction: 'all',
-
- id : 'parent_id',
- name: 'parent',
- width: 400,
- listeners:{
- select : function(combo, record,index){
- childStore.proxy= new Ext.data.HttpProxy({url: 'loadByParentid.action?parentid=' + combo.value});
- childStore.load();
- }
- }
- },{
- xtype:'combo',
- store: childStore,
- valueField :"id",
- displayField: "mc",
-
- mode: 'local',
- forceSelection: true,
- emptyText:'请选择子分类...',
- hiddenName:'interviewsDetail.child_category',
- editable: false,
- triggerAction: 'all',
-
- fieldLabel: '选择',
- id : 'child_id',
- name: 'child',
- width: 400
- }