<s:data_table>

>p>Used for data tables and includes optional search bar, pagination, and footer button group. Some pertinent notes regarding data tables are:

The `<s:data_table>` tag tag supports the following attributes:

Attribute Required Description id No Unique id of the table element. Defaults to "tblMain". has_search No Can be either 0 or 1, and if set to 1, a search box will be placed at the top right corner of the table. Defaults to 0. search_href No If `has_search` is 1, this is where the search button links to, generally a Javascript call. search_label No If `has_search` is 1, the place holder of the search box. Defaults to "Search". total_rows No Used for pagination, and the total number of rows available in the full result set. rows_per_page No Used for pagination, and the number of rows displayed per page. Defaults to 25. current_page No Used for pagination, and the current page being displayed. Defaults to 1. max_items No Used for pagination, and is the maximum number of page items to display within the pagination links, not including the prev / next items. Defaults to 10. pgn_href No Used for pagination, and is the `href` of each page item link. The text "page=X" will be appended to this href, where X is the page number of the item. sort_href No Used within sorting array links within header columns (see below), and is the location those links will point to, generally a Javascript call.

Example HTML


<s:data_table has_search="1" total_rows="384" current_page="3" rows_per_page="25"> <s:button_group> <s:button href="#" label="Delete Checked Rows"> </s:button_group> <thead><tr> <th has_sort="1">Date</th> <th>Full Name</th> <th has_sort="1">Amount</th> <th>Manage</th> </tr></thead> <tbody><tr> <td>Mar 21, 2021 at 14:22</td> <td>John Smith</td> <td>$29.95</td> <td align="center"><s:button href="#" label="Manage"></td> </tr><tr> <td>Mar 24, 2021 at 09:53</td> <td>Mike Jacobs</td> <td>$53.95</td> <td align="center"><s:button href="#" label="Manage"></td> </tr> </tbody></s:data_table>

Example Output:

Date Full Name Amount Manage Mar 21, 2021 at 14:22 John Smith $29.95 Mar 24, 2021 at 09:53 Mike Jacobs $53.95