struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Crazy Dave <muesliflakesm...@yahoo.com>
Subject Html:Select
Date Tue, 26 Feb 2002 12:16:49 GMT
I'm trying to show a predefined arraylist of beans in
a html:select tag
and I keep getting the following exception.


description The server encountered an internal error
(Internal Server Error) that prevented it from
fulfilling this request.

javax.servlet.ServletException: No getter method
available for property securityModule for bean under
name org.apache.struts.taglib.html.BEAN at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:457)

My ArrayList is setup correctly as the following code
in the JSP 

<%
MfDebug.line( "TEST IT OUT" );
Object[] al = ((ArrayList)getServletContext(
).getAttribute(APPCONSTANTS.DROPDOWN_SECURITY_MODULES)).toArray(
);
for ( int i = 0 ; i<al.length; i++ ) {
  ComboBoxBean cb = (ComboBoxBean)al[i];
  MfDebug.p( "Label: " + cb.getLabel( ) + "    Value:
" + cb.getValue( ) );
}
MfDebug.line( );
%>

produces:

[ TEST IT OUT ]-------------------------------------
Label: < Please select module >    Value:
Label: Security    Value: 1
Label: eCorp    Value: 2
Label: Muesliflakes    Value: 3
----------------------------------------------------

My <html:select> tag is as follows:

<html:select property="securityModule" size="1">
  <html:options collection="<%=
APPCONSTANTS.DROPDOWN_SECURITY_MODULES %>"
  property="value" labelProperty="label"/>
</html:select>

<%

Cheers Dave

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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


Mime
View raw message