okay, so you're saying use can add only ONE row dynamically before submit?
and that the newly added row's HTML code is:

<tr>
         <td><input type="checkbox" name="id" value="yes"></td>
         <td><input type="text" name="customer[4].firstName"
value="John"></td>
         <td><input type="text" name="customer[4].lastName"
value="Mark"></td>
         <td><input type="text" name="customer[4].address" value="New
York"></td>
   </tr>  <!--This is the HTML of hardcoded row-->


if that's the case, in your ActionForm's reset method, detect that user has
added a new row, maybe thru request.getParameter("customer[?].firstName")
where ? will be an integer 0..n where reuqest.getParameter would return null
for n+1. once you've done that do a:

Customer[] customers = new Customer[n];
form.set("customer", customers);

see if that helps.

ATTA


On 12/18/05, Irfan Shaikh <[EMAIL PROTECTED]> wrote:
>
> Once again Generated HTML :
>
> <form name="listTextForm" method="post"
> action="/GenerateHTMLTable/listtext.do">
>
> <input type="submit" value="Submit">
>         <br>
>   <table width="30%" border="0">
>   <colgroup>
>
>         <COL width="5">
>         <COL width="30">
>     <COL width="30">
>     <COL width="35">
>   </colgroup>
>
>           <!--Session Scope -->
>
>         <tr>
>           <td><input type="checkbox" name="id" value="yes"></td>
>           <td><input type="text" name="customer[0].firstName"
> value="Irfan"></td>
>
>           <td><input type="text" name="customer[0].lastName"
> value="Shaikh"></td>
>           <td><input type="text" name="customer[0].address" value="New
> Mumbai"></td>
>     </tr>
>
>         <tr>
>           <td><input type="checkbox" name="id" value="yes"></td>
>           <td><input type="text" name="customer[1].firstName"
> value="Maruf1212"></td>
>           <td><input type="text" name="customer[1].lastName"
> value="Dolani"></td>
>           <td><input type="text" name="customer[1].address"
> value="Mumbai"></td>
>     </tr>
>
>         <tr>
>           <td><input type="checkbox" name="id" value="yes"></td>
>
>           <td><input type="text" name="customer[2].firstName"
> value="Azima121111"></td>
>           <td><input type="text" name="customer[2].lastName"
> value="Kacchi"></td>
>           <td><input type="text" name="customer[2].address"
> value="Pune"></td>
>     </tr>
>
>         <tr>
>           <td><input type="checkbox" name="id" value="yes"></td>
>           <td><input type="text" name="customer[3].firstName"
> value="Ruhi11133"></td>
>           <td><input type="text" name="customer[3].lastName"
> value="Khan"></td>
>           <td><input type="text" name="customer[3].address"
> value="Pune"></td>
>     </tr>
>
>
>         <tr>
>           <td><input type="checkbox" name="id" value="yes"></td>
>           <td><input type="text" name="customer[4].firstName"
> value="John"></td>
>           <td><input type="text" name="customer[4].lastName"
> value="Mark"></td>
>           <td><input type="text" name="customer[4].address" value="New
> York"></td>
>     </tr> (Hardcoded HTML row)
>
>   </table>
>
>
> </form>
>
>

Reply via email to