I am using indexed properties in my application.
My first page id edit.jsp. Here i will present indexed text boxes as table cells.The initial text values are taken from database and provided using my ActionForm and Bean classes.
Now i need to add new rows with empty text boxes. I want these rows also to be indexed. say like
<table>
<logic:iterate name="bookForm" property="books">
<tr>
<td><html:checkbox property="id" name="books" indexed="true"/>
<html:hidden property="id" name="books" indexed="true"/></td>
<td><html:text property="author" name="books" indexed="true"/></td>
<td><html:text property="title" name="books" indexed="true"/></td>
<td><html:text property="available" name="books" indexed="true"/></td>
</tr>
</logic:iterate>
</table>
The above code is provided by a new RowAdder.jsp which should add a new row. If my scope is set to session, then the above code is presenting all the same table data instead of a new empty row.
if the scope is set to request then my server says my ActionForm is empty and cannot use <logic:iterate>
How can i add a new row with empty text boxes which are indexed?
should i specify the index myself in the action which points to RowAdder.jsp?
should i set the index my self in BookForm.setBookBean(int inde,BookBean bean) to resolve this???
if so then what is the use of unindexed getter, setter methods which are provided as well.
regards,
surendarprabu