Display a set of records in a XHTML table, formatting each record in the list according to the column tags nested inside of this tag.
<table:table firstItemIndex="11" itemCount="18" lastItemIndex="15" pageCount="4" pageIndex="3" pagingBanner="both" requestUri="getUsers.do" styleClass="table-results" summary="users" var="${users}"> <table:column id="id" property="id" styleClass="centeralign" title="Id" width="10%"/> <table:column id="username" property="username" sortable="true" title="Username" width="30%"/> <table:column id="fullName" sortable="true" sorted="true" title="Full Name" width="30%"> ${row.lastName}${', '}${row.firstName} </table:column> <table:column id="role" property="role" sortable="true" title="Role" width="30%"/> </table:table>
| Name | Description | Type | Required |
|---|---|---|---|
| firstItemIndex |
Index of the first item to display (starting from 1). The value of this attribute is displayed in the pagination banner. | Integer |
Only if the value of the attribute
pagingBanner
is not "none".
|
| itemCount |
Total number of items to display. The value of this attribute is displayed in the pagination banner. | Integer |
Only if the value of the attribute
pagingBanner
is not "none".
|
| lastItemIndex |
Index of the last item to display (starting from 1). The value of this attribute is displayed in the pagination banner. | Integer |
Only if the value of the attribute
pagingBanner
is not "none".
|
| pageCount |
Total number of pages in the set of records. The value of this attribute is displayed in the pagination banner. | Integer |
Only if the value of the attribute
pagingBanner
is not "none".
|
| pageIndex |
Index of the current page. The value of this attribute is displayed in the pagination banner. | Integer |
Only if the value of the attribute
pagingBanner
is not "none".
|
| pagingBanner |
Indicates if the banner containing the page navigation should be displayed
or not. Possible values:
| String | No |
| requestUri | Name of the URI for the rendered hyperlinks. | String | Yes |
| styleClass | CSS class to apply to the table. | String | Yes |
| summary | Summary of the XHTML table. | String | No |
| var | Name of the attribute (in any scope) that contains the array or collection to display. | An array or a java.util.Collection | Yes |
Represents a column in a table. MUST be nested inside of a table tag.
The body of this tag can contain JSP.
| Name | Description | Type | Required |
|---|---|---|---|
| ascendingOrder |
Sort order of the column.
Possible values:
|
String
|
No. Used only if if the value of the attribute
sorted
is "true".
|
| headerClass |
CSS style class for the th elements
of the generated table.
|
String
| No |
| id | Unique id of this column. |
String
| Yes |
| property | Name of the property of the bean contained in the array or collection specified in the attribute var of the table tag. |
String
| No |
| sortable |
Indicates if the records can be sorted by
this column.
Possible values:
|
String
| No |
| sorted |
Indicates if the records are sorted by
this column.
Possible values:
|
String
| No |
| styleClass | CSS class to apply to the column. | String | No |
| title |
Title of the column. This value is used as
the text of the th elements
of the generated table.
| String | No |
| width | Width of the column. Can be an absolute value or a percentage. | String | No |