Results 1 to 3 of 3

Thread: NullPointerException for Menu.hide()

  1. #1

    Default NullPointerException for Menu.hide()


    I'm getting the exception:

    java.lang.NullPointerException: null at at at at at

    when I click on a menu item:


    I would blame it on my coding, however the exceptions occurs in IE, but not in Firefox.

    I can see in the debugger that the null pointer in


    because of parentMenu is null. However, parentItem.parent is not null and is of type Menu.

    I'm using GXT 2.2.1 and GWT 2.1.0.

    What can be the reason for it not to work in IE, but in FF?

    Thank you,


  2. #2
    Sencha Premium Member
    Join Date
    Sep 2007


    The easiest would be if you would post your code that shows the issue in a small standalone testcase implementing EntryPoint

  3. #3
    Sencha User
    Join Date
    Oct 2007


    I am using gxt2.2.5-gwt22.

    This is definitely a bug. In Item class, there is a protected parentMenu field, but no where is this field settable. When a menu adds an menuItem, the menuItem does not automatically add the parentMenu. Even if you want to do it explicitly, there is no setter to use.

    the work around is to subclass MenuItem and add setParentMenu(parentMenu) method.

Similar Threads

  1. Replies: 3
    Last Post: 6 Sep 2011, 7:26 AM
  2. Button menu-active style no longer added/removed on menu show/hide
    By wdrwilson in forum Ext GWT: Help & Discussion (1.x)
    Replies: 1
    Last Post: 24 Nov 2008, 6:11 AM
  3. Button with Menu (menu auto show/hide)
    By fafhrd in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 23 Mar 2007, 12:19 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts