Document list/map/array constructor data binding
Closes gh-32426
This commit is contained in:
@@ -116,6 +116,10 @@ NOTE: The `@BindParam` may also be placed on the fields that correspond to const
|
||||
parameters. While `@BindParam` is supported out of the box, you can also use a
|
||||
different annotation by setting a `DataBinder.NameResolver` on `DataBinder`
|
||||
|
||||
Constructor binding supports `List`, `Map`, and array arguments either converted from
|
||||
a single string, e.g. comma-separated list, or based on indexed keys such as
|
||||
`accounts[2].name` or `account[KEY].name`.
|
||||
|
||||
In some cases, you may want access to a model attribute without data binding. For such
|
||||
cases, you can inject the `Model` into the controller and access it directly or,
|
||||
alternatively, set `@ModelAttribute(binding=false)`, as the following example shows:
|
||||
|
||||
Reference in New Issue
Block a user