title: jsf - how to pre-check selectmanycheckbox items?
body: <p>I have a JSF page where I am need to pre-check one of the checkboxes on the page, when it is first loaded. How would I go about doing this? I know I can bind the control to the backing bean but at what point would I set the values to populate the selectmany item?</p>
  
  <p>My page contains:-</p>
  
  <pre><code>&lt;h:selectManyCheckbox
      disabledClass="selectManyCheckbox_Disabled"     
      styleClass="selectManyCheckbox" id="checkbox2"
      required="true" value="#{pc_Proposaldeclaration.selectedDistWho}" &gt;
  
      &lt;f:selectItem itemLabel="item1" itemValue="Name1" /&gt;
      &lt;f:selectItem itemLabel="item2" itemValue="Name2" /&gt;
  
  &lt;/h:selectManyCheckbox&gt;
  </code></pre>
  
  <p>Any help in setting the "item1" to checked on page load appreciated!</p>