ok... its a long question. but i think the answer is simple. though i can't find the solution myself. t have the four columns in a row in a jsp page. i would like to add 10 more rows using a loop in the page where the fields will have name like
row1_amount, row1_loantype,row1_date, row1_status
row2_amount, row2_loantype,row2_date, row2_status
and so on.
more clearly
property="cib_borrower_report.loanType"
would be in all ten rows in the form.
property="cib_borrower_report.loanType1"
property="cib_borrower_report.loanType2"
property="cib_borrower_report.loanType3"
now if i want to do this naming using loop how to do this? how can i add 1,2,3.. in property???
if i can do this dynamically, it will help me in type of fetching the values. so please help.
<table border="0" cellpadding="1"><tbody>
<tr>
<td ><label class="desc"><bean:message key="label.cib.new.report.taken.amount"/></label></td>
<td><html:text property="cib_borrower_report.takenAmount" styleClass="SingleLineTextField" size="20"></html:text></td>
<td> </td>
<td><label class="desc"><bean:message key="label.cib.new.report.loan.type"/></label></td>
<td><html:text property="cib_borrower_report.loanType" styleClass="SingleLineTextField" size="20"></html:text></td>
<td> </td>
<td><label for="cib_borrower_report.reportingDate" class="desc"><bean:message key="label.cib.new.reporting.date" /></label></td>
<td>
<table><tbody><tr>
<td><input type="Text" name="cib_borrower_report.reportingDate" id="cib_borrower_report.reportingDate" style="cib_borrower_report.reportingDate" class="SingleLineTextField" maxlength="10" size="10" tabindex="1" ></td>
<td><a href="javascript:NewCal('cib_borrower_report.reportingDate','mmddyyyy')"><img align="middle" src="Images/cal.jpg" width="20" height="20" border="0" alt="Pick a date"></a></td>
</tr></tbody></table>
</td>
<td> </td>
<td><label class="desc"><bean:message key="label.cib.new.loan.status"/></label></td>
<td align="center">
<html:select property="cib_borrower_report.loanStatus" styleId="searchQuery1">
<html:option value="STD">STD</html:option>
<html:option value="SMA">SMA</html:option>
<html:option value="SS">SS</html:option>
<html:option value="DF">DF</html:option>
<html:option value="BL">BL</html:option>
</html:select>
</td>
</tr>
</tbody></table>