Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

burst.webui.widgets.SortTable Class Reference

Inheritance diagram for burst.webui.widgets.SortTable:

burst.webui.widgets.AbstractWidget List of all members.

Detailed Description

Subclass of AbstractWidget providing sort behavior for an HTML table.

DOM implementation

We do not create a new DOM hierarchy for this widget, but instead just use the "table" Node provided in the constructor. That means all styling is preserved.

DOM operations

The only DOM create/remove operations we do are:

It is required that there be a single head row, with path table/thead/tr. It must contain either th or td children, from which SortHead child widgets are created. If you change the structure of the thead or below by your own DOM calls after creating this widget you must call the initHeads() method.

The data must be in tbody/tr rows. You may add rows at any time.

Inline constructor

You may associate inline constructor properties either with the table Node or with any th/td in a thead. The available properties in each context are overlapping, since you can provide defaults at the table level for most head properties.

Todo:
Set (add) an additional class whenever a sort head is clicked, so that css can be used to visually show sort state.


Public Member Functions

 SortTable (Node dom_node, Boolean parse_properties)
 Widget constructor.


Public Attributes

Boolean sortOnLoad
 Instance property: Whether to sort the table upon load.

Boolean sortOnLoadAscending
 Instance property: If false, reverses the sense of the onLoad sort.

Boolean sortEnabled
 Instance property: Whether user-directed sorting is enabled (after load).

ImageUrl upImgSrc
 Instance property: The url to the image for the up arrow (currently ascending).

ImageUrl downImgSrc
 Instance property: The url to the image for the down arrow (currently descending).


Member Data Documentation

ImageUrl burst.webui.widgets.SortTable.downImgSrc
 

Instance property: The url to the image for the down arrow (currently descending).

Default value is 'sortedDown.png'

Boolean burst.webui.widgets.SortTable.sortEnabled
 

Instance property: Whether user-directed sorting is enabled (after load).

Default value is true

Boolean burst.webui.widgets.SortTable.sortOnLoad
 

Instance property: Whether to sort the table upon load.

Default value is false

Boolean burst.webui.widgets.SortTable.sortOnLoadAscending
 

Instance property: If false, reverses the sense of the onLoad sort.

Default value is true

ImageUrl burst.webui.widgets.SortTable.upImgSrc
 

Instance property: The url to the image for the up arrow (currently ascending).

Default value is 'sortedUp.png'


The documentation for this class was generated from the following file:
Generated on Tue Nov 30 04:03:09 2004 for BurstProject by doxygen 1.3.4