views:

578

answers:

1

Hi,

I am new to spring MVC.In my application I need to bind dynamically generated textbox contents to a list of beans dynamically.I went through the spring mvc book for binding to lists.But before binding, we must not only initialize the collection, but populate it with objects.

In my case I dont know the size of the list initially.

So is there any way to achive this ?

any help ?

Thanks in advance

A: 

Yes there is a way to achieve this - I plan on writing a blog post on this very subject soon to explain it in detail. I needed to do the same thing and managed to get a complete solution working, pieced together from various clues on various other blogs.

Briefly, it involves using an org.springframework.util.AutoPopulatingList in your model.

Daniel Alexiuc