views:

53

answers:

1

I have Bean A{ B b;} which encapsulates instance of Bean B. I have property name which i want to set name property of Bean B. Is there any way i can do it Spring. Currently i am using AbstractCommandController.

A: 

If you want to bind a property of the nested object to the form field, you can do it using . in path attribute:

<form:form ...>
    <form:input path = "b.name" />
</form:form>
axtavt