struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Bate <>
Subject Problem updating bean from multi-select box
Date Mon, 23 Feb 2004 10:47:01 GMT

I am having a problem with the internals of BeanUtils/RequestUtils when my
posting changes of a form to an action where the page contains a
multi-select box.  Can anyone spot what I am doing wrong from the code
snippets below..?

[MyBean] (inside the Form Bean)
	public void setMyFieldList(Collection myFieldList)   (list
containing the options to choose from)
	public Collection getMyFieldList()
	public void setMyField (Collection myField)	  (the field in
question, multi-option)
	public Collection getMyField()

	<html:select property="myBean.myField" multiple="true" size="7">
		<html:options name="myFormBean"

The page renders fine and automatically selects the right items in the list
but when the page is updated things blow up trying to update the data back
into the bean inside RequestUtils.

Do I need to do anything else to tell the posted data to go back into the
main field (which is a collection)?


Andrew Bate
Serco Justice
Direct Line: (01452) 880433

This e-mail and any attachments may contain confidential and/or privileged
material; it is for the intended addressee(s) only.  If you are not a named
addressee, you must not use, retain or disclose such information.

Serco cannot guarantee that the e-mail or any attachments are free from

The views expressed in this e-mail are those of the originator and do not
necessarily represent the views of Serco.

Nothing in this e-mail shall bind Serco in any contract or obligation.

Serco Group plc.  Registered in England and Wales.  No: 2048608
Registered Office:  Serco House, 16 Bartley Wood Business Park, Bartley Way,
Hook, Hampshire, RG27 9UY, United Kingdom.

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

View raw message