Hi!

I tried to use a Tomahawk HtmlDataTable to programmatically display a matrix
containing questions in the left column and some radiobuttons in the other
columns.

I added a HtmlRadio component to each HtmlSimpleColumn instance. For each
row, I added a HtmlSelectOneRadio component to the table. The HtmlRadio
components "for" attribute uses a value-binding to the current row object of
the data set, to get the ID of the related HtmlSelectOneRadio component.

I don't know if I've followed the right approach. The table is displayed
correctly, but the evaluation of the selected radiobuttons doesn't work. It
doesn't matter was has been selected, I always get value="1" for each
HtmlSelectOneRadio component.

Maybe this is the wrong approach. Do I have to use only one
HtmlSelectOneRadio component with a component binding, and process the
selections by iterating over the UIData's data set, like it is done when
using JSP?


Following a Html code snippet of the data table:

<table border="1" cellpadding="5" cellspacing="0">
<thead><tr><th width="150"></th><th>erste Am</th><th>zweite
Am</th><th>dritte Am</th><th>vierte Am</th></tr></thead>

<tbody id="Form:_id15:tbody_element">

<tr>
<td width="150">erste Teilfrage</td>

<td><label>
<input type="radio" name="Form:_id15_0:Frage_6_Teil_1" checked="checked"
value="1" />
</label></td>

<td><label>
<input type="radio" name="Form:_id15_0:Frage_6_Teil_1" value="2" />
</label></td>

<td><label>
<input type="radio" name="Form:_id15_0:Frage_6_Teil_1" value="3" />
</label></td>

<td><label>
<input type="radio" name="Form:_id15_0:Frage_6_Teil_1" value="4" />
</label></td>
</tr>


<tr>
<td width="150">zweite Teilfrage</td>

<td><label>
<input type="radio" name="Form:_id15_1:Frage_6_Teil_2" checked="checked"
value="1" />
</label></td>

<td><label>
<input type="radio" name="Form:_id15_1:Frage_6_Teil_2" value="2" />
</label></td>

<td><label>
<input type="radio" name="Form:_id15_1:Frage_6_Teil_2" value="3" />
</label></td>

<td><label>
<input type="radio" name="Form:_id15_1:Frage_6_Teil_2" value="4"
/></label></td>
</tr>

....

</tbody>
</table>



Regards,

Matthias

Reply via email to