当此列表显示在面板中时,我在加载嵌套列表数据时遇到问题。下面是我的代码:
var titleBar = Ext.create("Ext.TitleBar", {
id: 'mainNavigationBar',
xtype : 'titlebar',
layout: 'hbox',
docked: 'top',
title : 'cSenchaTitleBar',
items:[
{
xtype:"button",
text:"Menu",
align:"left",
listeners:{
tap: function(){
nestedListxx.showBy(this);
}
}
},
]
});
var nestedList =
Ext.create('Ext.NestedList', {
displayField: 'text',
title:"cSenchaMenu",
store: "oNavStore",
id: 'mainNestedList',
xtype : 'nestedlist',
width:250,
useTitleAsBackText: false,
});
var nestedListxx = Ext.create("Ext.Panel", {
width:260,
items:nestedList
});问题是这样的:假设我将nestedListxx.showBy(this);改为nestedList.showBy(this);,它的效果很不错,只是嵌套列表周围没有光滑的黑色边框。但是如果我把它改回来,它确实会显示带有漂亮边框的嵌套列表,但没有任何数据。
我知道我确实忘了设置一些关键配置,唯一的问题是:哪些关键配置
发布于 2012-06-05 19:07:58
你可能需要为你的Ext.Panel设置一个布局。
尝试:
var nestedListxx = Ext.create("Ext.Panel", {
width:260,
layout:'fit',
items:nestedList
});希望这能有所帮助
https://stackoverflow.com/questions/10894130
复制相似问题