0 Replies Latest reply on Oct 6, 2009 8:41 AM by Olly Edgell

    <h:selectBooleanCheckbox > malfunctioning inside loop

    Olly Edgell Newbie

      Afternoon All,

      I have a seam entity ejb containing a list of sub-entities, the sub-entity has a boolean property. The user can add to this list of sub-entites which creates a new tab in a tab panel that holds a form, the boolean property is represented with a h:selectBooleanCheckbox.

      The problem I am experiencing only occurrs when the checkbox is held within an iteration tag. I have tried c:forEach, a4j:repeat and ui:repeat with no success. When I submit the form I get the following error:

      SEVERE [lifecycle] JSF1054: (Phase ID: UPDATE_MODEL_VALUES 4, View ID: /candidateRegPageFlow/acquireExperience.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@c63833]

      Examing the debug page gives this additional error message:

      Caused by javax.servlet.ServletException with message: "Cannot convert 0 of type class java.lang.Long to class java.lang.Boolean"

      I realise this may appear to be a mapping problem but I have carried out tests writing this property to the database with no surrounding loop and its fine, leading me to believe this is where the error lies.

      The xhtml fragment:

      <c:forEach items="#{acquireExperienceCR.candidateExperienceList}"
      <s:decorate template="../layout/edit.xhtml">
       <ui:define name="label">Rullion Assignment?</ui:define>

      Any guidance would be much appreciated.