Class: Component

MobileAge.Component(element, options)

MobileAge components wrapper

Constructor

new Component(element, options)

Class used to capsulate general component functions
Parameters:
Name Type Description
element string query id, element or css-query to specify the DOM-Element to connect to.
options Object
Properties
Name Type Attributes Default Description
formName String <optional>
"" Name- and Id-Attribute for the component's dom element.
bem Boolean <optional>
false Specifies, whether the Block-Element-Modifier Methodology (BEM) is used for naming css classes or not.
bemBlock String <optional>
"" Block name in the BEM-Methodology (BEM)
bemElement String <optional>
"" Element name in the BEM-Methodology (BEM)
bemModifier String <optional>
"" Modifier name in the BEM-Methodology (BEM)
template String <optional>
"" Template to be used to render the data in
templateSource String <optional>
"./templates.php" URL of the template server component !!!yet no server specified!!!
templateType String <optional>
"" Entity-type according to schema.org
templateSize String <optional>
"medium" Grade of detail of the applied template. Possible values: "small", "medium", "big"
templateFlavor String <optional>
"mobileage" Flavor of the template to be used. Default: "mobileage" (Only existing yet)
templateLang String <optional>
"en" Language of the template.
templateLabels String <optional>
null Callback-function called when all data is rendered.
onTemplate function <optional>
null Callback, when the template is retrieved from the server
Source:

Extends

Classes

AutoComplete
List
Map
Record
Select
TreeSelect

Methods

(static) _isAttached() → {boolean}

Checks if the instance is attached to one or more DOM-Elements
Source:
Returns:
true, if instance is attached to one or more DOM-Elements
Type
boolean

(static) _isList() → {boolean}

Checks if the instance is attached to a list of DOM-Elements
Source:
Returns:
true, if instance is attached to multiple DOM-Element
Type
boolean

(static) _isSingle() → {boolean}

Checks if the instance is attached to a single DOM-Element
Source:
Returns:
true, if instance is attached to a single DOM-Element
Type
boolean

(static) _onRequestTemplate(template)

Callback function called when requested template is received
Parameters:
Name Type Description
template object requested template
Source:

(static) _onRequestTemplateError(template)

Callback function called when requested template cannot be received
Parameters:
Name Type Description
template object requested template
Source:

(static) attachDOM(element)

Attaches the instance of a MobileAge component to a DOM-Element
Parameters:
Name Type Description
element string | node query id or css-query to specify the DOM-Element to connect to.
Source:

(static) log()

log for debug purpose
Source:

(static) removeNode()

Removes the components node from the DOM
Source: