|
MoreMotion Face API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--MoreMotionObjectManager
Manager Class that provides methods to navigate through the DOM structure and manage MoreMotionObject objects.
A static object of this class is available with name OMgr
.
var OMgr = new MoreMotionObjectManager();
Constructor Summary | |
MoreMotionObjectManager()
|
Method Summary | |
Object
|
createElement(tagName, elmName)
|
HTMLElement
|
findChildNode(parentNode, nodeName, attrName, attrValue, depth)
Searches the specified HTML Node under the given node. |
Object
|
findChildObject(parentNode, nodeName, attrName, attrValue, depth)
|
HTMLElement
|
findParentNode(node,attrName,attrValue)
Returns the first parent node that has the specified attribute and attribute value. |
Object
|
findParentObject(parentNode,attrName,attrValue)
|
String
|
getAttribute(node,attrName)
Returns the value of the given attribute safely. |
HTMLElement[]
|
getChildInputElements(node)
Returns an array of all form elements ("input", "select" and "editarea") that exits under the given node. |
HTMLElement
|
getChildNode(parentNode, nodeName, elmName, elmSuffix)
Returns the first child node with the given node name. |
MoreMotionObject
|
getEnclosingObject(node)
Searches the parent nodes of the given DOM element node to find a MoreMotionObject node. |
Object
|
getObject(node)
Creates the MoreMotionObject defined in the "mo:type" attribute of the given DOM element node and returns it. |
Object
|
getObjectById(id)
Creates the MoreMotionObject defined in the "mo:type" attribute of the DOM element whose id is given and returns it. |
MoreMotionObject[]
|
getObjects(parentNode, attrName, attrValue)
Searches the child nodes of the given node and returns an array of MoreMotion Objects that have the specified attribute and value |
PageInfo
|
getPageInfo(node)
Searches the parents of the given node to find a node that has "mo:pageInfo" attribute to extract extracts and return the page info from there. |
HTMLElement
|
getParentNode(node, nodeName)
Returns the first parent node with the given node name. |
props
|
getProps(node)
Creates a props object from the value of the "mo:props" attribute of the given node and returns it. |
PageInfo
|
getThisPageInfo()
Returns the page info by extracting from the document.body node. |
Object
|
getUniqueId(prefix)
Returns a unique id |
void
|
initialize(node)
Initializes all the MoreMotionObject objects existing in the given DOM element node. |
void
|
refreshAction(frm)
|
void
|
refreshHref(node)
|
Object
|
refreshLink(href)
|
void
|
resetForm(nodeOrFormName)
Resets the specified form |
Object
|
resource(resId, parm1, parm2, parm3)
Returns the resource text associated with the specified resId. |
void
|
setAttribute(node, attrName, attrValue)
|
void
|
setInitialOption(elm, value)
Sets the initial value of the given SELECT element
|
void
|
submitForm(nodeOrFormName, action)
Submits the specified form with the given action. |
Constructor Detail |
MoreMotionObjectManager()
Method Detail |
Object createElement(tagName, elmName)
HTMLElement findChildNode(parentNode, nodeName, attrName, attrValue, depth)
parentNode
- The HTML node whose childs will be searched
nodeName
- The name of the node to focus the search. If specified the search will be perfomed only on the nodes that has this name.
attrName
- The name of the attribute to find a matching value
attrValue
- The value to match in the attribute value. If this parameter is omitted or is null then the analyzed node is selected in case of it has the attribute with the given name regardless of its value.
depth
- The depth of the search. If omitted 999 is assumed.
Object findChildObject(parentNode, nodeName, attrName, attrValue, depth)
HTMLElement findParentNode(node,attrName,attrValue)
node
- The HTML node whose parent will be searched
attrName
- The name of the attribute to find a matching value
attrValue
- The value to match in the attribute value. If this parameter is omitted or is null then the analyzed node is selected in case of it has the attribute with the given name regardless of its value.
Object findParentObject(parentNode,attrName,attrValue)
String getAttribute(node,attrName)
node
- The node to extract the attribute value from
attrName
- The name of the attribute
HTMLElement[] getChildInputElements(node)
HTMLElement getChildNode(parentNode, nodeName, elmName, elmSuffix)
parentNode
- The HTML node whose childs will be searched
nodeName
- The name of the node to find.
elmName
- The element name. It is optional.
elmSuffix
- Optional parameter. When specified elmName parameter is considered to be the element prefix and a child node element is searched whose name mathed with these prefix and suffix.search is made with these tThe element name. It is optional.
MoreMotionObject getEnclosingObject(node)
node
- The DOM element node to start searching the parent nodes.
Object getObject(node)
node
- The DOM element node that contains "mo:type" attribute.
Object getObjectById(id)
id
- The id of the element node that contains "mo:type" attribute.
MoreMotionObject[] getObjects(parentNode, attrName, attrValue)
parentNode
- The HTML node whose childs will be searched
attrName
- The name of the attribute to find a matching value
attrValue
- The value to match in the attribute value.
PageInfo getPageInfo(node)
node
- The DOM element node to start the searching off. If it is null then page info is taken from document.body node.
HTMLElement getParentNode(node, nodeName)
node
- The HTML node whose parent will be searched
nodeName
- The name of the node to find.
props getProps(node)
node
- The DOM element node
PageInfo getThisPageInfo()
Object getUniqueId(prefix)
prefix
- A prefix for the id. If not spefivied "x" is assumed.
void initialize(node)
node
- The DOM element node to start with initializing. If it is omitted document.body is used.
void refreshAction(frm)
void refreshHref(node)
Object refreshLink(href)
void resetForm(nodeOrFormName)
nodeOrFormName
- Either a DOM node existing in the form the name of the form to submit
Object resource(resId, parm1, parm2, parm3)
resId
- the Resource id
parm1
- Resource parameter 1. (Optional)
parm2
- Resource parameter 2. (Optional)
parm3
- Resource parameter 3. (Optional)
void setAttribute(node, attrName, attrValue)
void setInitialOption(elm, value)
SELECT
elementelm
- The handle or the id of a HTML SELECT
element
value
- The initial value
void submitForm(nodeOrFormName, action)
nodeOrFormName
- Either a DOM node existing in the form the name of the form to submit
action
- The action to set to the from object before submit
|
MoreMotion Face API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |