Hi
I don't know if this topic fits here, but since I got the remark to use tomahawk from this board I just try.
I have a checkManyCheckbox using the implementation from Tomahawk:
<h:form>
<t:dataTable rowIndexVar="row" value="#{group.mappings}" var="entry">
<t:selectManyCheckbox id="entries" layout="spread" value="#{group.selected}" >
<t:selectItems value="#{group.mappings}" var="mapping" itemLabel="#{mapping.title}" itemValue="#{mapping.id}" />
</t:selectManyCheckbox>
<h:column>
<t:checkbox index="#{row}" for="entries"></t:checkbox>
...
</h:column>
</t:dataTable>
<h:commandButton value="Change" />
</h:form>
and a corresponding Backing bean that stores something (Property selected) to a database if a checkbox is marked and the button "Change" is pressed.
public String[] getSelected() {
return selected;
}
public void setSelected(String[] selected) {
this.selected = selected;
...
}
This implementation worked fine with normal Java Server Faces selectManyCheckbox, but since I use Tomahawk the setSelected Method is not invoked any more. I found some fuzzy discussions on the web that this might have something to do with converters and that no error message is display, because one has to use <h:message> tag (which I tried but propably wrong). However conversion should be no problem since I only use string values. The property mapping to the values of the checkboxes looks like:
public String getId() {
return id;
}
public void setId(String id) {
this.id=id;
}
Has anyone experience with this issue and can point me to a solution on how to get my setSelected method to be invoked with the marked IDs as arguments?
Edited by: Alaak on Oct 16, 2008 11:51 PM