I have a command object composed of primitive fields and an object field. How do I bind my form fields to the fields in the object?
I tried doing this but to no ava
Your list either needs to be pre-populated with as many LearningActivity objects as you plan to refer to (using activity[0], activity[1], etc.) or it needs to be a lazy list. A lazy list is a list that will populate itself with empty objects when a given index is referenced.
A comment indicates that you're trying to use Apache Commons LazyList, which ought to work -- are you missing an import directive? However, as an alternative there is a Spring lazy list implementation called AutoPopulatingList.