Get a multi row to work by itslef first. (without JavaScript add) and unit test.

Once you get this working, saving, you can just view HTML (in the working browser ) and realize that struts just emits standard form HTML.
You can examine this HTML and get your .js to emit same via add button.


hth,

Rob wrote:

I've not been able to find a solution to this within the mailing
list.  But I would like to the following.

I have a page with a collection of fields which are populated by
a form (via it's collection).  I also have a button which would
allow the addition of a new row. (hopefully)

 Name  Descrip
[ xy ][ foo   ]
[ ab ][ bar   ]

Add

(1) I would like to have the add button add a new pair of text
input fields each time it is clicked. (2) I would like it if
clicking add did not make a request to the server this being the
case it suggests some kind of client side javascript adding the
new fields.

The problems of course with this are the following.

(1) client side code won't be able to utilise the struts tags
    and as such I won't know what values to set the appropriate
    input text element attributes to.
(2) It is highly likely that even if I solved problem (1) that
    it would result in a IndexOutOfBounds exception, or just not
    bother with the properties from the new fields.

Has anyone else solved this?  Does struts have a mechanism for
dealing with this?  I'm fully aware of nested/logic tags but
if they are the way I can't see how.

Suggestions would be appreciated, Thanks!

Rob


--
Vic Cekvenich,
Struts Instructor,
1-800-917-JAVA

Advanced <a href ="baseBeans.com">Struts Training</a> and project recovery in North 
East.
Open Source <a href ="baseBeans.com">Content Management</a>  basicPortal sofware
Best practice<a href ="baseBeans.com">Struts Support</a> v.1.1 helper ScafflodingXPress




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to