เอาล่ะ ฉันมีมุมมองที่ขยาย Ext.dataview.component.DataItem'
ฉันมีฟังก์ชันนี้
onNameButtonTap: function(button, e) {
var record = this.getRecord();
console.log("The tid of this record is: " + record.get('tid'));
}
ฉันสามารถรับ tid
กลับจากการแตะนี้ ซึ่งฉันต้องการใช้เพื่อโหลดมุมมองใหม่ซึ่งจะใช้รหัสนี้เพื่อแก้ไข 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
ขอบคุณสำหรับการอ่าน ฉันยังใหม่กับสิ่งนี้และหลังจากค้นหา Google เป็นเวลาหลายชั่วโมงฉันก็ไม่สามารถเข้าใจเรื่องนี้ได้
อัปเดต สิ่งนี้ใช้ได้กับฉัน
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()