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?
My page contains:-
<h:selectManyCheckbox
disabledClass="selectManyCheckbox_Disabled"
styleClass="selectManyCheckbox" id="checkbox2"
required="true" value="#{pc_Proposaldeclaration.selectedDistWho}" >
<f:selectItem itemLabel="item1" itemValue="Name1" />
<f:selectItem itemLabel="item2" itemValue="Name2" />
</h:selectManyCheckbox>
Any help in setting the "item1" to checked on page load appreciated!