sencha touch - 手风琴布局
在这段代码中......
var panel = new Ext.Panel({
fullscreen : true,
scroll : "vertical",
layout : {
type : "accordion"
},
items: [
{ xtype : "panel", title : "One Title", html : "One" },
list,
{ xtype : "panel", title : "Three Title", html : "Three" },
{ xtype : "panel", title : "Four Title", html : "Four" },
{ xtype : "panel", title : "Five Title", html : "Five" },
{ xtype : "panel", title : "Six Title", html : "Six" }
]
});
在此,面板标题被硬编码为一个标题,三个标题等。但我想显示我从数据库中获得的结果(我已经创建了模型,并且我得到了结果显示)作为每个面板的标题...如何迭代和显示..请帮助我..
In this code ...
var panel = new Ext.Panel({
fullscreen : true,
scroll : "vertical",
layout : {
type : "accordion"
},
items: [
{ xtype : "panel", title : "One Title", html : "One" },
list,
{ xtype : "panel", title : "Three Title", html : "Three" },
{ xtype : "panel", title : "Four Title", html : "Four" },
{ xtype : "panel", title : "Five Title", html : "Five" },
{ xtype : "panel", title : "Six Title", html : "Six" }
]
});
In this, the panel title were hard coded as One title, Three title, etc.. but i want to display the result what i am getting from database (i have created the model and i got the result to display) as title of each panel ... how to iterate and show .. pls help me..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以将结果收集到一个数组中,然后将该数组添加到面板的项目中。可能是这样的:
You could collect the results in an array then add this array to panel's items. Could be something like this:
我通过使用以下内容获得了手风琴面板中的动态值
I got the dynamic value in accordion panel by using the following