I am trying to update the value of age over here. While doing the form submit, the form bean in the action class is not updated and having the old value. Could you please suggest to implement this?
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan.
You'd need to use indexed properties or *something* like that since you're inside an iterator. Without seeing the rest of the form it's impossible to help more, though.
Joined: Feb 23, 2010
The Form Bean(StudentManagementFormBean) is having a single field 'studentList' which is a type of ArrayList<com.siva.bean.pojo.Student>. The same list is coming from the model part of a application. I just need to return the same list with the updated age.
Oops! I completely spaced on the part about this being in an iterate tag. What David said is correct. You need to think about how Struts is going to be able to set the returned value. I find in these types of situations that it helps if you look at the HTML that is generated.