Class: DataTable

RichFaces.ui. DataTable

new DataTable(id, options)

Backing object for rich:dataTable
Parameters:
Name Type Description
id
options
Source:

Extends

Members

name :string

Component name.
Type:
  • string
Inherited From:
Source:

Methods

attachToDom(source) → {DOMElement}

Attach component object to DOM element by component id, DOM element or jQuery object and returns the element Its required for the client side API calls and to clean up after ajax request or document unload by calling destroy method
Parameters:
Name Type Description
source string | DOMElement | jQuery component id, DOM element or DOM elements wrapped by jQuery
Inherited From:
Source:
Returns:
Type
DOMElement

clearFiltering()

Clear any filtering currently applied to the table
Source:

clearSorting()

Clear any sorting currently applied to the table
Source:

collapseAllSubTables()

Collapse all subtables in a dataTable
Source:

destroy()

Destroy method. Will be called before remove component from the page
Inherited From:
Source:

detach(source)

Detach component object from DOM element by component id, DOM element or jQuery object
Parameters:
Name Type Description
source string | DOMElement | jQuery component id, DOM element or DOM elements wrapped by jQuery
Inherited From:
Source:

expandAllSubTables()

Expand all subtables in a dataTable
Source:

filter(columnId, filterValue, isClearopt)

Filter a table column
Parameters:
Name Type Attributes Description
columnId string short column id
filterValue string value to filter by
isClear boolean <optional>
whether or not to clear the previous filter, default - false
Source:

getEventElement() → {string}

Method returns element's id for event handlers binding. Event API calls this method when binding by component object as selector was used.
Inherited From:
Source:
Returns:
Type
string

invokeEvent(eventType, element, event, data) → {boolean}

Invokes event on on the DOM element
Parameters:
Name Type Description
eventType string event type, e.g. "click"
element DOMElement DOM element object
event Event jQuery Event
data Object additional data used for event handler
Inherited From:
Source:
Returns:
true if an event is successfully invoked
Type
boolean

sort(columnId, directionopt, isClearopt)

Sort a table column
Parameters:
Name Type Attributes Description
columnId string short column id
direction string <optional>
sort direction ("ascending", "descending", "unsorted") if not provided and the column is sorted the direction switches, if it's unsorted it will be sorted in ascending sirection
isClear boolean <optional>
whether or not to clear the previous sort, default - false
Source:

switchSubTable(id)

Switch the state of a subtable
Parameters:
Name Type Description
id string full subtable id
Source:

toString() → {string}

Method for converting object to string
Inherited From:
Source:
Returns:
Type
string