I need to achieve radio-buttons in multiple HTML-Table-Columns. The number of Columns and Rows is dynamic (data-driven).
Example:
| Input 1 | Input 2 | Input n |
|---|---|---|
| O (group 1) | O (group 2) | O (group n) |
| O (group 1) | O (group 2) | O (group n) |
| O (group 1) | O (group 2) | O (group n) |
My code creates the table like this:
<table>
<ui:repeat value="rows" var="row">
<tr>
<ui:repeat value="cols" var="col">
<td>
O (group col.id)
</td>
</ui:repeat>
</tr>
</ui:repeat>
</table>
Now the question is: How can i create the needed radio-buttons the JSF-way?
All available components don't work this way:
- p:selectOneRadio with custom layout doesn't play nice with ui:repeat, because i need one per column (not one per column and row)
- h:selectBooleanCheckbox won't render as radio-buttons, so no MUTEX per group and wrong HTML