struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Massie" <>
Subject Problem using DynaValidatorForm and html:select
Date Wed, 30 Jul 2003 12:51:31 GMT
In my form I have a html:select field with multiple="true" as shown below:

<html:select multiple="true" property="property1">
	<logic:iterate collection="<%=myTypes%>" id="type" type="java.lang.String">
		<html:option value="<%=type%>"/>
			<bean:write name="type"/>

where myTypes is String[]. In my struts-config file I am using
DynaValidatorForms for the form beans. The form bean for the above is:

<form-bean name="myForm"
      <form-property name="property1" type="java.lang.String" />

In my Action class for this form I have tried to retrieve the values with:

String prop1 = (String) form.get("property1");

but this only returns the first element of the multiple select. I've also
tried to use ArrayLists for the above casting,and also as the type for the
form-property. When used for the casting I get a class cast exception. When
used for the form-property I get informed that its an icompatible type as
the select is returning a string.

Does anyone know how to solve this problem?


Daniel Massie

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message