I have implemented my application in sencha touch
in my panel i have a navigation bar i want to set title dynamically on panel header
Ext.define('FleetSyncApp.view.WSMachineTypes', {
extend: 'Ext.Panel',
alias: 'widget.wsmachinetypes',
id: 'myPanel',
config: {
layout: {
type: 'vbox'
},
items: [
{
title: 'Contact information',
xtype: 'list',
----
----
-----
}
],
listeners: [
{
fn: 'initComponent',
event: 'initialize'
}
]
},
and in initcomponent method implemented code to get the component like this
initComponent: function(component, options, wstitle) {
var bar = Ext.getCmp('myPanel');
}