Actually, I think there is only one instance of the radio component created 
inside the loop.
And, it is used multiple times for each iteration to display radios, Tapestry 
generate clients ids at runtime.

Component id must be unique to access it through the @Component annotation 
without any ambiguity.
"t:id" is used for server component identification.

Christophe.



-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Envoyé : vendredi 14 mars 2008 10:48
À : users@tapestry.apache.org
Objet : Re: [T5] RadioGroup and varible numbers of radio buttons

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]




Ce message et les pièces jointes sont confidentiels et réservés à l'usage 
exclusif de ses destinataires. Il peut également être protégé par le secret 
professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant 
être assurée sur Internet, la responsabilité du groupe Atos Origin ne pourra 
être recherchée quant au contenu de ce message. Bien que les meilleurs efforts 
soient faits pour maintenir cette transmission exempte de tout virus, 
l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne 
saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for 
the addressee; it may also be privileged. If you receive this e-mail in error, 
please notify the sender immediately and destroy it. As its integrity cannot be 
secured on the Internet, the Atos Origin group liability cannot be triggered 
for the message content. Although the sender endeavours to maintain a computer 
virus-free network, the sender does not warrant that this transmission is 
virus-free and will not be liable for any damages resulting from any virus 
transmitted.

Reply via email to