Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: inclusion of taglib tag in example

...

The SortableHeader tag renders table headers that allow a user to see the current sort order and to resort the data.

Examples

Code Block
<!-- taglib declaration -->
<%@ taglib prefix="tt" uri="/tabletags"%>

<!-- A simple example that uses sortable headers. -->
...
<thead>
  <tr>
    <th><tt:sortableHeader action="Table" name="sortColumnKey"
      title="Column 1" sortKey="col1" sortOrder="sortOrder"
      sortable="true" /></th>
    <th><tt:sortableHeader action="Table" name="sortColumnKey"
      title="Column 2" sortKey="col2" sortOrder="sortOrder"
      sortable="true" /></th>
    <th><tt:sortableHeader action="Table" name="sortColumnKey"
      title="Column 3" sortKey="col3" sortOrder="sortOrder"
      sortable="true" /></th>
    <th><tt:sortableHeader action="Table" name="sortColumnKey"
      title="Column 4" sortKey="col4" sortOrder="sortOrder"
      sortable="true" /></th>
    <th><tt:sortableHeader action="Table" name="sortColumnKey"
      title="Column 5" sortKey="col5" sortOrder="sortOrder"
      sortable="true" /></th>
  </tr>
</thead>
...

...