Hi all,

I am somewhat new to Spring MVC, so bear with me.

I am trying to understand how binding works in Spring MVC. Do I need to create PropertyEditors for each of my domain objects that are used to populate properties of other objects in forms?

For example, if I have the following domain object that I need to populate through a form:

class Foo {
int someInt;
String someString;
Bar bar;
Baz baz;
...
//getters and setters
}

Do I need to create and register PropertyEditors for types Bar and Baz for binding to work properly? Or is there a different way? I happen to be working with a fairly complex domain model (150+ classes, most of them used in forms) and I am trying to find the least painful solution for form binding.

Also, I understand those PropertyEditors will have to retrieve persistent objects from the database? Or do they need to just do type casting, and the object retrieval should happen elsewhere?

I appreciate any suggestions.

Eugene