struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Barrows" <jbarr...@sssc.com>
Subject RE: Adding rows (beans) to dynamic form
Date Wed, 01 Dec 2004 22:08:04 GMT
> -----Original Message-----
> From: Daffin, Miles (Company IT) 
> [mailto:Miles.Daffin@morganstanley.com]
> Sent: Wednesday, December 01, 2004 2:27 PM
> To: Struts Users Mailing List
> Subject: Adding rows (beans) to dynamic form
> 
> 
> Hi All,
>  
> I apologise in advance for this question - but I have 
> searched/tried all
> day without nailing a solution.
>  
> I am using DynaValidatorActionForm. One of the fields is a list of
> qualifications. Each qualification has three fields (I have 
> implemented
> this as a simple custom bean).
>  
> I want the user to be able to add qualifications to the list
> dynamically. Initially there will be a table with three text 
> inputs. If
> the user presses a 'Save' button on the same row as the 
> inputs the form
> will be submitted and reloaded. The user will then see a row for the
> data they just added (with a delete button), followed by the row of
> three empty inputs as before. The user can then go on adding
> qualifications to the list before finally submitting the whole form
> (different dispatch).

<table>
	<!-- Current list of stuff -->
	<tr>
		<html:form blah>
			<td><html:input blah</td>
			rinse, repeat
		</html:form>
	</tr>
	<html:link to the save action/>
blah
Then the action you submit to takes the input params, folds, spindles and mutilates as appropriate,
eventually adding it to the list in the session.
The save action, grabs this list from the session and then folds, spindles and mutilates the
list as appropriate.



>  
> I have done this before without struts (a hideous combination of
> javascript and jsp scriptlets). Can anyone point me a example 
> of how to
> do this kind of thing cleanly with tags/struts? I feel I may be
> overcomplicating things.
>  
> Many thanks.
>  
> -Miles
>  
> Miles Daffin
> Morgan Stanley
> 20 Cabot Square | Canary Wharf | London E14 4QA | UK
> Tel: +44 (0) 20 767 75119
> miles.daffin@morganstanley.com 
<mailto:miles.daffin@morganstanley.com> 
--------------------------------------------------------
 
NOTICE: If received in error, please destroy and notify sender.  Sender does not waive confidentiality
or privilege, and use is prohibited. 
 

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


Mime
View raw message