9 Replies Latest reply on Mar 7, 2008 11:25 PM by Nicklas Karlsson

    Using checkbox in datatable

    Dreidel Regala Newbie

      Hi, I have a datatable with a column for checkboxes.

      <h:dataTable value="#{myList}" var="_list">
      <h:selectBooleanCheckbox value="#{chkbox[_list.id]}">

      <h:commandButton action="#{myAction.submit}">

      But the problem is my Map cannot get the values (selected checkboxes) when I submit the form.

      public class MyAction implements Serializable{

      private Map<Integer, Boolean> chkbox = new HashMap<Integer, Boolean>();

      public void submit(){}