• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[Answered] Tab Title - AppName

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    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


    • #17
      Johnny, I've told you this many times but U Da Man! Works like a charm. That really adds to usability of this app, the guys can easily see what tab to use when making a production entry. They do this today by running 4 different 5250 sessions. Thanks so much!

      Comment


      • #18

        The title: works great, Thanks for adding this parameter to to the util.App.launch

        Comment

        Working...
        X