2 Replies Latest reply on Jan 14, 2009 6:53 AM by Ker P

    ActionListener on panelMenuGroup

    Ker P Newbie

      Hello.

      In a panelMenu, I have put an ActionListener on an item and one on a group.
      The one on the item works perfectly but the one of the group is not launched when I click on the group.

      And even more strange, if I first click on a group : nothing happens.
      Then I click on an item : the ActionListener of the group is called and just after the ActionListener of the item is called.

      Is there a way to call the ActionListener of the group directly when I click on it?
      I tried to put it as 'immediate" but it doesn't change anything.

      Here is my code :

      HtmlPanelMenuItem menuItem_AccountInfo = new HtmlPanelMenuItem();
       menuItem_AccountInfo.setLabel("Label item 1");
       menuItem_AccountInfo.setName("Name item 1");
       menuItem_AccountInfo.addActionListener(test);
      
       ...
      
       HtmlPanelMenuGroup menuGroup_AccountInfo = new HtmlPanelMenuGroup();
       menuGroup_AccountInfo.setLabel("Group 1");
       menuGroup_AccountInfo.setName("Name group 1");
       menuGroup_AccountInfo.setIconCollapsed("triangle");
       menuGroup_AccountInfo.setIconExpanded("triangleDown");
       menuGroup_AccountInfo.addActionListener(test);
       menuGroup_AccountInfo.addValueChangeListener((ValueChangeListener)test);
       menuGroup_AccountInfo.setImmediate(true);


      Thanks for your help.