Thanks Thiago!

That does work, but I'm a bit surprised this, seemingly common, usecase is
not supported natively by Tapestry.

Cheers,

Levi


Thiago H. de Paula Figueiredo wrote:
> 
> Em Wed, 20 May 2009 19:19:16 -0300, xfile80303 <l...@grokers.net>
> escreveu:
> 
>> Hi all,
> 
> Hi!
> 
>> <t:loop source="searchCategories" value="searchCatIterator"
>> index="radioIndex">
>>   <t:radio t:id="radio_${radioIndex}" value="searchCatIterator"
>> label="${searchCatIterator.name}"/>
>>   <t:label for="radio_${radioIndex}"/>
>> </t:loop>
>>
>> but that complains about the id "radio_${radioIndex}" not being valid (I
>> suppose variable expansion is not taking place here).
> 
> You're right: you can't define a t:id (component id) dynamically. On the  
> other hand, you can define an HTML id dynamically and use a vanilla label  
> tag (non-Label component). It would be something like that (not tested):
> 
> <t:loop source="searchCategories" value="searchCatIterator"
>   index="radioIndex">
>     <t:radio id="radio_${radioIndex}" value="searchCatIterator"/>
>     <label for="radio_${radioIndex}">${searchCatIterator.name}</label>
> </t:loop>
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://n2.nabble.com/-T5.1--Radio-buttons%2C-Labels%2C---Loops--tp2949062p2954340.html
Sent from the Tapestry Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to