4.9 Datalist
Datalist is a list-type component used to organize and present sets of related data.
Each element in this list, known as "datalistitem," has the capability to contain various elements such as tables, inputs, images, and other components.
This component is associated with a repository defined in "repo," allowing for the direct linking of data.
Additionally, it features the ability to be filtered through the "repofilter" component, providing the capability to display specific data based on predefined filtering criteria.
This versatility allows for the creation of interactive and customizable lists that can incorporate a variety of elements based on the specific requirements of the user interface and application functionality.
Attribute | Default Value | Type | Description | |
---|---|---|---|---|
Common | id | null | String | Unique identifier of the component. If it doesn't have an id, it is assigned with the nomenclature ${tag}${num}. |
render | true | Boolean or JEXLExpression | EL expression to evaluate if the component should be displayed. | |
onBeforeRender | null | String | JS method to execute before the current component is rendered. | |
onAfterRender | null | String | JS method that will be executed once the current component is rendered. | |
action | null | String | Identifier of the action to perform when the user interacts with this component. | |
allowsPartialRestore | false | Boolean | If the state of the current component should be restored when the user returns to the view. | |
repo | null | String | Identifier of the repository used to fetch the data. |
4.9.1 Datalistitem
Attribute | Default Value | Type | Description | |
---|---|---|---|---|
id | null | String | Unique identifier of the component. If it doesn't have an id, it is assigned with the nomenclature ${tag}${num}. |
4.9.2 Repofilter
Attribute | Default Value | Type | Description | |
---|---|---|---|---|
id | null | String | Unique identifier of the component. If it doesn't have an id, it is assigned with the nomenclature ${tag}${num}. |
The repoFilter
tag has no attributes; the expression is defined by nesting predicate tags such as and
, or
.
- Operators: EQ, LT, GT, LE, GE, IN, NOT_IN, IS_NULL, NOT_NULL, LIKE, CONTAINS, STARTS_WITH, ENDS_WITH.
- Criteria: and, or
Attribute | Default Value | Type | Description | |
---|---|---|---|---|
property | null | String | Name of the entity property used to filter the results. | |
mandatory | false | Boolean | An operator can include the parameter "mandatory=True" to indicate that the query cannot be executed if that value is not available. | |
value | null | String or JEXLExpression | EL expression used as the value. |
<datalist id="datalistProvincia" repo="provinciaRepo">
<datalistitem>
<table border="0" weigths="30, 70">
<row>
<input label="Cod.: " value="${entity.c_provincia_id}"/>
<input label="Provincia" value="${entity.d_provincia}"/>
</row>
</table>
</datalistitem>
<repofilter>
<le property="c_provincia_id" value="9"/>
</repofilter>
</datalist>