Class Index | File Index

Classes


Namespace chip.types

The namespace for the CHIP API's types contract, which allows the CHIP to offer multiple visualizations from which the page builder can choose.
Defined in: actions.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
<static>  
chip.types.attachTypeChange(fnHandler)
Attaches the given event handler to the change event which is fired whenever the page builder wants to change the current type of visualization.
<static>  
chip.types.getAvailableTypes()
Returns the list of available types of visualization.
Namespace Detail
chip.types
Since:
1.32.0
Method Detail
<static> chip.types.attachTypeChange(fnHandler)
Attaches the given event handler to the change event which is fired whenever the page builder wants to change the current type of visualization. The CHIP has to react accordingly and change the visualization after the handler is called. The event handler should return a jQuery.Deferred object's promise to inform the caller whether the visualization has been changed (or failed). In the latter case an error message should be provided. In case the type was changed before the handler was attached, the handler gets called immediately after registration. This also works when the handler is overwritten by a different one. Use Function.prototype.bind() to determine the event handler's this or some of its arguments. Note: Without such an event handler, it will not be possible to change the visualization of the CHIP during runtime.
Parameters:
{function (string)} fnHandler
the handler for changing the visualization type of the CHIP. The first argument will be the set type. The function must return a jQuery.Deferred object's promise.
Since:
1.32.0
Throws:
Error if fnHandler is not a function or if fnHandler.
If fnHandler is directly called (because a type was cached) and throws an error.
See:
contract.types.setType
chip.types.getAvailableTypes

<static> {string[]} chip.types.getAvailableTypes()
Returns the list of available types of visualization. The types are always lower case.
Since:
1.32.0
Returns:
{string[]} the available tile types in lower case, e.g. ["tile", "link"]

©Copyright (c) 2009-2014 SAP SE, All Rights Reserved
Documentation generated by JsDoc Toolkit 2.4.0 on Tue Mar 14 2017 08:48:14 GMT-0000 (UTC)