No, Tapestry will give different ids to your radio tags inside the loop.
In the HTML page, a radio belongs to a radiogroup if it has the same "name" parameter, not the same "id". And Tapestry will give a different id but the same "name" to each radio you put in a radiogroup wether it is in a loop or not.

Stephane

[EMAIL PROTECTED] a écrit :
Yes, but within the SAME radio group.
I mean: I use it multiple times within the loop?

Jens




You use the id "radio" 2 times in the same tml page. That's not allowed.

Stephane

[EMAIL PROTECTED] a écrit :
Hi!

I have a problem to handle a radiogroup having a variable number of radio
buttons created within a loop.
The 'tml' looks basically like the following code snippet:

<t:radiogroup t:id="addressSelector">
   <t:loop source="addresses" value="loopAddress">
      <tr>
<td><t:radio t:id="radio"
value="${loopAddress.userId}"/>${loopAddress.userId}</td>
<td xml:space="preserve">${loopAddress.firstName}
${loopAddress.lastName}</td>
      </tr>
   </t:loop>
</t:radiogroup>

this works just fine.

After adding a additional radio button outside the loop Tapestry complains
that the component with the id "radio" already exists?
<t:radiogroup t:id="addressSelector">
   <t:loop source="addresses" value="loopAddress">
      <tr>
<td><t:radio t:id="radio"
value="${loopAddress.userId}"/>${loopAddress.userId}</td>
<td xml:space="preserve">${loopAddress.firstName}
${loopAddress.lastName}</td>
      </tr>
   </t:loop>
   <td colspan="2"><t:radio t:id="radio" value="NEW ADDRESS"/></td>
</t:radiogroup>

What is the difference to the loop?
So as a workaround I added an empty entry to the address list and preserved
the layout by using <t:if> blocks but I really do not understand why this is not working.
Any ideas?

Thanks in advance

Jens

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to