0
这里是我的煎茶观点:Sehch触摸呼叫控制器挖掘
Ext.application({
name: 'Sencha',
launch: function() {
var panel = new Ext.Panel({
fullscreen: true,
dockedItems: [
{
xtype: "label",
dock: "top",
html: "<div style='backbround'>KK TEST",
style: "width:100%;text-align:center;font-weight:bold"
},
{
xtype: "toolbar",
items: [
{
iconMask: true,
iconCls: "download"
},
{
iconMask: true,
iconCls: "favorites"
},
{
iconMask: true,
iconCls: "search"
},
{
iconMask: true,
iconCls: "user"
}
]
},
{
xtype: 'list',
itemTpl: '{title}',
store: {
fields: ['title', 'url'],
data: [
{title: 'Locate a centre', url: 'ext-scheduler-2-0-upgrading-to-ext-js-4'},
{title: '<a href="/centres" style="color:#FFFFFF;text-decoration:none;">Browse all kwikkopy centres</a>', url: 'sencha-touch-2-what-to-expect'},
{title: 'Sencha Con 2011', url: 'senchacon-2011-now-packed-with-more-goodness'},
{title: 'Documentation in Ext JS 4', url: 'new-ext-js-4-documentation-center'}
]
},
itemConfig: {
tpl: '{url}'
},
listeners: {
select: function(itemConfig) {
console.log(store)
alert('tapped on '+ itemConfig )
}
}
}
]
}); }
});
我想打电话给控制器和重定向到下一个页面,当我点击一个列表项。 我该怎么做?
谢谢您的回答和提问的编辑。 我改变了代码,正如你所说,现在它错误''未捕获TypeError:对象#
您使用的是sencha touch 2吗?如果是这样,这就是为什么Ext没有方法'派遣',因为我还不熟悉ST2我不能帮你。如果你没有使用sencha touch,那么检查你是否包含了sencha touch js文件,并检查在调用itemtap函数之前是否还有另一个异常。但是你可能使用ST2 .. :) – ilija139
完美..我使用sencha touch 2 ..感谢有价值的信息... – Pravin