Hemi JavaScript Framework

Hemi.app.space

Description

Application Spaces are controlled environments in which the content (XHTML and XML nodes) drives the implementation (via Application Space Definitions). XHTML Nodes (Presentation Nodes) that match space definitions are represented as XHTML Components. XHTML Components can automatically load Application Components, Modules, and Templates (which in turn spawn their own Application Space). These components can be retrieved using unique object identifiers, or more friendly reference identifiers which are contextually sensitive to the space. Form fields are augmented by the Hemi.data.form service to create Virtual Forms. Spaces can load automatically, or use the Hemi.task service to bootstrap asynchronous dependencies.

Class Index

static Hemi.app.space.service

version 3.1.0

Static implementation of the Application Space service.

Hemi.app.space.serviceImpl

version 3.1.0

The Application Space service is used to create managed environments within Web pages. Each Application Space uses its XHTML contents for self-configuration, instrumentation, and contained lifecycle management.

Index

Object Index

Method Index

Message Index

Objects

Space

Properties

Methods

Methods

clearAppSpace

Clears the specified Space, and destroys all components of the Space.

Syntax

void clearAppSpace( i )

Parameters

clearAppSpaces

Clears all Spaces, and destroys all components in each Space.

Syntax

void clearAppSpaces( )

configureSpace

Applies the specified configuration to the specified engine. This can be used to repurpose Space objects, or to load alternate content into the Space.

Syntax

void configureSpace( o, c )

Parameters

createSpace

Creates a new Application Space.

Syntax

v = createSpace( e, b, pr, xr, fCallBack )

Parameters

Returns

v as SpaceObject: A new space object that has been tasked to initialize.

getPrimarySpace

Returns the primary application space. If a space is not explicitly created prior to the page loading, then, by default, a primary space object is created for the HTML BODY.

Syntax

oSpace = getPrimarySpace( )

Returns

oSpace as SpaceObject: The primary space object.

loadSpaces

Finds all spaces on the current Web page and loads them. A space node is either the body element, or a span, div, or form element with an is-space attribute.

Syntax

void loadSpaces( b, o, pr, xr )

Parameters

newSpaceObject

Creates a new Space object.

Syntax

o = newSpaceObject( e, i, n, k, x, f )

Parameters

Returns

o as SpaceObject: New space object.

Messages

onspaceconfigload

Message published to all subscribers when configuration has been loaded.

Syntax

// User-specified script to subscribe to message
org.cote.js.message.MessageService.subscribe("onspaceconfigload",_handle_message);
// Internal: how the message is published to subscribers
org.cote.js.message.MessageService.publish("onspaceconfigload" , o );
// User-specified script to handle the message subscription
function _handle_message("onspaceconfigload" , o ){
// message handler code
}

Parameters