You need to specify the 'type' attribute for the <logic:iterate> tag.
Without it, the scripting variable for the current object has the type
'java.lang.Object', which is exactly what you are seeing.
--
Martin Cooper
----- Original Message -----
From: "B Manikandan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 17, 2001 11:29 AM
Subject: Re: Iterate and Radio tags
> Hi Amar,
> I have a problem in implementing this solution.
> I have a situation similar to the user and subscription class scenarion of
> struts-example.
>
> I have a DomainHolder object which has a collection of
> DomainDomainRelationHolder object as a Hashtable.
>
> In my Domain.jsp I have to display the list of DomainDomainRelation
objects.
>
> I have the following iterate tag.
>
> <logic:iterate id="domainDomainRelationHolder" name="domainHolder"
> property="domainDomainRels">
> <tr>
> <td width=6%>
> <html:radio name="domainHolder" property="childGroupOID"
> value="<%=domainDomainRelationHolder.getChildGroupOID()%>"/>
> </td>
> <td width='32%'>
> <bean:write name="domainDomainRelationHolder"
property="childGroupName"
> filter="true"/>
> </td>
> <td width="52%"><bean:write
name="domainDomainRelationHolder"
> property="childGroupDesc" filter="true"/></td>
> </tr>
> </logic:iterate>
>
>
> Iam getting an exception saying that getChildGroupOID() is not found in
> java.lang.Object.
>
> In my DomainHolder object I have a property corresponding to
childGroupOID.But I
> am not sure where to have a collection that returns the childGroupOID.
> This is a problem since childGroupOID is a user entered value in my
> DomainDomainRelationHolder and I need this value to retrieve the
corresponding
> object from DomainHolder for Edit action.
>
> This is the same situation as struts-example with one exception being that
I
> have to use radio buttons instead of links as in the example.
>
> Mani
>
> "Nanduri, Amarnath" wrote:
>
> > 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..
>