UIZE JavaScript Framework

MODULES Uize.Class.mChildObjectEventBindings

1. Introduction

The Uize.Class.mChildObjectEventBindings mixin implements features to provide a declarative approach to wiring Uize events on instances and their child objects (such as widget and child widget events), as well as other types of events on other types of objects (such as DOM events on DOM nodes for widgets).

DEVELOPERS: Ben Ilegbodu, original code contributed by Zazzle Inc.

1.1. Examples

There are no dedicated showcase example pages for the Uize.Class.mChildObjectEventBindings module.

SEARCH FOR EXAMPLES

Use the link below to search for example pages on the UIZE Web site that reference the Uize.Class.mChildObjectEventBindings module...

SEARCH

1.2. Implementation Info

The Uize.Class.mChildObjectEventBindings module defines the Uize.Class.mChildObjectEventBindings object under the Uize.Class namespace.

1.2.1. Features Introduced in This Module

The features listed in this section have been introduced in this module.

STATIC PROPERTIES

Uize.Class.mChildObjectEventBindings.moduleName | Uize.Class.mChildObjectEventBindings.pathToResources

1.2.2. Features Overridden in This Module

No features have been overridden in this module.

1.2.3. Features Inherited From Other Modules

This module has no inherited features.

1.2.4. Modules Directly Under This Namespace

There are no modules directly under this namespace.

1.2.5. Unit Tests

The Uize.Class.mChildObjectEventBindings module is unit tested by the Uize.Test.Uize.Class.mChildObjectEventBindings test module.

2. Static Methods

2.1. Uize.Class.mChildObjectEventBindings.childObjectEventBindings

Lets you conveniently declare the type of event bindings to declare on the class.

SYNTAX

MyClass.childObjectEventBindings (childObjectEventBindingsPropertiesOBJ);

The sole childObjectEventBindingsPropertiesOBJ parameter supports the following properties...

declaration - the name of the actual child object event bindings declaration function to create (such as 'eventBindings' for Uize.Widget.mEventBindings)
instanceProperty - the name of the instance property that contains the references to the child objects (such as 'children' for Uize.Widget.mEventBindings)
addedInstanceProperty - the name of the Uize.Class instance property that contains state about which child objects have been added (such as 'addedChildren' for =Uize.Widget.mEventBindings)
additionalTypes - an object of additional type name =string=s to type definition =object=s

Each object in additionalTypes supports the following properties...

namePrefix - a string representing the prefix indicating that a source object name is of the given type (such as '#' for node events for Uize.Widget.mEventBindings)
wireWhenever - a condition string, array or function indicating when to wire up the event bindings (such as 'wired' for node events for Uize.Widget.mEventBindings). Default value is undefined, meaning the events will be wired immediately upon construction of the instance.
getObjectMethod - the name of he instance method that returns the object given the object's name (such as 'getNode' for nodes for Uize.Widget.mEventBindings)
wireObjectMethod - the name of the instance method that wires the object, given an event name and handler function (such as 'wireNode' for nodes for Uize.Widget.mEventingBindings)
defaultFireIf - a default condition string, array or function indicating under what conditions the instance must be in order to call an event handler if an explicit condition is unspecified in the event bindings (such as 'enabledInherited,!busyInherited' for nodes for Uize.Widget.mEventBindings)

NOTES

An assumption is made that for non-"regular" types (i.e. those that specify namePrefix) that if the object is removed from the instance unwiring will happen automatically or will otherwise be taken care of (such as when nodes are removed from a widget, they are also unwired)

3. Static Properties

3.1. Uize.Class.mChildObjectEventBindings.moduleName

IMPLEMENTATION INFO

this feature was introduced in this module

3.2. Uize.Class.mChildObjectEventBindings.pathToResources

IMPLEMENTATION INFO

this feature was introduced in this module