• 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.

[SOLVED] Access Elements in Valence top Bar

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

  • [SOLVED] Access Elements in Valence top Bar

    I would like to get at information I put in the top tool bar that is part of Valence. I put something in the hook.js to create an element in the toolbar, but I can't seem to get at it. I tried using "var tbSpecialText=this.parent.Ext.ComponentQuery.query ('#specialHeaderText')[0];" that was suggested by Robert in an earlier post, http://cnxforum.com/showthread.php?1...ith-the-login), but that did not work. Any other suggestions?

  • #2
    More info and code please?

    Comment


    • #3
      Code:
              		            	toolbar.insert(3,{
              		                    xtype     : 'displayfield',
              		                    fieldLabel: '<b>Company</b>',
              		                    value     : '<p style="font-size:16px; color:red">'+data.COMPNAME+'</p>',
              		                    itemId    : 'headerCompanyName',
                                                      id           : 'headerCompanyName',
              		                    padding   : "0 5 0 125",
              		                    labelWidth: 60,
              		                    dataValue : data.COMPNAME,
              		                    companyValue : data.COMPANY
              		                });
      This put the item on the toolbar in the hook.js file using the navtoolbarready section. I want to access this component from inside one of my .js programs running. How do I do that? I tried using Ext.getCmp('headerCompanyName') and that was invalid. I tried this.parent and got the same thing. I am doing this in the boxready event on the viewport I have created.

      Comment


      • #4
        Try parent.getCmp('headerCompanyName')

        Comment


        • #5
          Thanks Eric. I put in parent.Ext.getCmp('headerCompanyName') and it worked like a charm.

          Comment

          Working...
          X