The value attribute is taken literal. Therefore, use:

<logic:iterate id="myCollectionElement" 
  name="queryForm"
  property="answers">
     <bean:define id="el" name="myCollectionElement"/>
     <html:radio name="queryForm" property="ans"
          value='<%=el%>' />
        Element Value: 
                <bean:write name="myCollectionElement" /><br/>
</logic:iterate>

hth,
tomK


> -----Original Message-----
> From: timothy [mailto:[EMAIL PROTECTED]] 
> Sent: vrijdag 18 januari 2002 5:02
> To: Struts Users Mailing List
> Subject: Re: a list of radio button
> 
> 
> Still does not work  :<    help
> ----- Original Message -----
> From: "Keith Bacon" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, January 17, 2002 7:12 PM
> Subject: Re: a list of radio button
> 
> 
> > try changing the name= to:-
> > <html:radio name="myCollectionElement"
> >
> > struts will call myCollectionElement.getAns() to get the 
> string to label
> each radio button.
> > Keith (not an expert!).
> >
> > --- timothy <[EMAIL PROTECTED]> wrote:
> > > Hi expert,
> > >
> > > i want to generate this:
> > >
> > >  <input type="radio" name="ans" value="one">
> > >  Element Value: one<br />
> > >  <input type="radio" name="ans" value="two">
> > >  Element Value: two<br />
> > >
> > > but i get the following result:
> > >
> > >              <input type="radio" name="ans" 
> value="myCollectionElement">
> > >              Element Value: one<br />
> > >              <input type="radio" name="ans" 
> value="myCollectionElement">
> > >              Element Value: two<br />
> > >
> > > the code i use is :
> > >
> > >              <logic:iterate id="myCollectionElement" 
> name="queryForm"
> property="answers">
> > >              <html:radio name="queryForm" property="ans"
> value="myCollectionElement" />
> > >
> > >              Element Value: <bean:write 
> name="myCollectionElement" /><br
> />
> > >              </logic:iterate>
> > >
> > >                *queryForm is a formBean
> > >                *answers is queryForm's property which return a
> Collection Class
> > >                *ans is a String
> > >
> > > how can i solve the problem?
> > >
> > > thx
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send FREE video emails in Yahoo! Mail!
> > http://promo.yahoo.com/videomail/
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:struts-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to