struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nuwan Chandrasoma" <mymail...@gmail.com>
Subject Re: javax.servlet.jsp.JspException: No getter method available for property
Date Wed, 02 May 2007 11:09:44 GMT
Hi,

try this below code., i just add the type attribute.

<bean:define id="cancelList" property="cancel" name="detailsForm" 
type="java.util.ArrayList"/>
        <html:select property = "cancelReason" >
        <option value = "">--Select--</option>
        <html:options collection="cancelList" property="myValue" 
labelProperty="myLabel" />
             </html:select>

Thanks,

Nuwan


----- Original Message ----- 
From: "prasad kumar" <prasad_te318@yahoo.co.in>
To: <user@struts.apache.org>
Sent: Wednesday, May 02, 2007 7:50 AM
Subject: javax.servlet.jsp.JspException: No getter method available for 
property


>I am trying to populate an html drop down with the Struts select and 
>options
> tags.  The
> cancelList bean referenced in the collection is an ArrayList of struts
> LabelValue beans.
> Here is the tag snippet:
>             <bean:define id="cancelList" property="cancel" 
> name="detailsForm" />
>        <html:select property = "cancelReason" >
>        <option value = "">--Select--</option>
>        <html:options collection="cancelList" property="myValue" 
> labelProperty="myLabel" />
>             </html:select>
>  The stack trace(below) indicates that the Struts options tag is trying to 
> call
> getMyValue()
> method on the list object itself.  Omitting the property and labelProperty
> attributs of the
> tag results in the Object toString() being invoked with the correct values 
> of
> the labal and
> value properties of the LabelValue Bean.
>  Any assistance is much appreciated.
>
>
> ---------------------------------
> Check out what you're missing if you're not on Yahoo! Messenger 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message