Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Regarding dynamic radio button..

Vijay Prajapati

2007-02-20

Replies:

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.

 

With Regards,

Vijay Prajapati
|
Sr. Software Engineer
Real Soft (Intl) Pvt. Ltd, Vadodara  | 
|
SEI-CMM Level IV & ISO 9001:2000 Company  | 
Phone: (0265) 5563097, 5598758, 5598626, 5598630  | 
Cell No: +91 9898149407
vijay.prajapati@realsoftinc.com 

 

©2008 junlu.com - Jax Systems, LLC, U.S.A.