API - ViewEmber

Extends ViewJson

The ViewEmber object makes sure an EmberJS response object is returned.

Methods

The _viewSingle method presents a list of EmberJS JSON Object together with the provided states.

Parameters
Name Type Description
data Object The data to convert to a string.

Returns Object: The JSON string containing a list objects.

The _viewSingle method presents a single EmberJS JSON Object together with the provided states.

Parameters
Name Type Description
data Object The data to convert to a string.

Returns Object: The JSON string containing a single object.

This function will be available for every object, this will clone the current object.

Returns Object: An exact copy of the current object

This is the overridden display method which will format our data and return it to the controller when done.

Returns Promise: The promise containing the json as a string.

This is a private function to allow for config extending This method takes two parameters the first is the original config and the second will be appeneded to this one.

Parameters
Name Type Description
target Object The config object.
source Object The object to extend the config object.

Return the command chain to run behaviors.

Returns CommandChain: CommandChain object.

Use this function to acquire a variable from config.js

Parameters
Name Type Description
key String Key to specify the config to return

Returns Object: The requested config value.

Use this function to acquire the identifier object

Returns ObjectIdentifier: Identifier object.

This is a alias of ObjectManager.getObject to use in the "this" context.

Parameters
Name Type Description
identifier String Identifier of the object to load
config Object|null Config to push to the object

Returns Promise: call ".then" to use the object when ready.

This method will receive a model object and will set it locally. Also it will set the mimetype of the response.

Parameters
Name Type Description
config Object The config object of the object

Returns Promise: The initialized object.

This is the handler which will try to mixin functions from another object.

Parameters
Name Type Description
object Object The object to mix into the current object.

This method will set the data to the Object.

Parameters
Name Type Description
data Object The data for the view object