title: How can I present values of <h:selectManyCheckbox> in an input field?
body: <p>I'm creating a website that is using jsf, html, java, and JavaDB. One of my pages will list a number of images that represents menus a customer can select. At the bottom of the page there are a <code>selectManyCheckbox</code> with the options corresponding with the images. When a customer has selected a combination of menus, an "Order" button would guide the customer to the next page. On this page there are listed additional information about the customer (retrieved from the database) such as: <code>Customer number</code>, <code>Contact name</code>, etc. In additional to that the selected menu should be listed in the table, and the number of row listed should be the same as the number of menus selected. My main problem is that I want to use the data collected from the <code>selectManyCheckbox</code> as my input in the selected menu field, and the rest is collected from the database (That I have done and it works). How can I get the values as separate values? I am only able to use them in a output  text and not as values in a input field.</p>
  
  <p>Java code:</p>
  
  <pre><code>        @Named
          @RequestScoped
          public class OrderBean implements java.io.Serializable {
          private Set&lt;String&gt; menus = new TreeSet&lt;String&gt;();
  
          public Set&lt;String&gt; getMenus() { 
             return menues;
          }
  
          public void setMenus(Set&lt;String&gt; newValue){
             menus = newValue;
          }
  
          public SelectItem[] getMenuesItems(){
             return menuesItems;
          }
  
          private static SelectItem[] menuesItems = {
             new SelectItem("Menu 1"),
             new SelectItem("Menu 2"),
             new SelectItem("Menu 3")
          };
     }
  </code></pre>
  
  <p>JSF, HTML:</p>
  
  <pre><code>      &lt;div class="clear"&gt;&lt;/div&gt;
        &lt;div id="frame"&gt;
          &lt;div id="frameCheckBox"&gt;&lt;h:commandButton value="#{mld.Order}" action="Order"/&gt;
               &lt;h:selectManyCheckbox value="#{orderBean.menus}"&gt;
                    &lt;f:selectItems value="#{orderBean.menusItems}"/&gt;
               &lt;/h:selectManyCheckbox&gt;
          &lt;/div&gt;
         &lt;/div&gt;
  </code></pre>