Ext-界面间调用不成功 求解

Tim_Chase 2009-08-19 09:41:08
//Application.js内容
Application = Ext.extend(Ext.Viewport, {
filePanel : null,
fileCommentPanel:null,
constructor : function(_cfg) {
this.filePanel = new FilePanel(this);
this.fileCommentPanel=new FileCommentPanel();
Application.superclass.constructor.call(this, {
layout : 'border',
items : [ this.headerPanel, {
title : '文件目录',
region : 'west',
layout : 'border',
margins : '2 0 5 5',
width : 275,
minSize : 200,
maxSize : 350,
collapsible : true,
split : true,
items : [this.fileTreePanel, {
region : 'south',
title : '文件信息',
autoScroll : true,
collapsible : true,
collapseMode : 'mini',
collapsed : true,
split : true,
margins : '-1',
cmargins : '2 2 2 2',
height : 220,
html : '未开发...'
}]
},
this.fileCommentPanel ,
this.filePanel,

{

xtype : 'box',
region : 'south',
applyTo : 'footer',
height : 40
}]

});
}
});



//FileCommentPanel.js内容
FileCommentPanel = Ext.extend(Ext.Panel,{
constructor:function(){

FileCommentPanel.superclass.constructor.call(this, {
title : '文件互动',
region : 'east',
id:'fc',
//layout : 'border',
//margins : '2 0 5 0',
width : 200,
minSize : 200,
maxSize : 350,
collapsible : true,
collapsed : true,
split : true

});
}
});
怎么界面无法显示appliction里面的items.
如果把FileCommentPanel里面的
{
title : '文件互动',
region : 'east',
id:'fc',
//layout : 'border',
//margins : '2 0 5 0',
width : 200,
minSize : 200,
maxSize : 350,
collapsible : true,
collapsed : true,
split : true

}替换Application.js里面的items里面的this.fileCommentPanel,运行正常
不知道是为什么.
小弟分不多但求求高人指点.
...全文
110 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
xiongzhijian 2009-08-26
  • 打赏
  • 举报
回复
d
Tim_Chase 2009-08-25
  • 打赏
  • 举报
回复
FilePanel = Ext.extend(Ext.TabPanel, {
app : null,
constructor : function(application) {
this.app = application;
FilePanel.superclass.constructor.call(this, {
region : 'center',
deferredRender : false,
activeTab : 0,
items : [new Ext.Panel({
title : '管理中心'
})]
});

}
});
foolbirdflyfirst 2009-08-25
  • 打赏
  • 举报
回复
FilePanel又是怎么写的?
Tim_Chase 2009-08-25
  • 打赏
  • 举报
回复
但是
this.filePanel,
为什么又可以呢?
foolbirdflyfirst 2009-08-25
  • 打赏
  • 举报
回复
你是不是搞错了,this.fileCommentPanel那个地方需要的是一个json格式的参数值,就是
{
title : '文件互动',
region : 'east',
id:'fc',
//layout : 'border',
//margins : '2 0 5 0',
width : 200,
minSize : 200,
maxSize : 350,
collapsible : true,
collapsed : true,
split : true

}
这个东西,而你this.fileCommentPanel=new FileCommentPanel(); 这样的得到的是一个从Ext.panel扩展的类的实例化对象。它们是不一样的。
Jey 2009-08-25
  • 打赏
  • 举报
回复
up
Tim_Chase 2009-08-25
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 zwf0731 的回复:]
是不是多个region : 'south',

给覆盖了~~~~~~~~~~



[/Quote]

{

xtype : 'box',
region : 'south',
applyTo : 'footer',
height : 40
}
里面的region:'south'吗?
我把它注释掉了..但是还是不行.
Tim_Chase 2009-08-25
  • 打赏
  • 举报
回复

{

xtype : 'box',
region : 'south',
applyTo : 'footer',
height : 40
}
里面的region:'south'吗?
我把它注释掉了..但是还是不行.
胡须棉花糖 2009-08-20
  • 打赏
  • 举报
回复
up
  • 打赏
  • 举报
回复
是不是多个region : 'south',

给覆盖了~~~~~~~~~~



Tim_Chase 2009-08-19
  • 打赏
  • 举报
回复
怎么没人回复哟?

52,797

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Ajax
社区管理员
  • Ajax
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧