0 Replies Latest reply on Aug 14, 2008 8:30 PM by goompas

    How get selected item from dropdown list?

    goompas

      Hello
      How get selected from dropdown menu item value or id?
      I have bean that make menu

      protected HtmlDropDownMenu menulista=new HtmlDropDownMenu();
      menulista.setId("empty");
      menulista.setValue("group");
      HtmlMenuItem item = new HtmlMenuItem();
      item.setId("empty1");
      item.setValue("item");
      menulista.getChildren().add(item);
      
      
       public String getWybranyitem() {
       wybranyitem=menulista.getValue().toString();
       return wybranyitem;
       }
      


      And in jsp
      <rich:dropDownMenu id="lista" binding="#{BeanListy.menulista}"/>
       <a4j:outputPanel ajaxRendered="true">
       <h2><h:outputText value=" wybrana lista: #{BeanListy.wybranyitem}" id="seto121"/></h2>
       </a4j:outputPanel>
      


      Menu generate good but when i select item "item" outputtext show "group"
      How acces selected item from menulista?