Class Index | File Index

Classes


Class View


Defined in: view.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
View(ctrl, name, definition)
The View class is a kind of interface-class which gives access to the methods and data of a helper (which itself belongs to a controller)
Apart from initializing some properties, the constructor also parses the view description and looks for needed helper methods.
Method Summary
Method Attributes Method Name and Description
 
Executes all helper methods that were specified / referenced in the view; with **data** as parameter.
 
Gets a specific mmir.ContentElement object by name.
 
Gets the name of a view.
 
Gets the definition of a view.
 
Gets an array of all helper methods.
 
Gets the name of a view.
Class Detail
View(ctrl, name, definition)
The View class is a kind of interface-class which gives access to the methods and data of a helper (which itself belongs to a controller)
Apart from initializing some properties, the constructor also parses the view description and looks for needed helper methods.
Parameters:
{Object} ctrl
Controller instance / object
{String} name
Name of the View
{String} definition
View description, i.e. the raw template code that will be processed. May be empty: in this case the processed contents must be added manually (cf. parser.StorageUtils)
Requires:
if param definition is NOT empty: parser.RenderUtils (must be loaded beforehand via require(["renderUtils"]...)
if param definition is NOT empty: parser.ParseUtils (must be loaded beforehand via require(["parseUtils"]...)
Method Detail
executeHelperMethods(data)
Executes all helper methods that were specified / referenced in the view; with **data** as parameter.
Parameters:
{Object} data
Parameter to pass to the helper methods
Deprecated:
helper methods must now explicitly called in template definition (using syntax @helper(name,args))

{object} getContentElement(name)
Gets a specific mmir.ContentElement object by name.
Parameters:
{String} name
Name of the ContentElement object
Returns:
{object} The wanted ContentElement object or null

{Object} getController()
Gets the name of a view.
Returns:
{Object} The controller for the view

{String} getDefinition()
Gets the definition of a view.
Returns:
{String} The view description string

{Array} getHelperMethods()
Gets an array of all helper methods.
Returns:
{Array} Array of all helper methods

{String} getName()
Gets the name of a view.
Returns:
{String} The name of the view

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Feb 26 2016 21:44:43 GMT+0100 (Mitteleuropäische Zeit)