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" <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to