Hi Tim,
Could you please send me your code with nested tag so I can get
something from it.
Thank you,
Vijay Prajapati
-----Original Message-----
From: Tim Williams [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 20, 2007 8:39 PM
To: Struts Users Mailing List
Subject: Re: Regarding dynamic radio button..
On 2/20/07, Vijay Prajapati <[EMAIL PROTECTED]> wrote:
>
>
>
>
> I am using Struts2.0.1.
>
> I have created groups of 3 dynamic radiobuttons through iterator(Array
List) tag. But I have to give different names to these groups. I am here
giving code which I have been written in my jsp.
>
>
>
> <s:iterator status="stat" value="groupname">
>
> <tr>
>
> <td class="txt"><strong><s:property/></strong></td>
>
> <td class="txt"><s:radio list="{'None','Admin','Developer'}"
name="groupname[%{#stat.index}].value"/>
>
> </td>
>
> </tr>
>
> </s:iterator>
>
>
>
> Here "groupname" is collection(ArrayList which store
groupname(String)) in Action class. So can I user name as value of
collection so every radio button would have different name as per
collection value?
>
>
>
> So Help me to assign different names for each radio button group.
I'm doing something similiar using the nested tags. It provides the
unique naming for you. I explicitly create the radio buttons with the
nested:radio tag though. I use nested:iterate in the same way you use
s:iterate. Since you have to pass the list into the radio tags, I
reckon it wouldn't hurt for you to also explicitly list out the
buttons. Anyway, if you have any flexibility, you may want to take a
look at the nested tags before trying to do it yourself.
--tim
---------------------------------------------------------------------
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]