Thanks for your suggestion - but it still doesn't work...I keep getting the
same exception.

Gaurav

-----Original Message-----
From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 15, 2001 10:25 AM
To: [EMAIL PROTECTED]
Subject: Re: select options doesn't work


Hi!

Try to change your property for the option to a boolean!!

private String strValue;

private boolean value;

/Linnéa
----- Original Message -----
From: "Pal, Gaurav" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 15, 2001 4:18 PM
Subject: select options doesn't work


> Hi,
> I have been trying to get the select options tag to work in the html tag
> library. I tried to follow the sample code given in the struts-mailing
list.
> I keep getting jsp exceptions at
> org.apache.struts.taglib.template.InsertTag.doEndTag ...
>
> The code snippets are below...any help is appreciated.
> Thanks,
> Gaurav
>
> <jsp:useBean id="myBean" scope="request" type="com.xyz.MyForm" />
>         <bean:define id="myList" name="myBean" property="marketList"
> scope="request" />
>
>        <html:select name="myBean" property="marketList" size="1">
>           <html:options collection="myList" property="value"
> labelProperty="description" />
>        </html:select>
>
>
> Here is my bean with a Vector consisting of Option objects with value and
> description as the property.
>
>
> public class MyForm extends ActionForm
> {
>    private Vector marketList;
>    public void setMarketList(Vector marketList)
>    {
>       // SBgen: Assign variable
>       this.marketList = marketList;
>    }
>
>    public Vector getMarketList()
>    {
>       // SBgen: Get variable
>       return(marketList);
>    }
> }
>
> class Option
> {
>    private String strValue;
>    private String strDescription;
>
>    public void setValue(String value)
>    {
>       strValue = value;
>    }
>
>    public String getValue()
>    {
>       return strValue;
>    }
>
>    public void setDescription(String description)
>    {
>       strDescription = description;
>    }
>
>    public String getDescription()
>    {
>       return strDescription;
>    }
> }
>

Reply via email to