Documentation: Widget Tables

Description

Provide the ability to easily add sort to a table. This particular widget demonstrates the ability to do Table Sort on the browser side using the data already supplied. A further demonstration and widget of sorting, searching and scrolling through larger tables is also possible. The larger version even includes the ability to do legacy support (i.e. get the content of the table sorted and scrolled with no AJAX/JS).

TODO Add better table demonstrations.

Links

  • [[Widget_Tables_Implementation?]] - for XSL, JS, and other Implementation details.
  • Bugs
  • Source

Example

	<table class="data">
		<thead>
			<tr>
				<th class="sort">First</th>
				<th class="sort">Second</th>
				<th class="sort">Third</th>
				<th>Fourth</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>A</td>
				<td>3</td>
				<td z:key="1">Monday</td>
				<td>Some text</td>
			</tr>
			<tr>
				<td>C</td>
				<td>5</td>
				<td z:key="2">Tuesday</td>
				<td>Some text</td>
			</tr>
			<tr>
				<td>B</td>
				<td>4</td>
				<td z:key="3">Wednesday</td>
				<td>Some text</td>
			</tr>
			<tr>
				<td>D</td>
				<td>2</td>
				<td z:key="4">Thursday</td>
				<td>Some text</td>
			</tr>

		</tbody>
       </table>
First Second Third Fourth
A 3 Monday Some text
C 5 Tuesday Some text
B 4 Wednesday Some text
D 2 Thursday Some text