Constructor
new AmxTag(parentTag, xmlNode, nextAutoGeneratedId)
AMX tag object. JS object representation of the AMX node definition from the AMX page.
Constructor should only be by the framework.
Parameters:
Name | Type | Description |
---|---|---|
parentTag |
adf.mf.api.amx.AmxTag | null | the parent tag or null for the root. |
xmlNode |
Node | the XML DOM node from the AMX page |
nextAutoGeneratedId |
Array.<number> | an array with a single integer (to be able to change the value) for tags without IDs, the next auto-generated one to use. |
Methods
-
adopt(theRawObject)
-
Adopt the properties of another object as our own.
Parameters:
Name Type Description theRawObject
Object the other object - Inherited From:
-
buildAmxNode(parentNode, key) → {adf.mf.api.amx.AmxNode|null}
-
Create a new instance of an AMX node for this tag given the stamp ID. If the tag is a facet tag, the tag will create the node for the child tag. This function does not initialize the node.
Parameters:
Name Type Description parentNode
adf.mf.api.amx.AmxNode | null the parent AMX node or null if the tag/node is the root key
Object | null the stamp key to identify the node with the given key. May be null for non-iterating parent tags. Returns:
an un-initialized AMX node object or null for non-UI tags- Type
- adf.mf.api.amx.AmxNode | null
-
clone() → {Object}
-
Returns a clone of this object. The default implementation is a shallow copy. Subclassers can override this method to implement a deep copy.
- Inherited From:
Returns:
a new shallow copy of this object- Type
- Object
-
createCallback(func) → {function}
-
Creates a function instance that will call back the passed in function with the current "this". This is extremely useful for creating callbacks.
Parameters:
Name Type Description func
function the function to proxy - Inherited From:
Returns:
the proxied function- Type
- function
-
equals(object) → {boolean}
-
Indicates whether some other adf.mf.api.AdfObject is "equal to" this one. Method is equivalent to java ".equals()" method.
Parameters:
Name Type Description object
Object the object to compare with - Inherited From:
Returns:
whether the objects are "equal"- Type
- boolean
-
findTags(namespace, tagName) → {Array.<adf.mf.api.amx.AmxTag>}
-
Recursively search the tag hierarchy for tags with the given namespace and tag name. Returns the current tag if a match as well.
Parameters:
Name Type Description namespace
string the namespace of the children to retrieve. tagName
string the name of the tags to return. Returns:
array of all the matching tags.- Type
- Array.<adf.mf.api.amx.AmxTag>
-
getAttribute(name) → {string|undefined}
-
Get the attribute value (may be an EL string) for the attribute of the given name.
Parameters:
Name Type Description name
string the name of the attribute Returns:
the attribute value or undefined if the attribute was not specified. Returns the expression string for EL attributes.- Type
- string | undefined
-
getAttributeNames() → {Array.<string>}
-
Get all of the defined attribute names for the tag.
Returns:
all of the attribute names for the attributes that were specified on the tag.- Type
- Array.<string>
-
getAttributes() → {Object.<string, value>}
-
Get a k/v pair map of the attributes and their values.
Returns:
map of name to value pairs.- Type
- Object.<string, value>
-
getChildFacetTag(name) → {adf.mf.api.amx.AmxTag|null}
-
Convenience function to get the facet tag with the given name. Meant to assist the code if the presence of a facet changes the behavior of a type handler.
Parameters:
Name Type Description name
string the name of the facet to find. Returns:
the child facet tag or null if none has been provided with the given name.- Type
- adf.mf.api.amx.AmxTag | null
-
getChildren(namespace, tagName) → {Array.<adf.mf.api.amx.AmxTag>}
-
Get the children of the tag. Provides for optional filtering of the children namespaces and tag names.
Parameters:
Name Type Description namespace
string | null the namespace to filter the children by. If null all the children will be returned. tagName
string | null the name of the tag to filter the children by. Only considered if the namespace parameter is non-null. If null, the children will not be filtered by tag name. Returns:
array of all the matching children tags.- Type
- Array.<adf.mf.api.amx.AmxTag>
-
getChildrenFacetTags() → {Array.<adf.mf.api.amx.AmxTag>}
-
Convenience function to get all of the children facet tags. Meant to assist the creation of the AMX node process.
Returns:
array of all the facet tags.- Type
- Array.<adf.mf.api.amx.AmxTag>
-
getChildrenUITags() → {Array.<adf.mf.api.amx.AmxTag>}
-
Convenience function to get all children tags that are UI tags. Meant to assist the creation of the AMX node process. Does not return any facet tags.
Returns:
array of all the children UI tags.- Type
- Array.<adf.mf.api.amx.AmxTag>
-
getClass(otherInstance) → {Object}
-
Get the class for an object.
Parameters:
Name Type Description otherInstance
Object optional other object to use - Inherited From:
Returns:
the class of or null if the class cannot be found- Type
- Object
-
getFacet() → {{name:string, children:Array.<adf.mf.api.amx.AmxTag>}|null}
-
Get the tags for the children of this facet and the name of the facet if this tag is a facet tag. Convenience function for building the AMX node tree.
Returns:
an object with the name of the facet and the children tags of the facet. Returns null if the tag is not an AMX facet tag.- Type
- {name:string, children:Array.<adf.mf.api.amx.AmxTag>} | null
-
getName() → {string}
-
Get the tag name. This is the local XML tag name without the prefix.
Returns:
the tag name- Type
- string
-
getNamespace() → {string}
-
Get the XML namespace URI for the tag.
Returns:
the namespace URI- Type
- string
-
getNsPrefixedName() → {string}
-
Return the tag name including the namespace prefix (not the local xmlns prefix). This is the full XML name like "http://xmlns.example.com/custom:custom".
Returns:
the tag name with the prefix- Type
- string
-
getParent() → {adf.mf.api.amx.AmxTag|null}
-
Get the parent tag.
Returns:
the parent tag or null for the top level tag.- Type
- adf.mf.api.amx.AmxTag | null
-
getPrefixedName()
-
- Deprecated:
- Yes
-
getTextContent() → {string}
-
Returns the text content of the tag.
Returns:
the text content, or an empty string.- Type
- string
-
getTypeHandler() → {Object}
-
Get the type handler for this tag.
Returns:
the type handler- Type
- Object
-
getTypeName() → {String}
-
Returns the type name for this instance
- Inherited From:
Returns:
name of the Class- Type
- String
-
isAttributeElBound(name) → {boolean}
-
Get if the given attribute is bound to an EL expression.
Parameters:
Name Type Description name
string the name of the attribute to check. Returns:
true if there is EL in the attribute value or false if the value is static or if the attribute was not defined.- Type
- boolean
-
isUITag() → {boolean}
-
Get if the node is a UI tag with a type handler and renders content.
Returns:
true if a UI tag- Type
- boolean
-
toDebugString() → {String}
-
Get a debug string representation of this object instance. It is not guaranteed to be unique or of a standard format.
- Inherited From:
Returns:
a debug string representation of this object instance- Type
- String
-
toString() → {String}
-
Get a string representation of this object instance. It is not guaranteed to be unique or interesting.
- Inherited From:
Returns:
a string representation of this object instance- Type
- String
Non-public Methods
-
<protected> GetLazyArrayProperty(key, createIfNonexistent, otherInstance) → {Object}
-
Returns the specified array property. If createIfNonexistent is true and the property doesn't exist, it will be created, and returned.
Parameters:
Name Type Description key
Object the key for the property createIfNonexistent
boolean true if a new empty Array should be created and associated otherInstance
Array another object to use instead of this object - Inherited From:
Returns:
the property value associated with the given key- Type
- Object
-
<protected> GetLazyMapProperty(key, createIfNonexistent, otherInstance) → {Object}
-
Returns the specified Map property value. If createIfNonexistent is true and the property doesn't exist, an empty Object will be created, and returned.
Parameters:
Name Type Description key
Object the key for the property createIfNonexistent
boolean true if a new empty Object should be created and associated otherInstance
Object another object to use instead of this object - Inherited From:
Returns:
the property value associated with the given key- Type
- Object