Sencha touch Sencha动态更改外部面板标题

Sencha touch Sencha动态更改外部面板标题,sencha-touch,extjs,panel,title,sencha-touch-2,Sencha Touch,Extjs,Panel,Title,Sencha Touch 2,如何动态更改列表面板标题? 我有一个navigationview,其中listpanel是项。因此,导航栏显示我将动态更改的面板标题 图片: 谢谢 listpanel = new Ext.Panel({ layout: 'fit', id:'listpanel', title:'change this title dinamically',

如何动态更改列表面板标题? 我有一个navigationview,其中listpanel是项。因此,导航栏显示我将动态更改的面板标题

图片:

谢谢

listpanel = new Ext.Panel({
                       layout: 'fit',   
                       id:'listpanel',
                       title:'change this title dinamically',
                       items: [
                               {
                                   xtype: 'titlebar',
                                   id: 'myTitle',
                                   docked: 'top',
                                   title: 'title1'
                               },
                               { xtype: 'titlebar',
                                   id: 'myMeanConsumption',
                                   docked: 'bottom',
                                   title: 'title2'
                               },
                                   list
                               ]
                   });
这样做,

Ext.getCmp('myTitle').setTitle('Changed Title');

编辑:

title
属性在
Ext.Panel
组件上不可用。因此,下面的行是多余的

title:'change this title dinamically',
您只需要更改
标题栏
标题
,我已经在上面提到过了

我看不到
列表面板
标题


在创建listpanel后添加以下内容:

listpanel.onAfter('painted', function () { 
listpanel.getNavigationBar().setTitle(newTitle); },  listpanel, { delay: 100 });

它告诉我对象没有方法setTitle必须更改listpanel标题
Ext.getCmp('myTitle')
将获得
标题栏
组件。在其上应用
setTitle()
将更改
标题栏的标题。你面临的问题是什么?我会更改面板标题而不是标题栏标题…有可能吗?你为什么要更改面板标题?标题栏标题将是您将在视图顶部看到的标题。不是吗?