new CMS()

Description

The CMS component lets you work with Site Management Tools. Use this component to register a new custom content type at application startup. See CustomContentTypeBaseView. Get an instance of this component by calling container.getComponent("CMS").

Members


componentName :String

Description

A unique name that identifies the component. Use the component name when getting a component, for example, application.getComponent(componentName).

Details
String

application :ComponentContainer

Description

The name which identify this kind of component. This name is used both for registering a new component and
getting a component implementation with ComponentContainer

Details

Methods


registerCustomContentType( cct )

Description

Registers a new custom content type (CCT) in the application.

Parameters
Name Type Description
cct RegisterCustomContentType

An object with two required properties, id and view, to register the custom content type.

         var cct = container.getComponent('CMS');
			cct.registerCustomContentType({
			 id: 'cct_acmeinc_slideshow',
			 view: CCTSlideshowView
			});
			

cancelableOn( event_name, handler ) → {void}

Description

Attaches an event handler to an event.

Parameters
Name Type Description
event_name String

The name of the event to which the event handler will be attached.

handler function

The event handler method that will be invoked when event_name is triggered. This function can receive optionally one parameter representing the action parameter. Besides optionally can return a Deferred to details the execution of the trigger's callback. If the returned Deferred is rejected the trigger's callback wont be called

Returns
Details

cancelableOff( event_name, handler ) → {void}

Description

Detaches an event handler from an event.

Parameters
Name Type Description
event_name String

The name of the event from which to detach the event handler. This argument is required.

handler function

The event handler that will be removed from the list of handlers attached to the event. This argument is required.

Returns
Details

extend( componentDefinition ) → {BaseComponent}

Description

Extends the current component and creates a child component.

Parameters
Name Type Description
componentDefinition Object

An object with the appropriate properties and methods to create the component.

Returns
Details

cancelableDisable( event_name ) → {void}

Description

Disables all the event handlers attached to an event.

Parameters
Name Type Description
event_name String

The name of the event.

Returns
Details

on( event_name, handler ) → {void}

Description

Attaches an event handler to an event name. Alias for CancelableEvents#cancelableOn.

Parameters
Name Type Description
event_name String

The name of the event to attach to

handler function
Returns
Details

cancelableEnable( event_name ) → {Void}

Description

Re-enables all the event handlers attached to an event.

Parameters
Name Type Description
event_name String

The name of the event.

Returns
Details

off( event_name, handler ) → {void}

Description

Detaches an event handler from an event name. Alias for CancelableEvents#cancelableOff.

Parameters
Name Type Description
event_name String

The name of the event from which to detach the event handler.

handler function
Returns
Details

cancelableTrigger( event_name, ...args ) → {Deferred}

Description

Triggers an event with a set of arguments. If an event handler is rejected, the event handler callbacks will not be executed.

Parameters
Name Type Attributes Description
event_name String

The name of the event to trigger.

args params <repeatable>

One or more arguments that will be broadcast to all event handlers attached to the event.

Returns

Returns a Deferred object. Because event handlers are sometimes asynchronous, any callbacks in the event handlers will also be asynchronous.

Details

cancelableTriggerUnsafe( event_name, ...args ) → {Deferred}

Description

Triggers an event with a set of unsanitized arguments. If an event handler is rejected, the event handler callbacks will not be executed.

Parameters
Name Type Attributes Description
event_name String

The name of the event to trigger.

args params <repeatable>

One or more arguments that will be broadcast to all event handlers attached to the event.

Returns

Returns a Deferred object. Because event handlers are sometimes asynchronous, any callbacks in the event handlers will also be asynchronous.