myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wolfgang <wkl...@ebi.ac.uk>
Subject Set default value for h:selectManyCheckbox
Date Thu, 11 Oct 2007 13:42:30 GMT
Hi,

how can I set the default behaviour for each checkbox to "clicked"?

  <h:selectManyCheckbox value="#{homePage.selectedServices}" 
layout="pageDirection">
       <f:selectItem itemLabel="A"    itemValue="a"/>
       <f:selectItem itemLabel="B"    itemValue="b"/>
       <f:selectItem itemLabel="C"    itemValue="c"/>
       <f:selectItem itemLabel="D"    itemValue="d"/>
   </h:selectManyCheckbox>

I managed it with the h:selectOneRadio group:

<h:selectOneRadio id="radio" value="#{dataset.type}">
           <f:selectItem itemLabel="Accessions" itemValue="0"/>
           <f:selectItem itemLabel="Sequences" itemValue="1"/>
       </h:selectOneRadio>

   <managed-property>
           <property-name>type</property-name>
           <value>0</value>
       </managed-property>
  But there the property-name is a String and in the above example I 
have a list.
So I don't know how to set all these checkboxes clicked as default 
behaviour.

Cheers,
Wolfgang



Mime
View raw message