Cells are nested within columns (for iteration) or inside worksheets (for direct placement using the
column and row attributes) and are responsible for outputting the value, usually through an EL-expression involving the var attribute of the datatable. See Section 19.14.6, “Cell settings”.
<e:cell>
|
Attributes
Child elements
Facets
|
<e:workbook> <e:worksheet> <e:column value="#{personList}" var="person"> <f:facet name="header"> <e:cell value="Last name"/> </f:facet> <e:cell value="#{person.lastName}"/> </e:column> </e:worksheet> </e:workbook>
This defines a column with a header and an iterated output.
Validations are nested inside cells or formulas. They add constraints to cell data.
<e:numericValidation>
|
Attributes
Child elements
Facets
|
<e:workbook> <e:worksheet> <e:column value="#{personList}" var="person"> <e:cell value="#{person.age"> <e:numericValidation condition="between" value="4" value2="18"/> </e:cell> </e:column> </e:worksheet> </e:workbook>
This adds numeric validation to a cell, specifying that the value must be between 4 and 18.
<e:rangeValidation>
|
Attributes
Child elements
Facets
|
<e:workbook> <e:worksheet> <e:column value="#{personList}" var="person"> <e:cell value="#{person.position"> <e:rangeValidation startColumn="0" startRow="0" endColumn="0" endRow="10"/> </e:cell> </e:column> </e:worksheet> </e:workbook>
This adds validation to a cell, specifying that the value must exist within the values specified in range A1:A10.
<e:listValidation>
|
Attributes
Child elements
Facets
|
e:listValidation is a just a container for holding multiple e:listValidationItem tags.
<e:listValidationItem>
|
Attributes
Child elements
Facets
|
<e:workbook> <e:worksheet> <e:column value="#{personList}" var="person"> <e:cell value="#{person.position"> <e:listValidation> <e:listValidationItem value="manager"/> <e:listValidationItem value="employee"/> </e:listValidation> </e:cell> </e:column> </e:worksheet> </e:workbook>
This adds validation to a cell, specifying that the value must be "manager" or "employee".