-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Description
Keith Donald opened SPR-6032 and commented
Grails, SpEL, and the new PresentationModel support in development for 3.1 all have native support for this. We should consider building this capability natively into DataBinder for consistency, and so Grails no longer has to maintain its own DataBinder extension.
Scenario:
Assume we are binding to an instance of object Foo
Assume the expression of the property we are binding to is 'bar.baz', so a nested binding
If the bar property value is null, this feature will cause a new value of bar's propertyType to be created via its default constructor and set for bar.
As a developer, this alleviates me from having to make sure all the property paths are instantiated ahead of time; I can simply rely on what the client is binding along with the property metadata to drive population of the object graph. This is convenient.
Affects: 3.0 M4
Issue Links:
- Option to expose empty value instead of NullValueInNestedPathException [SPR-1671] #6368 Option to expose empty value instead of NullValueInNestedPathException
- Null property values in nested paths relating to <spring:bind> tag, <form:xxx> tags, and ServletRequestDataBinder [SPR-1860] #6554 Null property values in nested paths relating to spring:bind tag, form:xxx tags, and ServletRequestDataBinder
Referenced from: commits 3fa533d
2 votes, 3 watchers