h

Tag dataTable

Component Information 
InfoValue
Component Typejakarta.faces.HtmlDataTable
Handler ClassNone
Renderer Typejakarta.faces.Table
DescriptionNone
Attributes 
NameRequiredTypeDescription
firstfalsejakarta.el.ValueExpression
(must evaluate to int)
Zero-relative row number of the first row to be displayed. If this property is set to zero, rendering will begin with the first row of the underlying data.
idfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
The component identifier for this component. This value must be unique within the closest parent component that is a naming container.
renderedfalsejakarta.el.ValueExpression
(must evaluate to java.lang.Boolean)
Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit. The default value for this property is true.
rowsfalsejakarta.el.ValueExpression
(must evaluate to int)
The number of rows to display, starting with the one identified by the "first" property. If this value is set to zero, all available rows in the underlying data model will be displayed.
valuefalsejakarta.el.ValueExpression
(must evaluate to java.lang.Object)
The current value of this component.
varfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Name of a request-scope attribute under which the model data for the row selected by the current value of the "rowIndex" property (i.e. also the current value of the "rowData" property) will be exposed.
bgcolorfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Name or code of the background color for this table.
bodyrowsfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Comma separated list of row indices for which a new "tbody" element should be started (and any previously opened one should be ended).
borderfalsejakarta.el.ValueExpression
(must evaluate to int)
Width (in pixels) of the border to be drawn around this table.
captionClassfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Space-separated list of CSS style class(es) that will be applied to any caption generated for this table.
captionStylefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
CSS style(s) to be applied when this caption is rendered.
cellpaddingfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Definition of how much space the user agent should leave between the border of each cell and its contents.
cellspacingfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Definition of how much space the user agent should leave between the left side of the table and the leftmost column, the top of the table and the top of the top side of the topmost row, and so on for the right and bottom of the table. It also specifies the amount of space to leave between cells.
columnClassesfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Comma-delimited list of CSS style classes that will be applied to the columns of this table. A space separated list of classes may also be specified for any individual column. If the number of elements in this list is less than the number of actual column children of the UIData, no "class" attribute is output for each column greater than the number of elements in the list. If the number of elements in the list is greater than the number of actual column children of the UIData, the elements at the posisiton in the list after the last column are ignored.
dirfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) and "RTL" (right-to-left).
footerClassfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Space-separated list of CSS style class(es) that will be applied to any footer generated for this table.
framefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Code specifying which sides of the frame surrounding this table will be visible. Valid values are: none (no sides, default value); above (top side only); below (bottom side only); hsides (top and bottom sides only); vsides (right and left sides only); lhs (left hand side only); rhs (right hand side only); box (all four sides); and border (all four sides).
headerClassfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Space-separated list of CSS style class(es) that will be applied to any header generated for this table.
langfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Code describing the language used in the generated markup for this component.
onclickfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Javascript code executed when a pointer button is clicked over this element.
ondblclickfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Javascript code executed when a pointer button is double clicked over this element.
onkeydownfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Javascript code executed when a key is pressed down over this element.
onkeypressfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Javascript code executed when a key is pressed and released over this element.
onkeyupfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Javascript code executed when a key is released over this element.
onmousedownfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Javascript code executed when a pointer button is pressed down over this element.
onmousemovefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Javascript code executed when a pointer button is moved within this element.
onmouseoutfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Javascript code executed when a pointer button is moved away from this element.
onmouseoverfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Javascript code executed when a pointer button is moved onto this element.
onmouseupfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Javascript code executed when a pointer button is released over this element.
rowClassesfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Comma-delimited list of CSS style classes that will be applied to the rows of this table. A space separated list of classes may also be specified for any individual row. Thes styles are applied, in turn, to each row in the table. For example, if the list has two elements, the first style class in the list is applied to the first row, the second to the second row, the first to the third row, the second to the fourth row, etc. In other words, we keep iterating through the list until we reach the end, and then we start at the beginning again.
rowStatePreservedfalsejakarta.el.ValueExpression
(must evaluate to boolean)

Boolean flag directing how the per-row component state of EditableValueHolder children should be handled across requests on the same view. If set to true, then state for EditableValueHolder components in each row will not be discarded before a new row is rendered. If not specified, the default value is false.

This attribute should be set only when the current dataTable component contains UIForm children which in turn contains EditableValueHolder children. This will only work reliably when the data model of the current dataTable component does not change across requests on the same view by e.g. sorting, adding or removing rows. The alternative is to use c:forEach instead.

rulesfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Code specifying which rules will appear between cells within this table. Valid values are: none (no rules, default value); groups (between row groups); rows (between rows only); cols (between columns only); and all (between all rows and columns).
stylefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
CSS style(s) to be applied when this component is rendered.
styleClassfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Space-separated list of CSS style class(es) to be applied when this element is rendered. This value must be passed through as the "class" attribute on generated markup.
summaryfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Summary of this table's purpose and structure, for user agents rendering to non-visual media such as speech and Braille.
titlefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Advisory title information about markup elements generated for this component.
widthfalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)
Width of the entire table, for visual user agents.
bindingfalsejakarta.el.ValueExpression
(must evaluate to jakarta.faces.component.UIComponent)
The ValueExpression linking this component to a property in a backing bean
rolefalsejakarta.el.ValueExpression
(must evaluate to java.lang.String)

Per the WAI-ARIA spec and its relationship to HTML5 (Section title ARIA Role Attriubute), every HTML element may have a "role" attribute whose value must be passed through unmodified on the element on which it is declared in the final rendered markup. The attribute, if specified, must have a value that is a string literal that is, or an EL Expression that evaluates to, a set of space-separated tokens representing the various WAI-ARIA roles that the element belongs to.

It is the page author's responsibility to ensure that the user agent is capable of correctly interpreting the value of this attribute.