Hi Mani,
 
  Try this. It works for me....It is a hack i need to implement in my
ActionForm also.


  <logic:iterate id="groupsList" name="statesBean" property="states">
        <html:radio name="statesBean" property="selectedIndex" value="<%=
statesBean.getIndexedValue() %>" />

  </logic:iterate>

public class StatesBeanForm extends ActionForm   
{

  // this has the corresponding getter and setter
  private ArrayList  states = null ;

        
  // a variable which has to store the value of the radio button selected by
the user. This also has a getter and setter

  private  String selectedIndex  = null ;

  // setters and getters        
  private  ArrayList indexedValue = null ;

}




-----Original Message-----
From: B Manikandan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 16, 2001 3:05 PM
To: [EMAIL PROTECTED]
Subject: Re: Iterate and Radio tags
Importance: High


Hi,
  I have posted the same question,but did not get any reply.I need to set
the
value of radio button to a property from my bean.
  And I need to do this in a iterate.

Mani



"Nanduri, Amarnath" wrote:

> Hi All,
>
>     I am using a Radio Button in an Iterate Tag. I would like to give a
> unique id value to each and every radio button. The name of the button
will
> be the same but the value will be different. So if a user clicks ona
> particular radio button, i will know which value is he looking for ? Is
this
> possible using the struts html:radio tag ? or do i need to use a different
> tag ?
>
> cheers,
> Amar..

Reply via email to