JSP TagLib that generates HTML DataGrids.
This JSP tag library can be used to create web tables with data, calculate aggregations, order the table values, do paging.
This custom tag library requires a servlet container that supports the JavaServer Pages Specification, version 1.2 or higher. It also requires the Jakarta JSTL Tag Libraries 1.0 and the Common Math Library 1.0.
Follow these steps to configure your web application with this tag library:
<taglib> <taglib-uri>http://jakarta.apache.org/taglibs/datagrid-1.0</taglib-uri> <taglib-location></taglib-location> </taglib>
To use the tags from this library in your JSP pages, add the following directive at the top of each page:
<%@ taglib uri="http://jakarta.apache.org/taglibs/datagrid-1.0" prefix="ui" %>
where "ui" is the tag name prefix you wish to use for tags from this library. You can change this value to any prefix you like.
| dataGrid | The DataGrid tag create web tables with data that can be ordered, paged and apply aggregate functions. |
| dataGrid | Availability: 1.0 | ||||
|
Tag to create datagrids |
|||||
| Tag Body | tagdependent | ||||
| Restrictions |
None |
||||
| Attributes | Name | Required | Runtime Expression Evaluation | Availability | |
| items | Yes | No | 1.0 | ||
|
Attribute to set the collection that stores the values that will be used to render the datagrid. |
|||||
| scroll | No | Yes | |||
|
Attribute to set a vertical scroll bar. If the value is true a vertical scroll bar will be rendered with the datagrid. |
|||||
| rules | No | Yes | |||
|
Attribute to set the rules attribute of the datagrid table. |
|||||
| frame | No | Yes | |||
|
Attribute to set the frame attribute of the datagrid table. |
|||||
| style | No | Yes | |||
|
Attribute to set the CSS style for the datagrid. |
|||||
| styleClass | No | Yes | |||
|
Attribute to set the CSS class for the datagrid. |
|||||
| var | Yes | No | |||
|
Attribute to set the name of the JSTL variable used to access each the collection value. |
|||||
| height | No | Yes | |||
|
Attribute to set the height of the datagrid in pixels or percentages. This value will apply if scrolling is enabled. |
|||||
| width | No | Yes | |||
|
Attribute to set the width of the datagrid in pixels or percentages. If a percentage is used then scrolling is disabled. |
|||||
| cellPadding | No | Yes | |||
|
Attribute to set the cell padding of the datagrid. |
|||||
| cellSpacing | No | Yes | |||
|
Attribute to set the cell spacing of the datagrid. |
|||||
| name | Yes | Yes | |||
|
Attribute to set the name of the datagrid. |
|||||
| requestPath | No | Yes | |||
|
Attribute to set the request path used to construct the URL for ordering and paging functionality in the datagrid. |
|||||
| Variables | None | ||||
| Examples | Example of datagrid tag library. | ||||
|
<%
request.setAttribute ("employees", employees);
%>
|
|||||
See the example application datagrid-examples.war for examples of the usage of the tags from this custom tag library.
Java programmers can view the java class documentation for this tag library as javadocs.
Review the complete revision history of this tag library.