Hi folks,
The h:selectBooleanCheckbox in question is in a h:dataTable (of Extras) within a h:dataTable (of Items) within a h:dataTable (of Categories). Many Items are displayed and each Item can have many Extras.
<h:dataTable value="#{bean.categoryList}" var="category">
<h:column>
<h:dataTable value="#{category.itemList}" var="item">
<h:column>
<h:dataTable value="#{item.extraList}" var="extra">
<h:column>
<!-- The h:selectBooleanCheckbox in question //-->
<h:selectBooleanCheckbox value="#{bean.extraSelectedMap[item.id][extra.id]}"/>
</h:column>
<h:commandLink action="#{bean.add}" value="Add">
</h:dataTable>
</h:column>
</h:dataTable>
</h:column>
</h:dataTable>
After the page is rendered I select a check box then select 'Add'. Inside bean.add my
Map<Integer, HashMap<Integer, Boolean>>
has an empty HashMap when I am expecting it to have the id of the extra mapped to the value true.
What is incorrect with the code, or the entire approach, above?
Many thanks and regards.