extjs实现formPanel问题
想实现的功能是左边树形菜单点击之后弹出一个窗口,但是老是报TypeError:compisundefined这个错误,太坑爹了functiondatabaseInfoFn...
想实现的功能是左边树形菜单点击之后弹出一个窗口,但是老是报
TypeError: comp is undefined这个错误,太坑爹了
function databaseInfoFn(){
var dbForm = new Ext.FormPanel({
id:"dbForm",
width:340,
height:130,
frame:true,
labelAlign:"right",
monitorValid:true,
items:[],
buttons:[]
});
var dbWindow = new Ext.Window({
width:340,
height:180,
title:"给角色分配权限",
items:dbForm,
autoScroll:true,
resizable:true,
draggable:true,
closable:true
});
dbWindow.show();
if (!databaseInfoFnPageIsOpen) {
var tabPage = tabPanel.add({
title : "数据库管理",
height : 400,
closable : true,
layout : "fit",
items : [ dbForm ],
listeners : {
beforedestroy : function() {
databaseInfoFnPageIsOpen = false;
}
}
});
tabPanel.setActiveTab(tabPage);
databaseInfoFnPageIsOpen = true;
}
}
如下的代码删掉,还是一样的错,故与下面的代码无关
if (!databaseInfoFnPageIsOpen) {
var tabPage = tabPanel.add({
title : "数据库管理",
height : 400,
closable : true,
layout : "fit",
items : [ dbForm ],
listeners : {
beforedestroy : function() {
databaseInfoFnPageIsOpen = false;
}
}
});
tabPanel.setActiveTab(tabPage);
databaseInfoFnPageIsOpen = true;
} 展开
TypeError: comp is undefined这个错误,太坑爹了
function databaseInfoFn(){
var dbForm = new Ext.FormPanel({
id:"dbForm",
width:340,
height:130,
frame:true,
labelAlign:"right",
monitorValid:true,
items:[],
buttons:[]
});
var dbWindow = new Ext.Window({
width:340,
height:180,
title:"给角色分配权限",
items:dbForm,
autoScroll:true,
resizable:true,
draggable:true,
closable:true
});
dbWindow.show();
if (!databaseInfoFnPageIsOpen) {
var tabPage = tabPanel.add({
title : "数据库管理",
height : 400,
closable : true,
layout : "fit",
items : [ dbForm ],
listeners : {
beforedestroy : function() {
databaseInfoFnPageIsOpen = false;
}
}
});
tabPanel.setActiveTab(tabPage);
databaseInfoFnPageIsOpen = true;
}
}
如下的代码删掉,还是一样的错,故与下面的代码无关
if (!databaseInfoFnPageIsOpen) {
var tabPage = tabPanel.add({
title : "数据库管理",
height : 400,
closable : true,
layout : "fit",
items : [ dbForm ],
listeners : {
beforedestroy : function() {
databaseInfoFnPageIsOpen = false;
}
}
});
tabPanel.setActiveTab(tabPage);
databaseInfoFnPageIsOpen = true;
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询