NetUI Tag Library Documentation (Version 1.0.1)

netui-data
netui-data:dataGrid Tag

This tag is the containing tag for all tags and markup used to render a data grid.

Syntax

<netui-data:dataGrid
    [border="string_dir"]
    [cellpadding="string_cellpadding"]
    [cellspacing="string_cellspacing"]
    [dataGridConfig="string_dataGridConfig"]
    dataSource="string_dataSource"
    [dir="string_dir"]
    [frame="string_frame"]
    [lang="string_lang"]
    name="string_name"
    [onClick="string_onClick"]
    [onDblClick="string_onDblClick"]
    [onKeyDown="string_onKeyDown"]
    [onKeyPress="string_onKeyPress"]
    [onKeyUp="string_onKeyUp"]
    [onMouseDown="string_onMouseDown"]
    [onMouseMove="string_onMouseMove"]
    [onMouseOut="string_onMouseOut"]
    [onMouseOver="string_onMouseOver"]
    [onMouseUp="string_onMouseUp"]
    [renderRowGroups="boolean_renderRowGroups"]
    [resourceBundlePath="string_resourceBundlePath"]
    [rules="string_rules"]
    [style="string_style"]
    [styleClass="string_style_class"]
    [styleClassPolicy="string_stylePolicy"]
    [styleClassPrefix="string_styleClassPrefix"]
    [summary="string_summary"]
    [tagId="string_tagId"]
    [title="string_title"]
    [width="string_width"] >
    ... JSP content ...
</netui-data:dataGrid>

Description

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, a data grid can also configure and render a pager using the <netui-data:configurePager> and <netui-data:renderPager> tags respectively.

Inside of the <netui-data:header> and <netui-data:rows> rendering regions, the data grid renders HTML table cells. The data grid tag set provides a set of tags that can be used render these cells with varying content including:

The <netui-data:templateCell> tag can be used as a container for arbitrary content that may be included in a cell's contents. The <netui-data:footer> tag's content can also use these tags.

When the data grid renders its data set, the container JSP EL implicit object is exposed in the JSP's javax.servlet.jsp.JspContext and can be referenced using the ${contaimer} JSP EL expression. The current item of data from the data set can be referenced using the ${container.item} expression. If the item had a name property, it could be referenced as ${container.item.name}. By default, the data grid renders a paged data set which will only display a portion of the complete data set. The default page size is org.apache.beehive.netui.databinding.datagrid.api.pager.PagerModel and can be changed by setting the <netui-data:configurePager> attribute.

In addition to rendering a data grid, this tag set cooperates with a set of state management services exposed via the org.apache.beehive.netui.databinding.datagrid.api.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 org.apache.beehive.netui.databinding.datagrid.api.DataGridStateFactory to obtain a org.apache.beehive.netui.databinding.datagrid.api.pager.PagerModel which can be used to determine the current org.apache.beehive.netui.databinding.datagrid.api.pager.PagerModel. 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 org.apache.beehive.netui.databinding.datagrid.api.DataGridConfig and is obtained via the org.apache.beehive.netui.databinding.datagrid.api.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:

     <netui-data:dataGrid dataSource="pageScope.zooAnimals">
         <netui-data:configurePager disableDefaultPager="true" pageAction="page" pagerFormat="firstPreviousNextLast"/>
         <netui-data:caption>
             <netui-data:renderPager/>
         <netui-data:caption>
         <netui-data:header>
             <netui-data:heaederCell value="Animal" sortExpression="animal"/>
             <netui-data:heaederCell value="Quantity" sortExpression="quantity"/>
             <netui-data:heaederCell value="Details"/>
         </netui-data:header>
         <netui-data:rows>
             <netui-data:spanCell value="${container.item.animalName}"/>
             <netui-data:spanCell value="${container.item.quantity}"/>
             <netui-data:anchorCell action="details" value="Details">
                 <netui:parameter name="animalId" value="${container.item.animalId}"/>
             </netui-data:anchorCell>
         </netui-data:rows>
     </netui-data:dataGrid>
 
This data grid would render an HTML table with a <caption> that contains a first / previous // next / last formated pager. The data grid would display a page with ten data rows and three columns. The header contains the column titles with clickable sorting links for sorting by the animal name and quantity. The body of the data grid contains three cells per row containing two HTML <span> tags and an HTML anchor which will navigate to a Page Flow action caclled details when clicked.

Attributes
border
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The border attribute for the HTML table tag.
cellpadding
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The cellpadding for the HTML table tag.
cellspacing
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The cellspacing for the HTML table tag.
dataGridConfig
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

Set the org.apache.beehive.netui.databinding.datagrid.api.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  |   Type: String  |   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  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The dir for the HTML table tag.
frame
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The frame attribute for the HTML table tag.
lang
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The lang for the HTML table tag.
name
Required: Yes  |   Type: String  |   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  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The onClick JavaScript event for the HTML table tag.
onDblClick
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The onDblClick JavaScript event for the HTML tag.
onKeyDown
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The onKeyDown JavaScript event for the HTML tag.
onKeyPress
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The onKeyPress JavaScript event for the HTML tag.
onKeyUp
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The onKeyUp JavaScript event for the HTML tag.
onMouseDown
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The onMouseDown JavaScript event for the HTML tag.
onMouseMove
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The onMouseMove JavaScript event for the HTML tag.
onMouseOut
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The onMouseOut JavaScript event for the HTML tag.
onMouseOver
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The onMouseOver JavaScript event for the HTML table tag..
onMouseUp
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The onMouseUp JavaScript event for the HTML tag.
renderRowGroups
Required: No  |   Type: String  |   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  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

Set the resource bundle path used when getting messages from a org.apache.beehive.netui.databinding.datagrid.api.DataGridResourceProvider during data grid rendering. The resource bundle provided here will entirely override messages obtained from the org.apache.beehive.netui.databinding.datagrid.api.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  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The rules attribute for the HTML table tag.
style
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The style for the HTML table tag.
styleClass
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The style class for the HTML table tag.
styleClassPolicy
Required: No  |   Type: String  |   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  |   Type: String  |   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  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The summary for the HTML table tag.
tagId
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The tagId for the HTML table tag.
title
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The title for the HTML table tag.
width
Required: No  |   Type: String  |   Supports runtime evaluation / JSP Expression Language: Yes

The width for the HTML table tag.


Tag Information
Tag Classorg.apache.beehive.netui.tags.databinding.datagrid.DataGrid
TagExtraInfo ClassNone
Body Contentscriptless
Display NameNone