struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Kelly" <ke...@ipe.fzk.de>
Subject Re: Multiple form inputs of the same name into a bean
Date Wed, 26 Mar 2003 13:24:22 GMT
That has been the best answer I've had yet.  Had multiple problems with this
one, and found all the problems and solved them.

Cheers

And thanks loads,

Simon


----- Original Message -----
From: "Ady Das O'Toole" <ady.daso'toole@camelotinteractive.com>
To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>;
<kelly@ipe.fzk.de>
Sent: Wednesday, March 26, 2003 1:08 PM
Subject: RE: Multiple form inputs of the same name into a bean


> Not sure if I follow your question. But if I'm assuming correctly you have
a
> form bean with a property as an array
>
> Ex:
> String[] arrProp;
>
> The form bean has the related accessor methods to this property.
> void setArrProp(String[] arrProp){}
>
> The html form can now have multiple inputs with the same name
> <input type="text" name="arrProp" value="">
> <input type="text" name="arrProp" value="">
> <input type="text" name="arrProp" value="">
>
> I've found that the getter method returns null for values in the array
that
> do not have defaults, otherwise it's pretty straightforward.
>
>
> -----Original Message-----
> From: Simon Kelly [mailto:kelly@ipe.fzk.de]
> Sent: 26 March 2003 11:00
> To: Struts Users Mailing List
> Subject: Multiple form inputs of the same name into a bean
>
>
> Hi all,
>
> All bean examples I can find are only dealing with single named inputs
from
> a form.  Has any one delt with multiple inputs of the same name into a
form
> before??  If any one has, could you answer the following questions:
>
> 1)  How should the setter method be coded?
> 2)  What is the best Collection to use for the storage?
> 3)  What should the getter method return when invoked?
>
> Cheers
>
> Simon
>
> Institut fuer
> Prozessdatenverarbeitung
> und Elektronik,
> Forschungszentrum Karlsruhe GmbH,
> Postfach 3640,
> D-76021 Karlsruhe,
> Germany.
>
> Tel: (+49)/7247 82-4042
> E-mail : kelly@ipe.fzk.de
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________
>
>
> **********************************************************************
> The information contained in this e-mail may be confidential. It is
intended only for for the use
> of the named recipient. If you are not the named recipient please delete
this e-mail. If you have
> received this e-mail and are not the named recipient, any disclosure,
reproduction, distribution
> or other dissemination or use of the information contained in this e-mail
is strictly prohibited.
> E-mail transmission cannot be guaranteed to be secure or error free as
information could be
> intercepted, corrupted, lost, destroyed, arrive late or incomplete, or
contain viruses.
> The sender therefore does not accept liability for any errors or omissions
in the contents of this
> message which arise as a result of e-mail transmission.  If verification
is required please
> request a hard copy version.
> Registered Office:
> Camelot Group plc
> Tolpits Lane
> Watford
> WD18 9RN
> Tel: 01923 425000
> Registered in England and Wales
> No. 2822203
> **********************************************************************
>
>
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message