This tag is the containing tag for all tags and markup used to render a data grid.
This tag is the containing tag for all tags and markup used to render a data grid. In its simplest form, a data
grid is an HTML table containing an HTML table row for every item in a data set. The data grid also provides
functionality for rendering the following major regions:
In addition to rendering a data grid, this tag set cooperates with a set of state management services exposed
via the
DataGridStateFactory
. These services
help to manage state related to paging, sorting, and filtering. For example, the first row displayed
in the grid's current page and the sorts for a particular column of data are can be read / written using these
state objects. The data grid will use various state information from these classes at reunder time. For example,
when rendering a paged data set, the data grid will use the
DataGridStateFactory
to obtain a
PagerModel
which can be used to determine the current
--> PagerModel.getRow()
. The grid will then
use this row value to advance the grid to the appropriate page to display.
By default, the data grid uses a configuration JavaBean which provides instances of state containers and services
that are used to maintain state and render grid markup. This config object is a subclass of
DataGridConfig
and is obtained via the
DataGridConfigFactory
. The default implementation is
.
. Page authors
may provide their own implementations of this object and set an instance via
<netui-data:dataGrid>
. This cax be
used to change default behaviors, change the appearance of the pager, and change the messages displayed
during rendering among other things.
A simple, sortable, and pageable data grid that uses a first / previous // next / last pager might be
written as:
Attributes |
border |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The border attribute for the HTML table tag. |
cellpadding |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The cellpadding for the HTML table tag. |
cellspacing |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The cellspacing for the HTML table tag. |
dataGridConfig |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
Set the
DataGridConfig
instance that this tag will use to create state containers and other
data grid objects used during rendering. Custom implementations of this class can be provided
that will override the defaults set in the
.
.
|
dataSource |
Required: Yes | Supports
runtime evaluation / JSP Expression Language: No |
|
Set the data source that references a data set to be rendered by the data grid. The data source should be
a NetUI EL expression and generally looks like a JSP EL expression without the '${' and '}' characters.
For example, to reference an array of Employee objects exposed via a NetUI page input, the expression
might look like:
<netui-data:dataGrid dataSource="pageInput.employeeArray" name="employeeGrid">
This expression will be evaluated the data grid in order to obtain a reference to the data set.
|
dir |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The dir for the HTML table tag. |
frame |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The frame attribute for the HTML table tag. |
lang |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The lang for the HTML table tag. |
name |
Required: Yes | Supports
runtime evaluation / JSP Expression Language: No |
|
Set the name of this data grid. The name should be a simple String that is used to uniquely identify a data
grid inside of a JSP. This value is also used to namespace state information in the URL that is scoped
to a data grid. Within a given scope in a page, the page author is responsible for ensuring that this
name is unique. |
onClick |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The onClick JavaScript event for the HTML table tag. |
onDblClick |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The onDblClick JavaScript event for the HTML tag. |
onKeyDown |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The onKeyDown JavaScript event for the HTML tag. |
onKeyPress |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The onKeyPress JavaScript event for the HTML tag. |
onKeyUp |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The onKeyUp JavaScript event for the HTML tag. |
onMouseDown |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The onMouseDown JavaScript event for the HTML tag. |
onMouseMove |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The onMouseMove JavaScript event for the HTML tag. |
onMouseOut |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The onMouseOut JavaScript event for the HTML tag. |
onMouseOver |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The onMouseOver JavaScript event for the HTML table tag.. |
onMouseUp |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The onMouseUp JavaScript event for the HTML tag. |
renderRowGroups |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
Sets a boolean that enables / disables rendering of HTML table row groups in the data grid. When
row group rendering is enabled, the data grid tags will produce the thead, tbody, and tfoot HTML tags
via the
<netui-data:header>
,
<netui-data:rows>
, and
<netui-data:footer>
tags respectively. In addition, as per the
HTML specification, the data
grid will reorder the output of the row groups to in order to produce valid HTML. When row group rendering
is enabled and a page is using JavaScript, the data grid must be nested inside of a NetUI
<netui:scriptContainer>
in order for JavaScript rendering
to be ordered correctly. Legacy JavaScript script mode is not supported by the data grid.
|
resourceBundlePath |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
Set the resource bundle path used when getting messages from a
DataGridResourceProvider
during
data grid rendering. The resource bundle provided here will entirely override messages obtained from
the
DataGridResourceProvider
and must include all message keys that are used for rendering.
In order to replace individual messages, use the behavior available from the
<netui-data:dataGrid>
method.
|
rules |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The rules attribute for the HTML table tag. |
style |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The style for the HTML table tag. |
styleClass |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The style class for the HTML table tag. |
styleClassPolicy |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
Set the name of a CSS policy to use when rendering HTML elements in a data grid. The data grid supports the
default style policy names defined here
.
.
|
styleClassPrefix |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
Set the style class prefix used to namespace style class names rendered as attributes on HTML tags
generated by the data grid. For example, when using the default style policy without setting this
attribute, the style rendered for the generated HTML table tag will be:
<table class="datagrid">
With the style class prefix of foo , the rendered HTML style class will be:
<table class="foo">
|
summary |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The summary for the HTML table tag. |
tagId |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The tagId for the HTML table tag. |
title |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The title for the HTML table tag. |
width |
Required: No | Supports
runtime evaluation / JSP Expression Language: Yes |
|
The width for the HTML table tag. |