<source><name>Hemi.object.xhtml</name><project><name>Hemi JavaScript Framework</name><url-title>Hemi JavaScript Framework Project</url-title><url>/Hemi/</url></project><package><path>Hemi.object.xhtml</path><library>Hemi</library><description>The XHTML Component class is used to represent an XHTML Node within the Hemi Framework as a registered object. This class also coordinates the XHTML Node with referenced Application Components, Modules, Templates, Distributed Application Components, and Virtual Forms, and is used with Application Spaces as an Application Space Definition.</description><static-class><name>XHTMLComponent</name><version>3.1.9</version><description>Factory for creating XHTMLComponentInstance objects, which represent a XHTML objects (HTML nodes) within the framework.</description><example><description>Demonstrate how an XHTMLInstanceObject is created from an HTML Node.  Also refer to Application Components, which connect an XHTMLInstanceObject to pre-defined code blocks.</description><name>Create an XHTMLComponentInstance from an HTML Node</name><code><![CDATA[<!-- HTML Source -->]]></code><code><![CDATA[<div id = "oDiv">Some node</div>]]></code><code><![CDATA[<!-- Script -->]]></code><code><![CDATA[<script type = "text/javascript">]]></code><code>var o = document.getElementById("oDiv");</code><code>/// Create an XHTMLComponentInstance that can be used</code><code>/// To reference the node within the framework.</code><code>var oX = Hemi.object.xhtml.newInstance(o.parentNode,o);</code><code><![CDATA[</script>]]></code></example><method><name>newInstance</name><param name="hp" type="object">HTML Node in which the XHTML Component will be created.</param><param name="xp" type="object">XHTML Node for which the XHTML Component will be created.</param><param name="cid" type="String" optional="1">String representing the id to give to the component.</param><param name="rid" type="String" optional="1">String representing the reference id of an Engine object.</param><param name="cc" type="object" optional="1">Object representing a component collection, such as XHTMLFormComponent.</param><param name="cn" type="String" optional="1">String representing a component name.  The component name refers to an ApplicationComponent.</param><param name="cp" type="String" optional="1">String representing the path to an ApplicationComponent file.</param><param name="cf" type="String" optional="1">String representing the name of the calling configuration.  This is used when making self configuration declarations with an EngineService.</param><return-value type="XHTMLComponentInstance" name="c">Returns a new XHTMLComponentInstance.</return-value><description>Creates and returns a new XHTMLComponentInstance instance.</description></method></static-class><class><name>XHTMLComponentInstance</name><version>3.1.9</version><description>An object representing a XHTML object (HTML node) to the framework.</description><property type="object" get="1"><name>properties</name><description>A hash of primitive values (strings, ints, etc) for storing configuration, settings, and status.</description></property><property type="object" get="1"><name>objects</name><description>A hash of object values for storing named object references.</description></property><property type="String" get="1" internal="1"><name>object_id</name><description>Unique instance identifier.</description></property><property type="String" get="1" internal="1"><name>object_version</name><description>Version of the object class.</description></property><property type="String" get="1" internal="1"><name>object_type</name><description>The type of this object.</description></property><property type="int" get="1" internal="1"><name>ready_state</name><description>Object load and execution state.  Follows: 0 unitialized, 1 through 3 variant, 4 ready, 5 destroyed.</description></property><method><name>getObjectId</name><return-value name="i" type="String">The unique object instance id.</return-value><description>Returns the unique id of the object.</description></method><method><name>getObjectType</name><return-value name="t" type="String">The type of the object instance.</return-value><description>Returns the type of the object.</description></method><method><name>getObjectVersion</name><return-value name="v" type="String">The version of the object instance.</return-value><description>Returns the version of the object.</description></method><method><name>getReadyState</name><return-value name="s" type="int">The object ready state.</return-value><description>Returns the state of the object.</description></method><method><name>getComponentCollection</name><return-value name="c" type="object">Component collection (eg: XHTMLFormComponent).</return-value><description>Returns any component collection that was included when the object was created.</description></method><method><name>getIsComponentLinked</name><return-value name="i" type="bit">Bit indicating whether the object is linked with a component collection (eg: to XHTMLFormComponent).</return-value><description>Returns a bit indicating whether the object is linked.</description></method><method><name>getContainer</name><return-value name="o" type="object">The XHTML/HTML object created based on the specified values when the instance was created.</return-value><description>Returns the component container object.  For example, if a component was created from an XHTML import &lt;div /&gt; then the HTML version of that node is the container.</description></method><method><name>getComponentId</name><return-value name="i" type="String">Returns the component id which was specified when the XHTMLComponent was created.</return-value><description>Returns the component id.  The component id is used as a friendly name reference to Engine objects and Component Collections such as XHTMLFormComponent.</description></method><method><name>getComponentId</name><return-value name="i" type="String">Returns the reference id which was specified when the XHTMLComponent was created.</return-value><description>Returns the reference id.  For example, the reference id could be an Engine object for which the XHTMLComponent was created.</description></method><method><name>getApplicationComponent</name><return-value name="i" type="ApplicationComponent">Returns any underlying ApplicationComponent object.</return-value><description>Returns any underlying ApplicationComponent object.  For example, if a component name, component path, and component config name were specified when the instance was created, then the corresponding ApplicationComponent would be returned.</description></method><method><name>sigterm</name><description>Sends a termination signal to this object, causing it to be destroyed.</description></method><method><name>destroy</name><description>Clears internal pointers and data, preparing the object for destruction.</description></method>
HemiEngine.log("XHTML Remove node");
else HemiEngine.log("Didn't clean up because " + _p.c + ":" + _p.r + ":" + _s.cf);
HemiEngine.log("Cleanup " + t.object_id);
<method internal="1"><name>init_component</name><description>Initializes the instance of this object.</description></method>
If a component name was specified

If a component path was specified in the constructor

Check for an inline appcomp_path attribute

Otherwise, check for the path in the configuration

Remove the space attribute to promote this element into its own space

o.removeAttribute("space-id");
Remove the space attribute to promote this element into its own space

o.removeAttribute("space-id");
<method internal="1"><name>post_init</name><description>Post initializes the object to add it to a component collection.  This is invoked internally when using the EngineService for a specific Engine object.</description></method>
If there is an application component and it defines a post_init, then invoke it
</class></package><index><description>The XHTML Component class is used to represent an XHTML Node within the Hemi Framework as a registered object. This class also coordinates the XHTML Node with referenced Application Components, Modules, Templates, Distributed Application Components, and Virtual Forms, and is used with Application Spaces as an Application Space Definition.</description><url>Hemi_api.html</url><url-title>API Index</url-title></index></source>
