xtype : 'combo',
fieldLabel : '上级岗位',
id : 'parentPosition',
hiddenName : 'parentId',
valueField : 'id',
displayField : 'name',
mode : 'remote',
store : new Ext.data.Store({
autoLoad : true,
proxy : new Ext.data.HttpProxy({
url : 'getAllPosition.do'
}),
reader : new Ext.data.JsonReader({
root : 'positionList'
}, [{name : 'id',type : 'string'},
{name : 'name',type : 'string'}
])
}),
allowBlank : false,
selectOnFocus : true,
editable : false,
triggerAction : 'all',
loadingText : '加载中...',
listeners : {
'select' : function(combo, record, index){
}
}
如下图,combo的选项出现在了window的后方
title : '编辑岗位',
width : 350,
resizable : false,
autoHeight : true,
modal:true,
closeAction : 'hide'
}
title : '编辑岗位',
width : 350,
height : 440,
resizable : false,
autoHeight : true,
modal:true,
closeAction : 'hide',
listeners : {
hide : function(){
this.setTitle('编辑岗位');
this.findById('update.position.name').ownerCt.form.reset();
}
},
items : [new Ext.FormPanel({
labelWidth : 70 ,
labelAlign : 'right',
url : 'updatePosition.do',
border : false,
baseCls : 'x-plain',
bodyStyle : 'padding:5px 5px 0',
anchor : '100%',
defaults : {
width : 233,
msgTarget : 'side'
},
defaultType : 'textfield',
items:[{
xtype : 'hidden',
name : 'id',
id : 'update.position.id'
},{
fieldLabel : '岗位名称',
id : 'update.position.name',
name : 'name',
allowBlank : false,
maxLength : 50
},{
fieldLabel : '岗位级别',
id : 'update.position.level',
name : 'level',
maxLength : 50
},{
xtype : 'combo',
fieldLabel : '上级岗位',
id : 'update.parentPosition',
hiddenName : 'parentId',
name: 'parentPosition',
valueField : 'id',
displayField : 'name',
mode : 'remote',
store : new Ext.data.Store({
autoLoad : true,
proxy : new Ext.data.HttpProxy({
url : 'getAllPosition.do'
}),
reader : new Ext.data.JsonReader({
root : 'positionList'
}, [{name : 'id',type : 'string'},
{name : 'name',type : 'string'}
])
}),
allowBlank : false,
selectOnFocus : true,
editable : false,
triggerAction : 'all',
loadingText : '加载中...',
listeners : {
'select' : function(combo, record, index){
}
}
},{
xtype : 'textarea',
fieldLabel :'备注',
name : 're',
maxLength : 200
}],
buttonAlign : 'center',
minButtonWidth : 60,
buttons : [{
text : '保存',
handler : function(btn){
var frm = this.ownerCt.ownerCt.form;
if(frm.isValid()){
btn.disable();
frm.submit({
waitTitle : '请稍后...',
waitMsg : '正在提交表单数据,请稍后...',
success : function(form,action){
btn.enable();
Ext.Msg.show({
title : '成功提示',
msg : '数据修改成功!',
buttons : Ext.Msg.OK,
fn : function(){btn.enable()},
icon : Ext.Msg.INFO
});
},
failure : function(){
Ext.Msg.show({
title : '错误提示',
msg : '保存数据时出错!',
buttons : Ext.Msg.OK,
fn : function() {
btn.enable();
},
icon : Ext.Msg.ERROR
});
}
})
}
}
},{
text : '重置',
handler : function(btn){
var record=system.position.grid.getSelectionModel().getSelected();
if(record){
this.ownerCt.ownerCt.form.loadRecord(record);
}
}
},{
text : '取消',
handler : function(btn){
this.ownerCt.ownerCt.ownerCt.hide();
}
}]})]
});各位看官,帮忙看看
width : 233,
msgTarget : 'side'
},
这个去掉 看看
{
xtype:'combo',
fieldLabel : '用户组',
id:'roleCombo',
store:storeAddRole, //数据源
displayField:'RNAME',
valueField: 'ROID',
typeAhead: true,
loadingText: '正在读取请等待...',
minChars:1,
forceSelection:true,
triggerAction: 'all',
anchor : '95%',
allowBlank : false,
blankText : '用户组不能为空'
}感觉应该是你的hiddenName : 'parentId',name: 'parentPosition',这两属性的问题!一起只需要ID就可以,如果还不行,你试试我的代码改改,还有换个浏览器测试下