json에서 채워진 간단한 목록이 있습니다. 항목 중 하나를 탭하면 새보기가 나타납니다. List는 Ext.navigation.View 내에 있습니다.Sencha Touch 2에서 항목을 탭한 후 새 뷰를 누르십시오.
내 컨트롤러 여기
Ext.define('Trainz.controller.StationListController', {
extend: 'Ext.app.Controller',
config: {
models: [
'Station'
],
stores: [
'Stations'
],
views: [
'Main'
],
control: {
"list": {
itemtap: 'onListItemTap'
}
}
},
onListItemTap: function(dataview, index, target, record, e, eOpts) {
console.log(record);
}
});
그리고 내가 내가 onListItemTap
기능에 뭔가를 넣어 한 추측
Ext.define('Trainz.view.StationDetailView', {
extend: 'Ext.Panel',
config: {
}
});
을 추진하려는 (현재 비어 있음)이다 만의 삶 나 can not는 무엇을 계산한다. Google의 4 가지 코드 스 니펫을 사용해보고 오류가 다시 발생했습니다. 적절한 방법은 무엇입니까?
나는 차이를 만드는 경우 Sencha Architect을 사용하고 있습니다. 여기
참조에 대한 전체 초기이다 : 당신은 당신의 navigationview를 검색 한 후해야 할 필요가
Ext.define('Trainz.view.Main', {
extend: 'Ext.tab.Panel',
config: {
tabBar: {
docked: 'bottom'
},
items: [
{
xtype: 'navigationview',
title: 'Stations',
iconCls: 'maps',
items: [
{
xtype: 'list',
title: 'Stations',
itemTpl: [
'<div>{Namn}</div><div style="float:right; margin-right: 1.5em;"></div>'
],
store: 'Stations',
grouped: true,
indexBar: true
}
]
}
]
}
});
내비게이션 탐색을 검색 한 다음 navigationView.push (yourNewView); http://docs.sencha.com/touch/2.2.0/#!/api/Ext.navigation.View-method-push –
또는 dataview.up ('navigationview'). push (yourNewView) –
@TDeBailleul 탐색보기 사용 자습서에서이 내용을 발견했습니다. 의견을 답변으로 게시하고 불만을 제기하십시오! –