USE CASES
COMPLEX MULTIVALUED PROPERTIES
- In JSF UI, a list widget is used for multivalued / complex multivalued fields
- The list widget can be marked as required in the UI so that you are forced to enter at least one value
- In Web UI, this translates to a `nuxeo-data-table` element
- For JSF => Web UI migration, we want to move constraints expressed in the UI to the schemas so that we can scaffold proper layouts in Designer afterwards
- So we would add a required constraint on the property and use a `nuxeo-data-table` element for the layout
- But it would be akward for users to have a required constraint set at schema level if they do not see a red `*` on the field in web ui => `nuxeo-data-table` element should handle this
EXAMPLE USAGE
complex field address (required)
- street name and number (required)
- state (optional)
- ...
in the example above,
- I want my user to have to fill in an address, so I make the address field required,
- then in the address some parts only are required so only some of the sub fields are required.
Currently we handle the second part only.
IMPLEMENTATION
Added the following properties to nuxeo-data-table:
- label Label to display when using table in edit mode.
- required Property that indicates if the multi value field is required or not (and shows an * indicator).
- errorMessage Error message to display when the field is required and doesn't have any value yet.
See attached screenshot: https://jira.nuxeo.com/secure/attachment/69228/multi-value-fields.png
- is required by
-
ELEMENTS-749 Backport ELEMENTS-633 and ELEMENTS-552 to fix required sub property validation in data-table editing
- Resolved
-
NXS-3493 JSF layout migration
- Resolved
-
NXS-4540 Handle required constraint in Designer for nuxeo-data-table element
- Open
-
NXS-4539 Allow multivalued complex fields to have the required constraint
- Resolved