List 容器中未显示ExtJs列表
我有一个装有三件物品的容器:List 容器中未显示ExtJs列表,list,extjs,sencha-touch-2,List,Extjs,Sencha Touch 2,我有一个装有三件物品的容器: ombrelloneButton = Ext.create('Ext.Button', { id: 'btnOmbr', iconMask: true, iconCls: 'action', text: 'Ombrellone' }); lettinoButton = Ext.create('Ext.Button', { id: 'btnLett', iconMask: true, iconCls: 'action', text: 'Lettino' }); t
ombrelloneButton = Ext.create('Ext.Button', {
id: 'btnOmbr',
iconMask: true,
iconCls: 'action',
text: 'Ombrellone'
});
lettinoButton = Ext.create('Ext.Button', {
id: 'btnLett',
iconMask: true,
iconCls: 'action',
text: 'Lettino'
});
toolbarPostazione = Ext.create('Ext.Toolbar',{
layout: {
pack: 'center'
}, // layout
ui: 'plain',
items: [ombrelloneButton,
lettinoButton]
});
Ext.define('appTrial.view.Postazione.Postazione',{
extend: 'Ext.form.Panel',
xtype: 'Postazione',
alias: 'widget.Postazione',
controllers:['AssociaAttivitaController'],
models : ['appTrial.model.AttivitaModel'],
config : {
id : 'PostazioneId',
title : 'Welcome',
resizable : false,
collapsible : true,
bodyPadding : '5',
buttonAlign : 'center',
border : false,
trackResetOnLoad : true,
items : [{
docked: 'top',
xtype: 'titlebar',
title: 'Welcome to My New App!!!'
},
{
xtype: 'container',
name: 'mainContainer',
id: 'postazioneContainer',
layout: {
type: 'vbox',
align: 'center',
pack: 'center'
},
//width : '100%',
items : [{
layout: {
pack: 'center'
},
html :'<p style="color: red; text-align: center; font-size: 20px" >Complimenti!</p><br><p style="text-align: center; font-size: 16px">Sei stato associato alla attivita '+dummyAttivita.get('nomeAttivita')+'!</p>' +
'<br><p style="text-align: center; font-size: 16px">Ora associa la tua postazione:</p>',
margin: '80 0 50 0'
},
toolbarPostazione,
{
xtype: 'PostazioniList',
title:'PostazioniAssociate',
id: 'PostazioniAssociate'
}
]
}]
}
});
ombrelloneButton=Ext.create('Ext.Button'{
id:'btnOmbr',
是的,
iconCls:“行动”,
文字:“Ombrellone”
});
lettinoButton=Ext.create('Ext.Button'{
id:'btnLett',
是的,
iconCls:“行动”,
文字:“Lettino”
});
toolbarPostazione=Ext.create('Ext.Toolbar'{
布局:{
包装:'中心'
},//布局
ui:'普通',
项目:[ombrelloneButton,
lettinoButton]
});
Ext.define('appTrial.view.Postazione.Postazione'{
扩展:“Ext.form.Panel”,
xtype:“Postazione”,
别名:“widget.Postazione”,
控制器:['AssociativeController'],
模型:['appTrial.model.AttivitaModel'],
配置:{
id:“PostazioneId”,
标题:"欢迎",,
可调整大小:false,
可折叠的:是的,
车身填充:“5”,
buttonAlign:'中间',
边界:错,
trackResetOnLoad:true,
项目:[{
停靠:“顶部”,
xtype:'标题栏',
标题:“欢迎使用我的新应用!!!”
},
{
xtype:'容器',
名称:“mainContainer”,
id:“postazioneContainer”,
布局:{
键入:“vbox”,
对齐:'居中',
包装:'中心'
},
//宽度:“100%”,
项目:[{
布局:{
包装:'中心'
},
html:“恭维!
Sei stato associatito alla attivta'+dummyattivta.get('nomattivita')+”!
'+
“
Ora associa la tua postazione:
”,
边距:“80 0 50 0”
},
锡安,
{
xtype:“PostazioniList”,
标题:'PostazioniaSociate',
id:“PostazioniaSociate”
}
]
}]
}
});
显示前两个(html文本和工具栏),而不显示PostazioniList。
它是这样完成的(List.js):
Ext.define('appTrial.view.Postazione.List'{
扩展:“Ext.List”,
xtype:“PostazioniList”,
别名:“widget.PostazioniList”,
itemTpl:“{tipoPostazione}num.{numPostazione}”,
数据:[{
tipoPostazione:“Ombrellone”,
numPostazione:'5'
},
{
tipoPostazione:“Ombrellone”,
numPostazione:'37'
},
{
tipoPostazione:“Lettino”,
numPostazione:'46d'
}]
});
这可能是html问题吗?
我也不明白为什么我没有得到任何错误,只是它被隐藏了
提前感谢我已经能够显示列表设置的高度和宽度,但是没有显示文本…有什么帮助吗?您是否有特定的原因试图在容器中显示列表,然后在表单中显示列表?不,这是我在开始时使用的结构;然后,我将表单内容移动到“toolbarPostazione”中,出于这个原因,现在我尝试将主页设置为简单的Ext.tab.Panel,但我得到了以下错误:“未捕获错误:[错误][Ext.Container#doAdd]在未指定任何选项卡配置的情况下向选项卡容器添加卡片”。有什么想法吗?
Ext.define('appTrial.view.Postazione.List', {
extend: 'Ext.List',
xtype: 'PostazioniList',
alias: 'widget.PostazioniList',
itemTpl: '<div>{tipoPostazione} num.{numPostazione}</div>',
data: [{
tipoPostazione: 'Ombrellone',
numPostazione: '5'
},
{
tipoPostazione: 'Ombrellone',
numPostazione: '37'
},
{
tipoPostazione: 'Lettino',
numPostazione: '46d'
}]
});