> -----Original Message-----
> From: Daffin, Miles (Company IT) 
> [mailto:[EMAIL PROTECTED]
> 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
> [EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]> 
--------------------------------------------------------
 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to