Class

View

View()

Class representing a specific view.
Constructor

# new View()

View Source view.js, line 7

Extends

Classes

View

Methods

# addDomElement(tag) → {object}

Add a DOM element with an optional CSS class.
Parameters:
Name Type Description
tag string The HTML tag to be created.
Overrides:

View Source component.js, line 185

The DOM element.
object

# addElementClasslist(classList)

Helper method for adding classes to an DOM element.
Parameters:
Name Type Description
classList string One ore more class names separated with spaces.
Overrides:

View Source component.js, line 208

# build()

Build the DOM element(s) of a customized component. This method has to be overriden by derived classes.
Overrides:

View Source component.js, line 35

# buildChilds()

Build all descendant components.
Overrides:

View Source component.js, line 74

# buildDOM(selector)

Build Document from all components, starting from the view.
Parameters:
Name Type Description
selector string DOM selector to the element, where to mount the app.
Overrides:

View Source view.js, line 19

# countDescendants() → {number}

Count all descendant components. Descendants are children, grandchildren, and so on.
Overrides:

View Source component.js, line 151

Number of descendants.
number

# createDomElement(tag) → {object}

Create a DOM element with an optional CSS class.
Parameters:
Name Type Description
tag string The HTML tag to be created.
Overrides:

View Source component.js, line 175

The DOM element.
object

# getComponentById(id) → {Component}

Get component by id.
Parameters:
Name Type Description
id string The id of the component to find.
Overrides:

View Source component.js, line 129

The found component or null, if no component has the given id.
Component

# getDomElement(selector) → {HTMLElement}

Retrieve an element from the DOM.
Parameters:
Name Type Description
selector string DOM selector to the element.
Overrides:

View Source component.js, line 199

The DOM element or null.
HTMLElement

# getPropertyNames(customPropertyNames) → {array}

Get property names.
Parameters:
Name Type Description
customPropertyNames array An array with the names of a derived class.
Overrides:

View Source component.js, line 86

An array with property names or undefined, if no properties exist.
array

# handleMessage(message)

Handles a message send to the component.
Parameters:
Name Type Description
message string The message to be handled.
Overrides:

View Source component.js, line 166

# propertiesChanged()

Update component after changes to it. This method has to be overriden by derived classes. This method will be called, when properties has been changed. The component has to reflect the changes in its visual representation.
Overrides:

View Source component.js, line 45

# setProperties(data)

Set component properties by data.
Parameters:
Name Type Description
data array An array with data in the form of name/value pairs.
Overrides:

View Source component.js, line 102