I want to iterate ArrayList element and Update the list element then save it.
My Form Bean:
MyTestCodeForm.java - it have two members id and ArrayList.
String id;
ArrayList<Book> listBook;
getters and setters of id property getters and setters of ArrayList
public void setListBook(ArrayList<Book> bookList)
{
this.listBook = bookList;
}
public ArrayList<Book> getListBook()
{
return this.listBook;
}
Book.java have two members
String bookId;
String bookName;
Action class - MyTestCodeAction.java
In this, i have get the data and save into database.
my jsp page for iterating :
<nested:nest property='myTestCodeForm'>
<html:form action='/myTestCodeForm'>
<nested:write name='' property='id'/>
<html:hidden name='' property='id'/>
<nested:iterate id='foo' name='' property='bookList'>
<html:text name='foo' property='bookName' indexd='true'/>
</nested:iterate>
<html:submit value='submit'/>
</html:form>
</nested:nest>
my question is, i iterate the data successfully but when i get the data into action class i didn't receive array list data but i received id attribute.
Please help