0 Replies Latest reply on Aug 12, 2008 5:11 PM by Mita Bhushan

    How to store <h:selectManyListbox> values in the database

    Mita Bhushan Newbie

      I am trying to use Listbox with multiple selections

      <s:decorate id="teamFitReasonDecoration" template="layout/edit.xhtml">
       <ui:define name="label">Team Fit Reason</ui:define>
       <h:selectManyListbox id="teamFitReason" value="#{interviewHome.instance.teamFitReason}">
       <f:selectItems value="#{form.options}"/>
       <a:support event="onblur" reRender="teamFitReasonDecoration" ajaxSingle="true"/>
       </h:selectManyListbox>
       </s:decorate>
      


      my Backend Bean looks like

       private List<SelectItem> options;
      
       public FormBean()
       {
       options = new ArrayList<SelectItem>();
       SelectItem option = new SelectItem("ch1");
       options.add(option);
       option = new SelectItem("ch2");
       options.add(option);
       option = new SelectItem("ch3");
       options.add(option);
       option = new SelectItem("ch4");
       options.add(option);
       option = new SelectItem("ch5");
       options.add(option);
       }
      
      public List<SelectItem> getOptions()
       {
       return options;
       }
      
      


      how to I place selected options teamFitReason into a database.
      ie List of values into a database column which is a String