1 Reply Latest reply on Jan 16, 2010 7:26 PM by tmalatinszki

    selectManyCheckbox issue showing values from db

    cwilli

      I am having an issue with an h:selectManyCheckbox field not being set in the form.  If I select items in the checklist and hit save they are persisted to the database, but when the form is re-displayed the checkboxes lose their values.  I have other input fields in the form that are saved to the database and then displayed in the form when the page is re-displayed.


      The following is the jsf snippet


      <h:selectManyCheckbox value="#{demographic.races}" layout="pageDirection">  
           <s:selectItems value="#{raceListing.races}" var="race" label="#{race.name}"/>  
           <s:convertEntity/>  
      </h:selectManyCheckbox>
      

        • 1. Re: selectManyCheckbox issue showing values from db
          tmalatinszki

          Hi Christian,


          Have You tried this way?


          <h:selectManyCheckbox id="racesSelect" value="#{demographic.races}" layout="pageDirection">  
            <s:selectItems value="#{raceListing.races}" var="race" label="#{race.name}"/>  
            <a4j:support event="onchange" reRender="racesSelect" limitToList="true" ajaxSingle="true"/>
            <s:convertEntity/>  
          </h:selectManyCheckbox>



          Regards,


          Tamas