Hemi JavaScript Framework
Hemi.app
Description
Helper utilities for creating Application Spaces, Application Components, XHTML Components, and loading Window components.
static Hemi.app
version 3.1.0
Convenience methods for instrumenting the Hemi.app.* libraries.
Index
Method Index
- public createApplicationComponent: Creates a new application space at the specified location.
- public createApplicationSpace: Creates a new application space at the specified location.
- public createComponent: Creates a new XHTML Component.
- public createWindow: Creates and/or restores a new window as an instance of component.window.xml for the specified name.
- public getWindowManager: Returns a global instance of the component.manager.xml component, dynamically creating it if it does not already exist in the registry.
Methods
createApplicationComponent
Creates a new application space at the specified location.
Syntax
oSpace = createApplicationComponent(
sComponentName, oElement, oSpace, sRid
)
Parameters
- sComponentName as String (optional): Name of the component to load. If the name does not end with .xml, the component will be loaded from Hemi/Components/component.{sComponentName}.xml
- oElement as Node (optional): XHTML Node to which the application component will be bound.
- oSpace as SpaceObject (optional): Application space in which this component will operate.
- sRid as String (optional): Reference id for addressing this object through the registry service or within the application space.
Returns
oSpace as SpaceObject: A new application space object.
createApplicationSpace
Creates a new application space at the specified location.
Syntax
oSpace = createApplicationSpace(
oElement, oParent, oSibling, fCallback
)
Parameters
- oElement as Node (optional): XHTML Node in which the space will be created.
- oParent as Node (optional): XHTML Parent of oElement.
- oSibling as Node (optional): XHTML Sibling of oElement, used for node adjacency insertion.
- fCallback as function (optional): Callback function to be invoked after the space is initialized.
Returns
oSpace as SpaceObject: A new application space object.
createComponent
Creates a new XHTML Component.
Syntax
oComponent = createComponent(
oElement, oSpace, sRid
)
Parameters
- oElement as Node : XHTML Node for which the XHTML Component will be created.
- oSpace as SpaceObject (optional): Application space in which the component will exist.
- sRid as String (optional): Reference id for addressing this object through the registry service or within the application space.
Returns
oComponent as XHTMLComponent: A new XHTML Component.
createWindow
Creates and/or restores a new window as an instance of component.window.xml for the specified name.
Syntax
oWindow = createWindow(
sTitle, sTemplate, sName, vSpace, bNotBound, aArguments, fLocalInit
)
Parameters
- sTitle as String (optional): Title of the window component.
- sTemplate as String (optional): Template to use for the window contents.
- sName as String (optional): Name of the window, used to retrieve a reference from the Window Manager component.
- vSpace as variant (optional): Name of or reference to an Application Space.
- bNotBound as bool (optional): Bit indicating whether the window component is free to move beyond the boundary of the Window Manager.
- aArguments as hash (optional): Property hash that will be copied into the Application Component properties member.
- fLocalInit as function (optional): Callback function to be invoked when the window and any dependent templates are loaded.
Returns
oWindow as ApplicationComponent: A new application component if created. If the named object exists, the object is restored but not returned.
getWindowManager
Returns a global instance of the component.manager.xml component, dynamically creating it if it does not already exist in the registry.
Syntax
oManager = getWindowManager(
)
Returns
oManager as ApplicationComponent: An instance of the component.manager.xml component.
[ Hemi JavaScript Framework - Stephen W. Cote, 2002 - 2009. ]