Tag to perform complex editions over a list of items.
It only deals with lists or arrays of serializable objects.
This tags puts a model in the request which can be accessed to get information about each list item value.
Attributes |
Name | Required | Request-time | Type | Description |
value | false | false | java.util.List | Value binding representing the list to edit |
defaultValue | false | false | java.util.List | Value binding representing the default value for the list to edit. This is only resolved when the value attribute resolves to a null or empty value, and can be useful to set default values from the interface, without having to resolve them in the original value binding method. Available since 5.4. |
id | false | false | java.lang.String | The component identifier for this component. This value must be unique within the closest parent component that is a naming container. |
rendered | false | false | java.lang.String | Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit. |
required | false | false | java.lang.String | Flag indicating that the user is required to provide a submitted value for the list. WARNING: when setting the "diff" attribute to true, this flag will have no effect. |
model | false | false | java.lang.String | String. The name of a request-scope attribute under which the data model will be exposed. The data model handles current index, it gives access to informations about the current item. For instance, following value bindings can be used inside the tag: - #{model.rowCount}: size of the model.
- #{model.rowData}: current item of the list (changes while iterating).
- #{model.rowIndex}: current index integer.
- #{model.rowNew}: boolean indicating if this row was already present in the original list.
|
diff | false | false | java.lang.String | Boolean (default value: false) indicating whether a diff (instead of the whole new list) should be set when updating the model after validation. This is useful when managing large lists. Note that if the list is set on a document model, the document should be saved in repository after updating the model, so that the whole list is refetched correctly. Note also that no validation error will occur if the component is required. |
removeEmpty | false | false | java.lang.String | Boolean (default value: false) indicating whether empty values (null or equal to template) should be removed from the list when saving. |
number | false | false | java.lang.String | Integer (default value: null) indicating the number of rows that should be presented by default in edit mode. These rows are added when the editable model is built. |
template | false | false | java.lang.String | Object representing the default value to add to the list. When using a document model, you can use the function nxd:defaultValue(schemaName, fieldName) to get the default value for thiss complex type. |