Re: How to render label for dynamically rendered radiogroup?

2010-12-12 Thread Anton Mezerny
Thanks Bryan.
 I thought, that if I specify t:id attribute, than I must have according
object in my java class with the same name. For example: t:id="myBean"
andprivate MyType myBean;but as I see it is not necessary.
Anton

2010/12/12 Bryan Lewis 

> I use a RadioGroup with a Loop frequently.  I think you only need to change
> the way you specify the label.
> Here's an example from my code:
>
> 
>  
>
>
>  
> 
>
>
>
> On Sun, Dec 12, 2010 at 8:18 AM, Anton Mezerny  >wrote:
>
> > Hi all,
> > I'm trying to render dynamic RadioGroup like here:
> >
> > >  > >
> >  value="value"
> > >   label="prop:context.availableLabel"
> > >   encoder="valueEncoderForFeature"
> > >   validate="prop:selectValidator">
> > >
> > 
> > >> value="oneItem"
> > > />
> > > 
> > >
> > 
> > >
> > Now labels are not rendered at all. Component renders only radiobuttons
> > without any text lables.
> > I can't add  tag because I have no defined Radio component in my
> > component class (it could be several radiobuttons inside one RadioGroup).
> > I tried also use plain html, like
> >  > for="${currentFeature.id}-feature-label">${currentFeature.name}
> >  > label="literal:currentFeature.name" value="currentFeature" />
> > but tapestry rewrites input id, so label is rendered but not work as a
> > label
> > (click on it does'nt work)
> >
> > How can I achieve a normal label behavior in my case?
> > Thanks in advance.
> > Anton
> >
>


Re: How to render label for dynamically rendered radiogroup?

2010-12-12 Thread Bryan Lewis
I use a RadioGroup with a Loop frequently.  I think you only need to change
the way you specify the label.
Here's an example from my code:


  


  




On Sun, Dec 12, 2010 at 8:18 AM, Anton Mezerny wrote:

> Hi all,
> I'm trying to render dynamic RadioGroup like here:
>
> >  >
>  value="value"
> >   label="prop:context.availableLabel"
> >   encoder="valueEncoderForFeature"
> >   validate="prop:selectValidator">
> >
> 
> >value="oneItem"
> > />
> > 
> >
> 
> >
> Now labels are not rendered at all. Component renders only radiobuttons
> without any text lables.
> I can't add  tag because I have no defined Radio component in my
> component class (it could be several radiobuttons inside one RadioGroup).
> I tried also use plain html, like
>  for="${currentFeature.id}-feature-label">${currentFeature.name}
>  label="literal:currentFeature.name" value="currentFeature" />
> but tapestry rewrites input id, so label is rendered but not work as a
> label
> (click on it does'nt work)
>
> How can I achieve a normal label behavior in my case?
> Thanks in advance.
> Anton
>


Re: How to render label for dynamically rendered radiogroup?

2010-12-12 Thread Anton Mezerny
Maybe I can write another component called for example RadioField and
construct it with Radio and Label components as aggregation fields.
Is there any other approach?

2010/12/12 Anton Mezerny 

> Hi all,
> I'm trying to render dynamic RadioGroup like here:
>
>> >
>   value="value"
>>   label="prop:context.availableLabel"
>>   encoder="valueEncoderForFeature"
>>   validate="prop:selectValidator">
>>
> 
>>   > value="oneItem" />
>> 
>>
> 
>>
> Now labels are not rendered at all. Component renders only radiobuttons
> without any text lables.
> I can't add  tag because I have no defined Radio component in my
> component class (it could be several radiobuttons inside one RadioGroup).
> I tried also use plain html, like
>  for="${currentFeature.id}-feature-label">${currentFeature.name}
>  label="literal:currentFeature.name" value="currentFeature" />
> but tapestry rewrites input id, so label is rendered but not work as a
> label (click on it does'nt work)
>
> How can I achieve a normal label behavior in my case?
> Thanks in advance.
> Anton
>


How to render label for dynamically rendered radiogroup?

2010-12-12 Thread Anton Mezerny
Hi all,
I'm trying to render dynamic RadioGroup like here:

> 
  value="value"
>   label="prop:context.availableLabel"
>   encoder="valueEncoderForFeature"
>   validate="prop:selectValidator">
>

>/>
> 
>

>
Now labels are not rendered at all. Component renders only radiobuttons
without any text lables.
I can't add  tag because I have no defined Radio component in my
component class (it could be several radiobuttons inside one RadioGroup).
I tried also use plain html, like
${currentFeature.name}

but tapestry rewrites input id, so label is rendered but not work as a label
(click on it does'nt work)

How can I achieve a normal label behavior in my case?
Thanks in advance.
Anton