PDA

View Full Version : this.FocusEl is undifiened



Mateen
9 Jan 2011, 11:02 PM
Hi,

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



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


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

MrSparks
10 Jan 2011, 2:06 AM
Can you post the full config?

Mateen
10 Jan 2011, 2:10 AM
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

MrSparks
10 Jan 2011, 2:28 AM
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.