Hi,
I am not sure if it is a richfaces or Seam question, so I double posted.
I want to put a h:selectBooleanCheckbox in a treenode.
The problem is, it shows up, but I can never select it.
For a datatable, I use a bean with a Map<MyDataObject,Boolean> and a setSelection(MyDataObject) method in the (stafefull) bean. This works nicely, giving me a Map of selected objects.
In the tree, my template looks like this:
<rich:tree value="#{testMaintenance.testTree}" var="data" nodeFace="#{data.class.simpleName}" id="tree" switchType="client"> <rich:treeNode id="tn" type="Test"><h:commandLink value="#{data.id}" action="#{testMaintenance.selectTest(data)}"/> </div> <h:selectBooleanCheckbox value="#{testMaintenance.selection[data]}"/> #{data.person.lastName} #{data.organisation.name} </rich:treeNode>
public Map<Test, Boolean> getSelection() { return this.selection; } public void setSelection(Test t) { logger.info("check "+t.getId()); selection.put(t,true); }