I have following code: JSF PAGE
<h:dataTablevalue="#{bean.records}" var="app">
  <h:column>
    <h:selectBooleanCheckbox value="#{bean.checked[app.id]}"/>
    <f:facet name="footer">
      <h:commandButton value="submit" action="#{bean.submitPublic}"/>
    </f:facet>
</h:column>
and BEAN code:
@SessionScoped
public class bean 
private Map<Long, Boolean> checked = new HashMap<Long, Boolean>();
private List<Application> checkedItems = new ArrayList<Application>();
public void submit() {
for (Application app : getRecords()) {
    if (checked.get(app.getId())) {
        checkedItems.add(app);
    }
}
checked.clear();
//here logic for selected apps
}
    public Map<Long, Boolean> getChecked() {
        return checked;
    }
    public void setChecked(Map<Long, Boolean> checked) {
        this.checked = checked;
    }
problem is when I click button, selected values are not submitted. I was reading this article: How to use <h:selectBooleanCheckbox> in <h:dataTable> to select multiple rows?
did everything the same way, but it does not work.
 
     
    