Class Index | File Index

Classes


Class RichFaces.BaseComponent

Base class for all components. All RichFaces components should use this class as base or another RichFaces class which based on it.


		//Inheritance example:
		(function ($, richfaces, params) {
		
			// Constructor definition
			richfaces.MyComponent = function(componentId, [options]) {
				// call constructor of parent class
				$super.constructor.call(this, componentId, [options]);
			};
			
			// define private method
			var myPrivateMethod = function () {
			}
			
			// create container for protected method's links
			// in this example we link private method as protected
			var $p ={myProtectedMethod: myPrivateMethod};
			
			// Extend component class and add protected methods from parent class to our container
			$p = richfaces.BaseComponent.extend(richfaces.BaseComponent, richfaces.MyComponent, $p);
			
			// define super class link
			var $super = richfaces.MyComponent.$super;
		
			// Add new properties and methods
			$.extend(richfaces.MyComponent.prototype, (function (params) {
				return {
		 				name:"MyComponent", 
						f:function (){alert("hello");
					}
				};
			})(params));
		})(jQuery, RichFaces);
		

Defined in: richfaces-base-component.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
Component name.
Method Summary
Method Attributes Method Name and Description
 
Destroy method.
<static>  
RichFaces.BaseComponent.extend()
Method extends child class prototype with parent prototype and return the object with parent's protected methods
 
Method returns element's id for event handlers binding.
 
Method for converting object to string
Class Detail
RichFaces.BaseComponent(componentId)
Parameters:
{String} componentId
- component id
Field Detail
{String} name
Component name.
Method Detail
destroy()
Destroy method. Will be called before remove component from the page

<static> {object} RichFaces.BaseComponent.extend()
Method extends child class prototype with parent prototype and return the object with parent's protected methods
Returns:
{object}

{String} getEventElement()
Method returns element's id for event handlers binding. Event API calls this method when binding by component object as selector was used.
Returns:
{String}

{String} toString()
Method for converting object to string
Returns:
{String}

Documentation generated by JsDoc Toolkit 2.0.0 on Thu Jun 03 2010 17:42:35 GMT-0400 (EDT)