title: How can i get value from <h:selectManyCheckbox>
body: <p>I have one collection , which I'm displaying in my .xhtml page by <code>&lt;h:dataTable&gt;</code>. I want to reach a few goals: at first I want to set  list.check value by <code>&lt;h:selectManyCheckbox&gt;</code>, at second I want  whatever the  values remains selected until the end of current session. Now It displays correctly, but when I select some value it doesn't transmit it in list.check property. I'm using JSF v.2.2.</p>
  
  <p>Code in JSF bean:</p>
  
  <pre><code>private List&lt;AnswerDTO&gt; answerListDto;
  //getters and setters
  </code></pre>
  
  <p>Code in .xhtml</p>
  
  <pre><code>&lt;h:form&gt; 
      &lt;h:dataTable value="#{main.answerListDto}" var="list"&gt;
          &lt;h:column&gt;
              &lt;h:selectManyCheckbox value="#{list.check}"&gt;
                  &lt;f:selectItem itemValue="1" itemLabel="#{list.ansValue}" /&gt;
              &lt;/h:selectManyCheckbox&gt; 
          &lt;/h:column&gt;
      &lt;/h:dataTable&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>AnswerDTO class:</p>
  
  <pre><code>public class AnswerDTO implements Serializable, DTO {
  
      private static final long serialVersionUID = 1L;
  
      private Integer     id;
      private Question    questId;
      private String      ansValue;
      private String      ansStatus;
      private String      check;    
  
      //getters and setters
  }
  </code></pre>