struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Bate <andrew.b...@serco.com>
Subject RE: Problem updating bean from multi-select box
Date Mon, 23 Feb 2004 11:09:11 GMT

The form bean is in session and other fields work when hitting the action -
just not this collection field with the multi-select date.

> -----Original Message-----
> From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
> Sent: 23 February 2004 10:54
> To: Struts Users Mailing List
> Subject: RE: Problem updating bean from multi-select box
> 
> 
> Are you making sure that the MyBean instance exists when the form is
> submitted?
> 
> -----Original Message-----
> From: Andrew Bate [mailto:andrew.bate@serco.com]
> Sent: Monday, 23 February 2004 18:47
> To: 'struts-user@jakarta.apache.org'
> Subject: Problem updating bean from multi-select box
> 
> 
> Hi,
> 
> 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()
> 
> [JSP]
> 	<html:select property="myBean.myField" multiple="true" size="7">
> 		<html:options name="myFormBean"
> property="myBean.myFieldList"/>
> 	</html:select>
> 
> 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)?
> 
> Thanks,
> 
> Andrew
> --
> Andrew Bate
> Serco Justice
> Direct Line: (01452) 880433
> Email: andrew.bate@serco.com
> 
> 
> 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
> viruses.
> 
> 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: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 

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
viruses.

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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message