You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by John Coleman <qb...@gmail.com> on 2015/02/05 06:40:18 UTC

form requires dynamic radio button list

Hi,

The examples of using the tapestry radio button are all static. I need the
radio buttons to build from a dynamic list (in this case of locations)
presumably using a loop, something like this:

         <t:form>
                <t:radiogroup value="locality">
                    <t:loop t:source="localities" t:value="locality">
                        <t:radio t:value="locality" t:label="prop:locality"
t:mixins="jquery/bind" t:bind.event="venueChanged"
t:bind.eventType="change" t:bind.zone="venueChooserZone"/>
                    </t:loop>
                </t:radiogroup>

But this does not work!? Note that I also want to fire an event when the
user selects a radio button to rerender the rest of the form in response to
a change of location.

Any ideas how to solve this please?

John

Re: form requires dynamic radio button list

Posted by Chris Poulsen <ma...@nesluop.dk>.
It seems like you are using the locality property for everything (selected
value and loop variable) maybe that is the source of your problem?

On Thu, Feb 5, 2015 at 6:40 AM, John Coleman <qb...@gmail.com>
wrote:

> Hi,
>
> The examples of using the tapestry radio button are all static. I need the
> radio buttons to build from a dynamic list (in this case of locations)
> presumably using a loop, something like this:
>
>          <t:form>
>                 <t:radiogroup value="locality">
>                     <t:loop t:source="localities" t:value="locality">
>                         <t:radio t:value="locality" t:label="prop:locality"
> t:mixins="jquery/bind" t:bind.event="venueChanged"
> t:bind.eventType="change" t:bind.zone="venueChooserZone"/>
>                     </t:loop>
>                 </t:radiogroup>
>
> But this does not work!? Note that I also want to fire an event when the
> user selects a radio button to rerender the rest of the form in response to
> a change of location.
>
> Any ideas how to solve this please?
>
> John
>

Re: form requires dynamic radio button list

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 05 Feb 2015 03:40:18 -0200, John Coleman  
<qb...@gmail.com> wrote:

> Hi,

Hi!


> But this does not work!?

What do you mean by "does not work"? This is too vague for us to provide  
any useful answer. In addition, the Java code related to the template  
snippet is also needed to know what's happening.


-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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