<source><name>Hemi.app.space</name><project><name>Hemi JavaScript Framework</name><url-title>Hemi JavaScript Framework Project</url-title><url>/Hemi/</url></project><package><path>Hemi.app.space</path><library>Hemi</library><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.</description><static-class><name>service</name><version>3.1.9</version><description>Static implementation of the Application Space service.</description></static-class><class><name>serviceImpl</name><version>3.1.9</version><description>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.</description><message><name>onspaceconfigload</name><param name="o" type="SpaceObject">The EngineObject for which the configuration was loaded.</param><description>Message published to all subscribers when configuration has been loaded.</description></message><method><name>getPrimarySpace</name><return-value name="oSpace" type="SpaceObject">The primary space object.</return-value><description>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.</description></method><method><name>clearAppSpace</name><param name="i" type="variant">Name or object reference of the Space to clear.</param><description>Clears the specified Space, and destroys all components of the Space.</description></method>
TODO: Refactor
This is effectively identical with the configureSpace pre-step,
Without the cleanup routines for Form and Parent Node

2007/02/03
Clear out any XHTMLForm references to this Engine

<method><name>clearAppSpaces</name><description>Clears all Spaces, and destroys all components in each Space.</description></method><method><name>loadSpaces</name><param name="b" type="boolean">Bit indicating that a primary space should be defined if one is not specified.  This param will always be true if any space exists and none are marked as primary.</param><param name="o" type="object" optional="1">Object in which to search for potential space declarations.</param><param name="pr" type="function" optional="1">Processor to assign to the space.  Used for pre-processing XML templates and configuration.</param><param name="xr" type="function" optional="1">XML Handler to use when invoking setInnerXHTML.</param><description>Finds all spaces on the current Web page and loads them.  A space node is either the <i>body</i> element, or a <i>span</i>, <i>div</i>, or <i>form</i> element with an <i>is-space</i> attribute.</description></method>
return t.loadSpaces(1);
<method><name>createSpace</name><param name="e" type="Node">XHTML Element</param><param name="b" type="boolean">Bit indicating the space is being forced.</param><param name="pr" type="function" optional="1">Processor to assign to the space.  Used for pre-processing XML templates and configuration.</param><param name="xr" type="function" optional="1">XML Handler to use when invoking setInnerXHTML.</param><param name="fCallBack" type="function" optional="1">Callback handler to be invoked when the space is initialized.</param><return-value name="v" type="SpaceObject">A new space object that has been tasked to initialize.</return-value><description>Creates a new Application Space.</description></method>
alert(n + ":" + at + ":" + a + ":" + ht + ":" + h);
<method><name>configureSpace</name><param name="o" type="Space">A space object.</param><param name="c" type="String">Name of SpaceService configuration.</param><description>Applies the specified configuration to the specified engine.  This can be used to repurpose Space objects, or to load alternate content into the Space.</description></method>
var d1 = new Date();
alert(_s.config_task);
if (!c) c = "self";
Don't require external XML

this.log("Time to configure = " + (new Date()).getTime() - d1.getTime());
alert("Time to configure = " + ((new Date()).getTime() - d1.getTime()));
<object><name>Space</name><property name="space_element" type="object">The DOM Node associated with this Space.</property><property name="space_id" type="String">The unique identifier of this Space object.</property><property name="space_name" type="String">The friendly name of this Space object.</property><property name="space_state" type="int">The loading state of the space.</property><property name="space_index" type="int">The ordinal index of this Space object.</property><property name="config_name" type="String">The configuration name for this Space object.  This value specifically applies to a Space Configuration file.</property><property name="task" type="Task">The task object associated with this Space.  All Spaces are bootstrapped with a Task object.</property><property name="is_primary" type="boolean">Bit indicating whether this is the primary engine.  There can only be one primary engine per hemi.app.space.serviceImpl instance.</property><property name="space_implementations" type="array">Cache of implementation constructors used to build the content within the Space.</property><method virtual="1"><name>Processor</name><param name="o" type="Space">An object reference to this Space object.</param><param name="v" type="variant">An XHTML Node, or string.</param><description>Allows a document to be processed by an outside process before it is copied into the space context.</description></method><method><name>getContainer</name><return-value type="object" name="c">The node containing the Space object.</return-value><description>Returns the node that contains the Space.  For example, a DIV node on which the Space was defined.</description></method><method><name>getSpaceObjects</name><return-value type="array" name="a">Array of objects created for this Space.  All objects are likewise registered with the hemi.registry.service.</return-value><description>Returns an array of objects created for this Space.</description></method><method><name>getSpaceObject</name><param name="i" type="int">Index into the objects array.</param><return-value type="object" name="a">Object created for this Space.</return-value><description>Returns the specified object created for this Space.</description></method><method><name>getSpaceObjectByName</name><param name="n" type="String">Name of an object.</param><return-value type="object" name="a">Object created for this Space.</return-value><description>Returns the specified object created for this Space.</description></method><method><name>getSpaceObjectsByClass</name><param name="n" type="String">CSS class name.</param><return-value type="array" name="a">Array of objects with the specified class.</return-value><description>Returns an array of objects with the specified class.</description></method><method><name>isSpaceObjectByName</name><param name="n" type="String">Name of an object.</param><return-value type="boolean" name="b">Bit indicating whether the object exists in this Space.</return-value><description>Returns true if the object exists, false otherwise.</description></method><method><name>getPrimitiveWire</name><param name="n" type="String">Identifier of a primitive wire.</param><return-value type="PrimitiveWire" name="o">PrimitiveWire object.</return-value><description>Returns the specified PrimitiveWire.</description></method><method><name>addSpaceObject</name><param name="o" type="FrameworkObject">A framework object.</param><param name="s" type="String">Reference identifier that can be used to identify this object within the space.</param><description>Adds the specified object to the application space.</description></method><method><name>removeSpaceObject</name><param name="i" type="String">FrameworkObject identifier.</param><description>Removes references to the specified identifier from the space.</description></method></object><method internal="1"><name>newSpaceObject</name><param name="e" type="Node">XHTML Element representing the space.</param><param name="i" type="String">Unique identifier.</param><param name="n" type="String">Friendly name for the object.</param><param name="k" type="TaskObject">Task object used to load this space.</param><param name="x" type="int">Index of space relative to adjacent spaces.</param><param name="f" type="function">Space initialization callback</param><return-value name="o" type="SpaceObject">New space object.</return-value><description>Creates a new Space object.</description></method>
Copy css class names into css_map

</class></package><index><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.</description><url>Hemi_api.html</url><url-title>API Index</url-title></index></source>