Document list/map/array constructor data binding

Closes gh-32426
This commit is contained in:
rstoyanchev
2024-06-20 11:09:12 +01:00
parent e48cbc5ba8
commit 6e82bf05b6
3 changed files with 19 additions and 7 deletions

View File

@@ -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: