1. #1
    Ext User
    Join Date
    Jan 2011
    Posts
    2
    Vote Rating
    0
    Mateen is on a distinguished road

      0  

    Default this.FocusEl is undifiened

    this.FocusEl is undifiened


    Hi,

    I am getting a this.focusEl undefined error in the Menu Button of

    Code:
    var myMenu = new Ext.menu.Menu({
        id: 'basicMenu',
        items: [{
                text: 'An item',
                handler: clickHandler
            },
            new Ext.menu.Item({
                text: 'Another item',
                handler: clickHandler
            }),
            '-',
            new Ext.menu.CheckItem({
                text: 'A check item',
                checkHandler: checkHandler
            }),
            new Ext.menu.CheckItem({
                text: 'Another check item',
                checkHandler: checkHandler
            })
        ]
    });
    I am then adding the menu in Toolbar
    Code:
        var tb = new Ext.Toolbar({    
            id: 'toolbar',
            items:[
            {    
                 xtype:'tbtext',             
                text:'Logged in as '+ UserName,
                iconCls: 'bmenu'
               
            }
            ,
            '->',
             
              {
                text:'Jump to',
                handler:onItemClick,
                menu :  myMenu   
            },
              '-', /*Commenting ended here*/
             
            {
                text:'Home',
                  handler:   function(){
              //changePanelDiv('temp', 'Start ');
              window.location= 'mainhome.jsp';
            }       
    
    
            },
              '-',
             
            {
                text:'Change Password',
                  handler:   function(){
              retrieveUserInformation();
            }       
    
    
            }
            ,
            '-'
            ,
             
            {
                text:'Logout',
                handler:   function(){
          
                   window.location= 'login.jsp?action=logout';
            }        
            }    
            ]        
            });
    On some pages this toolbar is working fine and on other the drop down menu does not work. The other buttons in toolbar work fine, only on clicking the menu it does not drop down. I know it is difficult to debug these errors, but if anyone has faces such errors can someone give me a pointer as to what is possibly is going wrong here ?

    Kind Regards

  2. #2
    Ext JS Premium Member
    Join Date
    Jul 2010
    Location
    UK
    Posts
    526
    Vote Rating
    29
    MrSparks has a spectacular aura about MrSparks has a spectacular aura about

      0  

    Default


    Can you post the full config?

  3. #3
    Ext User
    Join Date
    Jan 2011
    Posts
    2
    Vote Rating
    0
    Mateen is on a distinguished road

      0  

    Default


    Quote Originally Posted by MrSparks View Post
    Can you post the full config?
    This is the part of the code i can share. The menu portion of the toolbar causes an error. I was thinking of rather then putting the menu in a toolbar and a toolbar in the panel, is it possible to add a menu directly to the panel ?

    Kind Regards

  4. #4
    Ext JS Premium Member
    Join Date
    Jul 2010
    Location
    UK
    Posts
    526
    Vote Rating
    29
    MrSparks has a spectacular aura about MrSparks has a spectacular aura about

      0  

    Default


    Quote Originally Posted by Mateen View Post
    is it possible to add a menu directly to the panel ?

    Kind Regards
    Not 100% sure, I've always put them in a toolbar.

    If you can post a cut down config that I can paste into a local page, I'll try and help.

Similar Threads

  1. Toolbar this.focusEl is undefined error.
    By scusyxx in forum Ext 3.x: Help & Discussion
    Replies: 5
    Last Post: 3 Dec 2010, 6:21 AM
  2. focusEl
    By quintino in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 6 Apr 2010, 8:10 AM
  3. GridView - focusEl property
    By Mogaba in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 18 Sep 2009, 3:29 AM
  4. this.focusEl is undefined
    By aedemo in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 15 Oct 2008, 11:03 AM

Thread Participants: 1