You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by #Cyrille37# <cy...@gmail.com> on 2007/07/26 15:05:55 UTC

[T4] FieldLabel does not works with Radio

Hi,

FieldLabel does not works with Radio because it does not descend from 
IFormComponent,
and a search on the users@list confirm this fact:
 http://www.nabble.com/Radio-button-labels-tf3083795.html#a8569717

I've done this for a Labeled Radio button:

JWC:
    <component id="candidatItem" type="Radio">
        <binding name="id" 
value="ognl:'vl'+currentList.id+'c'+currentCandidat.id" />
        <binding name="value" value="ognl:currentCandidat.id" />
    </component>
    <component id="candidatItemLabel" type="Insert">
        <binding name="renderTag" value="true" />
        <binding name="for" 
value="ognl:'vl'+currentList.id+'c'+currentCandidat.id" />
        <binding name="value" value="ognl:'('+currentCandidat.id+') 
'+currentCandidat.name" />
    </component>
HTML:
<input type="radio" jwcid="candidatItem" />
 <label jwcid="candidatItemLabel"> blabla</label>

If this solution is nice enough, perhaps it could be added to the 
documentation of Radio component as a Tips :
 http://tapestry.apache.org/tapestry4.1/components/form/radio.html

Cheers
cyrille.


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