Class: TogglePanel

RichFaces.ui. TogglePanel

new TogglePanel(componentId, options)

Backing object for rich:togglePanel
Parameters:
Name Type Description
componentId string component id
options Object params
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

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:

firstItem() → {string}

Get the name of the first item
Source:
Returns:
name of first panel item
Type
string

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

getItems() → {Array.<TogglePanelItem>}

Get all items
Source:
Returns:
all defined panel items
Type
Array.<TogglePanelItem>

getItemsNames() → {Array.<string>}

Get names of items
Source:
Returns:
names of all defined items
Type
Array.<string>

getNextItem(name) → {TogglePanelItem}

Get the next item after given name
Parameters:
Name Type Description
name string name of TogglePanelItem or meta name (@first | @prev | @next | @last)
Source:
Returns:
null if item not found
Type
TogglePanelItem

getSelectedItem() → {string}

Source:
Returns:
name of current selected panel item
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

lastItem() → {string}

Get the name of the last item
Source:
Returns:
name of last panel item
Type
string

nextItem(iteName) → {string}

Get the name of the next item
Parameters:
Name Type Description
iteName string name of the item for which the next is computed
Source:
Returns:
name of next panel item
Type
string

switchToItem(name) → {Boolean}

Switch to a new item
Parameters:
Name Type Description
name string panel item name to switch we can use meta names @first, @prev, @next and @last
Source:
Returns:
- false if something wrong and true if all is ok
Type
Boolean

toString() → {string}

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