0 Replies Latest reply on Feb 18, 2009 12:31 PM by waq

    can't remove items from the selectMenu

      I am using selectMenu as:

      <a4j:region selfRendered="true" id="text">
       <h:selectOneListbox id="symbol" value="#{user.name}">
       <f:selectItems value="#{user.temp_list}" />
      <a4j:commandButton action="#{user.getData}" reRender="symbol" value="Get"/>

      temp_list has following three values when page loads:
      temp_list.add(new SelectItem("Sunday"));
      temp_list.add(new SelectItem("Monday"));
      temp_list.add(new SelectItem("Tuesday"));

      Now in user.getData i want to remove items one by one based on the selection made by the user. The code is:


      But the problem is that if user selects Sunday for example, it remove it from the list but next time when user select Monday it removes monday but BRING BACK SUNDAY AGAIN IN THE LIST. Why is it so?