【发布时间】:2014-04-08 03:55:54
【问题描述】:
好的,所以我有一个扩展Ext.dataview.component.DataItem'的视图我有这个功能
onNameButtonTap: function(button, e) {
var record = this.getRecord();
console.log("The tid of this record is: " + record.get('tid'));
}
我可以从这个点击中得到一个tid,我想用它来加载一个新的视图,该视图将使用这个 id 来改变代理 url 以取回不同的数据。这是视图:
Ext.define('AIN.view.Headlines.Card', {
extend: 'Ext.NavigationView',
xtype: 'headlineContainer',
config: {
tab: {
title: 'Headlines',
iconCls: 'star',
action: 'headlinesTab'
},
autoDestroy: false,
items: [
{
xtype: 'headlines',
store: 'Headlines',
}
]
}
});
如何在我的商店中获取 url 参数以接受这样的 URL
'http://mywebsite.com/app-feeds/channels/' + tid
感谢阅读,我是新手,经过数小时的谷歌搜索后,我无法完全弄清楚。
更新,这对我有用。
var store = Ext.StoreMgr.get('Headlines');
store: store.setProxy({
type: 'jsonp',
url: 'http://awebsite.com/app-feeds/channels/' + tid,
reader: {
type: 'json',
rootProperty: 'nodes',
record: 'node'
}
}).load()
【问题讨论】:
标签: extjs sencha-touch