Class: CollapsiblePanel

RichFaces.ui. CollapsiblePanel

new CollapsiblePanel(componentId, options)

Backing object for rich:collapsiblePanel
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

collapse()

Collapse the panel
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:

expand()

Expand the panel
Source:

firstItem() → {string}

Get the name of the first item
Inherited From:
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
Inherited From:
Source:
Returns:
all defined panel items
Type
Array.<TogglePanelItem>

getItemsNames() → {Array.<string>}

Get names of items
Inherited From:
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)
Inherited From:
Source:
Returns:
null if item not found
Type
TogglePanelItem

getSelectedItem() → {string}

Inherited From:
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

isExpanded() → {boolean}

Returns true if the panel is expanded
Source:
Returns:
true if the panel is expanded
Type
boolean

lastItem() → {string}

Get the name of the last item
Inherited From:
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
Inherited From:
Source:
Returns:
name of next panel item
Type
string

switchPanel(toopt)

Switch the state of the panel
Parameters:
Name Type Attributes Description
to string <optional>
state to switch to: "true" (expanded), "false" (collapsed), "@next"
Source:

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
Inherited From:
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