【发布时间】:2025-11-25 13:10:02
【问题描述】:
我设置了一个应用程序,并在我的主页/屏幕上设置了几个链接。当我点击一个链接时,它会显示一个项目列表(如联系人列表),然后在单击列表项时再次显示详细视图。
我有以下设置:
App.views.Viewport = Ext.extend(Ext.Panel, {
fullscreen: true,
layout: 'card',
cardSwitchAnimation: 'slide',
dockedItems: [
{
dock : 'top',
xtype: 'toolbar',
title: '<img src="res/img/generic/TT_Small.png" />',
cls: 'homeHeader'
},
],
});
我想要的列表视图是:
App.views.HomeAbout = Ext.regModel('Contact', {
fields: ['firstName', 'lastName']
});
var store = new Ext.data.JsonStore({
model : 'Contact',
root: 'images',
sorters: 'firstName',
getGroupString : function(record) {
return record.get('firstName')[0];
},
data: [
{firstName: 'Tommy', lastName: 'Maintz'},
{firstName: 'Rob', lastName: 'Dougan'},
{firstName: 'Ed', lastName: 'Spencer'},
{firstName: 'Jamie', lastName: 'Avins'},
{firstName: 'Aaron', lastName: 'Conran'},
{firstName: 'Dave', lastName: 'Kaneda'},
{firstName: 'Michael', lastName: 'Mullany'},
{firstName: 'Abraham', lastName: 'Elias'},
{firstName: 'Jay', lastName: 'Robinson'}
]
});
var list = new Ext.List({ 全屏:是的, itemTpl : '{firstName} {lastName}', 分组:真, 索引栏:假,
store: store
});
我使用简单的“联系人”,例如开始,因此一旦运行,我将根据需要修改我的数据等,但是当我单击链接转到此视图时,我得到以下信息
Uncaught Attempting to create a component with an xtype that has not been registered: HomeAbout
但在我的控制器中我有:
about: function()
{
if ( ! this.aboutView)
{
this.aboutView = this.render({
xtype: 'HomeAbout',
});
}.....
任何想法或帮助将不胜感激
【问题讨论】:
标签: sencha-touch