I want to allow the user to enter a list of faces in a web application, and then send them as one batch. Each line looks something like this:
<TR> <TD> <INPUT name="person.fname"> </TD> <TD> <INPUT name="person.lname"> </TD> <TD> <INPUT name="person.birthdate"> </TD> </TR>
The form starts with one line of blank entries, and I want the new line to be added to the list whenever the user fills in any of the fields - i.e. the list is growing on demand. Similarly, I want the row to disappear whenever the user clears all the fields in it.
What is the easiest, most reliable and convenient way to implement it?
Finally, how do I send this value table back to the server? How can I specify the name of each field so that the server can create a list of Person objects based on the entered values?
source share