Hi Everyone, I'm new to struts2 and I'm having trouble getting data entered into an html form to populate an ArrayList the way I want it to when I delete a row from an html table that holds input fields that are populated from the ArrayList. Instead of populating every element in the ArrayList it leaves a null Element in the ArrayList where the row was deleted. I'm converting my application from a
struts 1.2.7 application and the behavior in 1.2.7 was to fill in all the elements in the ArrayList and not leave nulls where the row was removed. I don't want to have to change my application to deal with these null rows or write code to remove them if there is a way to get struts2 to behave the way struts 1 did.
Maybe this example will make what I'm saying more clear:
JSP And the row is being deleted on the screen by javascript that looks like this:
If the iterator loops 5 times and puts 5 hidden fields on the screen and the javascript is called to delete the third one then when the form is submitted the ArrayList will have elements in its first two and list two positions, but the third position will be null.
Please let me know if there is a way around this. Also, if someone could point me to a description of how struts2 process when it moves data from an html form to
java fild that would be helpful as well.
Thanks
Tom