Hemi JavaScript Framework
Hemi.app.space.definitions
Description
Application Space Definitions define the mapping between XML and XHTML nodes and JavaScript constructors. The constructors can be from any framework or library, not just Hemi.
Class Index
static Hemi.app.space.definitions.service
version 3.1.0
Static implementation of hemi.app.space.definitions.serviceImpl
Hemi.app.space.definitions.service
version 3.1.0
This service defines space implementations for use by the Hemi Space Service.
Index
Method Index
- public newDefinition: Creates a new implementation definition. An implementation definition maps a node name to a specified constructor.
Methods
newDefinition
Creates a new implementation definition. An implementation definition maps a node name to a specified constructor.
Syntax
object = newDefinition(
aMatchNodes, sNameSpace, sConstructor, aParams, bSwitchContext, sContextPath, sSwapName
)
Parameters
- aMatchNodes as array : Array of node names that should match the specified constructor.
- sNameSpace as String (optional): JavaScript Class namespace, such as MyCompany.MyLibrary. If the value is "abstract", the definition is treated as a pass-through.
- sConstructor as String (optional): JavaScript Class constructor, such as MyClass.
- aParams as array (optional): Array of parameters to pass to the constructor. The parameter values can use the Object Request Alias (ORA) for passing in node attribute values from the container (ora:attr_{name}), or object references such as the Space (space_element or space_object). Refer to the internal Space _parseORAParam function for details.
- bSwitchContext as boolean (optional): Bit indicating that an XML or XHTML node is returned from the constructor, and that the Space service should continue processing into the new object context.
- sContextPath as String (optional): XPath to use to find the object context to switch into.
- sSwapName as String (optional): Element name to use (e.g.: span) to swap a custom node, such is import-xml, to contain valid XHTML markup.
Returns
object as object: A new internal space definition.
[ Hemi JavaScript Framework - Stephen W. Cote, 2002 - 2009. ]