ContainerClass

Creates a container with specified layout and children. The added children gets a property "parent", which is the container itself.

Example

 var container = new nokia.mh5.ui.Container({
     layout: {
         type: nokia.mh5.ui.RowLayout
     },
     children: ["input", "submit"],
     input: {
         control: nokia.mh5.ui.TextInput
     },
     submit: {
         control: nokia.mh5.ui.Button
     }
 });      

Inheritance hierarchy

nokia.mh5.Class
  nokia.mh5.ui.Control
      nokia.mh5.ui.Container
        nokia.mh5.ui.Carousel
        nokia.mh5.ui.Dialog
        nokia.mh5.ui.List
        nokia.mh5.ui.Page
        nokia.mh5.components.Map
        nokia.mh5.components.PlaceDetails
        nokia.mh5.components.PlaceSummary
        nokia.mh5.components.Route
        nokia.mh5.components.Search

Constructor Detail

Creates a container with specified properties.

new nokia.mh5.ui.Container(props, parentContainer);

Constructor Parameters

Type Name Description
Object props See below:
nokia.mh5.ui.Container parentContainer the mh5 component into which this element is embedded
Object [props.layout] layout properties of the container
nokia.mh5.ui.AutoLayout [props.layout.type = nokia.mh5.ui.AutoLayout] layout of type the container
String [props.layout.align] if align is set to "stretch", the children will share the whole height of the container
Array [props.children] array with names of the children, which are also present in the properties

Methods    Hide Inherited

publicinherited getRootOwnerByClass(Class) Retrieves the instance that owns the root node of the specified Class. Used to retrieve creator of the component inside bound events.
public build() Calls the build functions of all children (if available). In here children can already access the tree of UI controls, which isn't possible in the constructor.
public add(control, name) Adds a control with the specified name to the container and adds the "parent" property set to the container to it.
publicinherited getContentRoot() Returns the real DOM node of the control without scroll wrapper (if present).
public insertBefore(control, name, referenceControlName) Inserts a control with a specified name to the container before the control with the specified name and adds the "parent" property set to the container to it.
public prepareBindings() Calls prepareBindings on children controls (if available) and itself.
public prepareDidChangeNotifications() Calls prepareDidChangeNotifications on children controls (if available) and itself.
public remove(name) Removes a specified a control from the container, if it can be found.

Properties    Hide Inherited

public Array children Array with strings, which call the children of the container
publicinherited String cssClass The CSS class.
public Boolean dontBind makes sure, that the bindings in the container are initialized after the build function of all children is called.

Events

nokia.mh5.ui.Container has no events.

Callbacks

nokia.mh5.ui.Container has no callbacks.

Classes

nokia.mh5.ui.Container has no classes.

Constants

nokia.mh5.ui.Container has no constants.

Interfaces

nokia.mh5.ui.Container has no interfaces.