We are beginning to use Spring in our j2ee application and have a few questions.
If I want to show a new form based on a complex nested object (for example A.B.C), I must fully construct it in formBackingObject() :
new A(...,new B(..., new C(...)))
If i construct the object only as
new A()
, it leads to NullValueInNestedPathException. Is our way showing new empty form the only one ?
And what about the opposite direction? What if C can be null and I don't fill its atributes in form? I get again in onSubmit() full object A.B.C, not only A.B with C set to null.
Is our way right or all this could be done better and simplier ?
Thanks.


Reply With Quote
