Class Index | File Index

## Classes

- _global_
- jQuery
- RichFaces
- RichFaces.ajaxContainer
- RichFaces.BaseComponent
- RichFaces.Event
- RichFaces.queue

# Namespace RichFaces.Event

Defined in: richfaces-event.js.

Namespace Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| RichFaces.Event RichFaces Event API container

Method Summary
Method Attributes | Method Name and Description
--- | ---
<static> | RichFaces.Event.bind(selector, eventType, fn, data) Attach a handler to an event for the elements.
<static> | RichFaces.Event.bindById(id, eventType, fn, data) Attach a handler to an event for the element by element id.
<static> | RichFaces.Event.callHandlerById(id, eventType, data) The same as the callHandler method, but selects element by id.
<static> | RichFaces.Event.createNamespace(componentName, id, prefix) Create an event namespace for the components.
<static> | RichFaces.Event.fireById(id, eventType, data) The same as the fire method, but selects element by id.
<static> | RichFaces.Event.ready(fn) Attach an event handler to execute when the DOM is fully loaded.
<static> | RichFaces.Event.unbindById(id, eventType, fn) Remove a previously-attached event handler from the elements by element id.

Namespace Detail
RichFaces.Event
RichFaces Event API container
Method Detail
<static> {function} RichFaces.Event.bind(selector, eventType, fn, data)
Attach a handler to an event for the elements.

Parameters:
{string|DOMElement|jQuery} selector
  - jQuery elements selector
{string} eventType
  - one or more JavaScript event types, such as "click" or "submit," or custom event names
{function} fn
  - event handler
{Object} data Optional
  - component or object with additional data It is a context for an event handler

Returns:
  {function} function that binded to the element's event

<static> {function} RichFaces.Event.bindById(id, eventType, fn, data)
Attach a handler to an event for the element by element id.

Parameters:
{string} id
  - DOM element id
{string} eventType
  - one or more JavaScript event types, such as "click" or "submit," or custom event names
{function} fn
  - event handler
{Object} data Optional
  - component or object with additional data It is a context for an event handler

Returns:
  {function} function that binded to the element's event

<static> RichFaces.Event.callHandlerById(id, eventType, data)
The same as the callHandler method, but selects element by id.

Parameters:
{string} id
  - DOM element id
{string} eventType
  - event type
{Object} data Optional
  - a object of additional parameters to pass to the event handler

Returns:
  value that was returned by the handler

<static> {string} RichFaces.Event.createNamespace(componentName, id, prefix)
Create an event namespace for the components.

Parameters:
{string} componentName Optional
  - component name
{string} id Optional
  - element id
{string} prefix Optional, Default: RichFaces.Event.RICH_NAMESPACE
  - namespace prefix

Returns:
  {string} namespace string

<static> {jQuery} RichFaces.Event.fireById(id, eventType, data)
The same as the fire method, but selects element by id.

Parameters:
{string} id
  - DOM element id
{string} eventType
  - event type
{Object} data Optional
  - a object of additional parameters to pass to the event handler

Returns:
  {jQuery} element wrapped by jQuery

<static> {jQuery} RichFaces.Event.ready(fn)
Attach an event handler to execute when the DOM is fully loaded.

Parameters:
{function} fn
  - event handler

Returns:
  {jQuery} document element wrapped by jQuery

<static> {jQuery} RichFaces.Event.unbindById(id, eventType, fn)
Remove a previously-attached event handler from the elements by element id. The handler will be called only once when event happened.

Parameters:
{string} id
  - DOM element id
{string} eventType Optional
  - one or more JavaScript event types, such as "click" or "submit," or custom event names
{function} fn Optional
  - event handler

Returns:
  {jQuery} element wrapped by jQuery

Documentation generated by JsDoc Toolkit 2.0.0 on Thu Dec 01 2011 13:33:20 GMT+0100 (CET)