Here is a function you could place in your application and call it to change the app's title since you want to change it dynamically during runtime.
Code:
function changeAppTitle(title) { var params = Ext.getUrlParam(), store = parent.Ext.getStore('RunningApps'), rec = (!Ext.isEmpty(store)) ? store.findRecord('appId', params.app, 0, false, true, true) : null, tabMode = (Ext.isEmpty(parent.Ext.ComponentQuery.query('canvastabs')[0])) ? false : true, appFrame = (!Ext.isEmpty(params.key)) ? parent.Ext.ComponentQuery.query('uxiframe[key=' + params.key + ']')[0] : null; // update the running apps record // if (!Ext.isEmpty(rec)) { rec.set('name', title); rec.commit(); } // set the tab if in tab mode "Classic" // if (tabMode && !Ext.isEmpty(appFrame)) { appFrame.tab.setText(title); } } changeAppTitle('My New Title');
Comment