Dec 17th, 2009, 11:43 AM
Spring Bind Exception
I am running into a specific scenario.
I have a List of objects say Car, which I am binding using spring:bind into HTML table. The page is painted properly. Now, on this page, I let the user add/remove Car and by using DHTML, I create additional HTML rows with exact code that Spring produces in first place.
Case A: When I remove the Cars from page, there are no issues. My controller gets the modified Car list.
Case B: However, when I add Cars, I get org.springframework.beans.InvalidPropertyException ..... java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
How do I avoid this exception? Is there any way, I can tell that I have modified the List and a List needs to be created from the new data in the HTTP request?
Any help Gurus?
Dec 17th, 2009, 12:59 PM
We did some googling and came across this mighty fine article -
The solution is LazyList!