I have been trying everything now to get this to work. Please help!
I have object Company
That object has a property contactAddress that is a instance of the class Address.
Code:public class Company { private String name; private Address contactAddress; }I am trying to post this to my controller and insert it into the db.Code:public class Address { private String street; }
the JSP is as follows:
Code:<form:form commandName="company" action="home-add-company"> <form:input path="name" cssClass="validatedinput"/> <form:input path="contactAddress.street"/> </form:form>
I have a couple of PropertyEditorSupport classes taking care of the transformation, and that is working fine if the objects are not nested.
I instantiate the objectgraph before in the controller before showing the form, and if I set the value of contactAddress's street, the value shows up in the form.
So that seems to work.
But when I post the form, I get the error:
Code:Invalid property 'contactAddress' of bean class [com.ww.dao.domain.Company]: Value of nested property 'contactAddress' is null
Could someone please tell me what this could be!?
Thanks!


Reply With Quote