Engine for Web Applications

org.cote.js.xhtml

Class Index

static org.cote.js.xhtml.XHTMLComponent

version 2.0.0

Factory for creating XHTMLComponentInstance objects, which represent a XHTML objects (HTML nodes) within the framework.

This class participates in the engine library.

Index

Example Index

Method Index

Examples

Create an XHTMLComponentInstance from an HTML Node

Demonstrate how an XHTMLInstanceObject is created from an HTML Node. Also refer to Application Components, which connect an XHTMLInstanceObject to pre-defined code blocks.

Example Code

<!-- HTML Source -->
<div id = "oDiv">Some node</div>
<!-- Script -->
<script type = "text/javascript"></code>
<code>var o = document.getElementById("oDiv");</code>
<code>/// Create an an XHTMLComponentInstance that can be used
<code>/// To reference the node within the framework.
<code>var oX = org.cote.js.xhtml.XHTMLComponent.newInstance(o.parentNode,o);</code>
<code><![CDATA[</script>

Methods

newInstance

Creates and returns a new XHTMLComponentInstance instance.

Syntax

c = newInstance( hp, xp, cid, rid, cc, cn, cp, cf )

Parameters

Returns

c as XHTMLComponentInstance: Returns a new XHTMLComponentInstance.

org.cote.js.xhtml.XHTMLComponentInstance

version 2.0.0

An object representing a XHTML object (HTML node) to the framework.

This class participates in the engine library.

Index

Property Index

Method Index

Properties

object_config

Object API structure for storing sub structures: object_config.pointers and object_config.status.

Syntax

object = object.object_config

object_id

Unique instance identifier.

Syntax

String = object.object_id

object_type

The type of this object.

Syntax

String = object.object_type

object_version

Version of the object class.

Syntax

String = object.object_version

ready_state

Object load and execution state. Follows: 0 unitialized, 1 through 3 variant, 4 ready, 5 destroyed.

Syntax

int = object.ready_state

Methods

destroy

Clears internal pointers and data, preparing the object for destruction.

Syntax

void destroy( )

getApplicationComponent

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.

Syntax

i = getApplicationComponent( )

Returns

i as ApplicationComponent: Returns any underlying ApplicationComponent object.

getComponentCollection

Returns any component collection that was included when the object was created.

Syntax

c = getComponentCollection( )

Returns

c as object: Component collection (eg: XHTMLFormComponent).

getComponentId

Returns the component id. The component id is used as a friendly name reference to Engine objects and Component Collections such as XHTMLFormComponent.

Syntax

i = getComponentId( )

Returns

i as String: Returns the component id which was specified when the XHTMLComponent was created.

getComponentId

Returns the reference id. For example, the reference id could be an Engine object for which the XHTMLComponent was created.

Syntax

i = getComponentId( )

Returns

i as String: Returns the reference id which was specified when the XHTMLComponent was created.

getContainer

Returns the component container object. For example, if a component was created from an XHTML import <div /> then the HTML version of that node is the container.

Syntax

o = getContainer( )

Returns

o as object: The XHTML/HTML object created based on the specified values when the instance was created.

getIsComponentLinked

Returns a bit indicating whether the object is linked.

Syntax

i = getIsComponentLinked( )

Returns

i as bit: Bit indicating whether the object is linked with a component collection (eg: to XHTMLFormComponent).

getObjectId

Returns the unique id of the object.

Syntax

i = getObjectId( )

Returns

i as String: The unique object instance id.

getObjectType

Returns the type of the object.

Syntax

t = getObjectType( )

Returns

t as String: The type of the object instance.

getObjectVersion

Returns the version of the object.

Syntax

v = getObjectVersion( )

Returns

v as String: The version of the object instance.

getPointers

Returns the object_config.pointers sub structure.

Syntax

o = getPointers( )

Returns

o as object: The object_config.pointers substructure.

getReadyState

Returns the state of the object.

Syntax

s = getReadyState( )

Returns

s as int: The object ready state.

getStatus

Returns the object_config.status sub structure.

Syntax

o = getStatus( )

Returns

o as object: The object_config.status substructure.

init_component

Initializes the instance of this object.

Syntax

void init_component( )

post_init

Post initializes the object to add it to a component collection. This is invoked internally when using the EngineService for a specific Engine object.

Syntax

void post_init( )

sigterm

Sends a termination signal to this object, causing it to be destroyed.

Syntax

void sigterm( )