String
|
getId
|
None
|
Gets the unique identifier for this AmxNode . This value contributes to the ID on the root DOM element.
|
adf.mf.api.amx.AmxTag
|
getTag
|
None
|
Gets the AmxTag that created this AmxNode .
|
adf.mf.api.amx.TypeHandler
|
getTypeHandler
|
None
|
Gets the TypeHandler object associated with this AmxNode .
|
void
|
setClientState
|
Object payloadJsonObject
|
Stores or replaces the client state for the specified AmxNode ID.
Type handlers should call this function whenever a state change happens (for example, something that should be cached so that when the user navigates to a new page and then comes back, it would be restored like a scroll position). That said, it is not always feasible to detect when a state change happens so you may need to update the state for your component just before the view is going to be discarded. There are two possible scenarios for which you need to account:
-
refresh : for redrawing pieces of the DOM structure (within the same view).
-
preDestroy : for navigating to a new view and later navigating back.
The payloadJsonObject is the client state data to store for the lifetime of this view instance.
|
Object
|
getClientState
|
None
|
Gets the payloadJsonObject that was previously stored through the setClientState function during this view instance (undefined if not available).
|
void
|
setVolatileState
|
Object payloadJsonObject
|
Stores or replaces the client state for the specified AmxNode ID. Type handlers should call this function whenever a volatile state change happens (for example, something that should be forgotten when navigating to a new MAF AMX page but should be kept in case a component is redrawn).
The payloadJsonObject is the volatile state data to store until navigation occurs.
|
Object
|
getVolatileState
|
None
|
Gets the payloadJsonObject that was previously stored through the setVolatileState function since the last navigation (undefined if not available).
|
Object
|
getConverter
|
None
|
Get the converter, if applicable, for this AmxNode .
|
void
|
setConverter
|
Object converter
|
Set the converter for this AmxNode .
|
String
|
storeModifyableEl
|
String nameOfTheAttribute
|
For an attribute, creates and stores an EL expression that may be used to set EL values into the model.
The value is context-insensitive and may be used to set a value at any time. Common use is to set a value based on user interaction.
This function may be called by type handlers.
Returns null if the subject attribute is not bound to an EL value.
|
Object
|
getStampKey
|
None
|
Gets the stamp key for the AmxNode . The stamp key identifies AmxNode instances that are produced inside of iterating containers.
This is provided by the parent AmxNode . An example tag that uses stamp keys is the amx:iterator tag.
Returns null if the AmxNode is not stamped.
|
Array<String>
|
getDefinedAttributeNames
|
None
|
Gets a list of the attribute names that have been defined for this node.
|
Object
|
getAttribute
|
String name
|
Gets an attribute value for the attribute of the given name.
Return value may be null .
Returns undefined if the attribute is not set or is not yet loaded.
|
void
|
setAttributeResolvedValue
|
String name,
Object value
|
Used by the type handler or MAF to store the attribute value for an attribute onto the AmxNode .
This function does not update the model.
|
void
|
setAttribute
|
String name,
String value
|
Sets the value of an attribute on the model.
This value is sent to the Java side to update the EL value. The value on the AmxNode is not updated by this call. Instead, it is expected that a data change event will update the AmxNode .
|
Boolean
|
isAttributeDefined
|
String name
|
Checks whether the attribute was defined by the user.
|
adf.mf.api.amx.AmxNode
|
getParent
|
None
|
Gets either the parent AmxNode or null if at the top level.
|
void
|
addChild
|
adf.mf.api.amx.AmxNode child,
String facetName
|
Adds a child AmxNode to this AmxNode .
The facetName should be null if the child does not belong in a facet.
|
Boolean
|
removeChild
|
adf.mf.api.amx.AmxNode child
|
Removes a child AmxNode from this AmxNode .
Note that the child is removed from the hierarchy, but not the DOM for it. It is up to the caller to remove the DOM.
This is to allow type handlers to handle animation and other transitions when DOM is replaced.
Returns whether or not the child was found and removed.
|
Boolean
|
replaceChild
|
adf.mf.api.amx.AmxNode oldChild,
adf.mf.api.amx.AmxNode newChild
|
Replaces an existing child with another child.
Returns whether or not the old one was found and replaced.
|
Array<adf.mf.api.amx.AmxNode>
|
getChildren
|
String facetName,
Object stampKey
|
Gets children AmxNodes .
The two parameters are optional. The facetName can be null to get the non-facet children.
Returns an empty array if no children exist or if there are no children for the given qualifiers.
|
Map<String, Array<adf.mf.api.amx.AmxNode>>
|
getFacets
|
Object stampKey
|
Gets all of the facets of the AmxNode .
The stampKey is optional; if provided, it retrieves the facet AmxNode instances for a given stamp key.
|
Boolean
|
visit
|
adf.mf.api.amx.VisitContext visitContext,
Function visitCallback
|
Performs a tree visitation starting from this AmxNode .
The visitCallback function should accept the visitContext and the AmxNode as arguments.
Returns whether or not the visitation is complete and should not continue.
|
Boolean
|
visitChildren
|
adf.mf.api.amx.VisitContext visitContext,
Function visitCallback
|
Performs a tree visitation starting from the children of this AmxNode .
The visitCallback function should accept the visitContext and the AmxNode as arguments.
Returns whether the visitation is complete and should not continue.
|
Boolean
|
visitStampedChildren
|
Object stampKey,
Array<String> facetNamesToInclude,
Function filterCallback,
adf.mf.api.amx.VisitContext visitContext,
Function visitCallback
|
Convenience function for type handlers that stamp their children to visit the children AmxNode from inside of a custom visitChildren function.
When facetNamesToInclude is empty, no facets are processed for this stamp. When facetNamesToInclude is null , all facets are processed for this stamp.
The filterCallback may be null . The filterCallback must return a Boolean of true , meaning the tag will be used to create children, or false , meaning the tag will not be processed.
The visitCallback should accept the visitContext and AmxNode as arguments.
Returns whether or not the visitation is complete and should not continue.
|
Array<adf.mf.api.amx.AmxNode>
|
getRenderedChildren
|
String facetName,
Object stampKey
|
Gets the rendered children of the AmxNode .
The facetName indicates from which facet to retrieve the rendered children, or null for the non-facet children.
If the stampKey is provided, it retrieves the children AmxNode instances for a given stamp key.
Returns the children that should be rendered for the given stamp key. It flattens any components that can be flattened (flattenable) and does not return any non-rendered ones.
|
Boolean
|
isFlattenable
|
None
|
Determines whether or not the AmxNode is flattenable.
Note that a flattened AmxNode might not have any behavior related to rendering: a type handler for a flattened AmxNode can only control child node creation and visiting, but cannot influence rendering.
|
adf.mf.api.amx.AmxNodeStates
|
getState
|
None
|
Gets the current state of the AmxNode (as a constant value from adf.mf.api.amx.AmxNodeStates ).
|
void
|
setState
|
state
|
Moves the adf.mf.api.amx.AmxNodeStates state of the AmxNode . Should only be called by MAF or the AmxNode 's type handler.
|
HTMLElement
|
render
|
None
|
Renders the AmxNode .
Returns the root element rendered or null if the child is not rendered or if there is no type handler for this AmxNode .
|
Array<HTMLElement>
|
renderDescendants
|
String facetName,
Object key
|
Renders the subnodes of this AmxNode (if applicable, it flattens to the nearest descendant).
If facetName is not null , it renders the children of that facet. If facetName is null , the non-facet children are rendered.
The optional key is used for rendering the children AmxNode instances for that stamping key.
Returns an array of the root elements for each subNode .
|
void
|
rerender
|
None
|
Rerenders the AmxNode .
|
Boolean
|
isRendered
|
None
|
Checks the state of the AmxNode to see whether or not it should be rendered.
The AmxNode is considered to be renderable if it is in the ABLE_TO_RENDER, RENDERED or PARTIALLY_RENDERED state.
|
void
|
refresh
|
adf.mf.api.amx.AmxAttributeChange attributeChanges,
adf.mf.api.amx.AmxDescendentChanges descendentChanges
|
Refreshes the DOM of an AmxNode .
This method is called after the updateChildren method and should be implemented by type handlers that wish to update their DOM in response to a change.
|
void
|
createStampedChildren
|
Object stampKey,
Array<String> facetNamesToInclude,
Function filterCallback
|
Convenience function for type handlers that stamp their children to create child AmxNode instances from inside of a custom createChildrenNodes function.
This function creates children for any UI tags.
If facetNamesToInclude is empty, the facets are not processed for this stamp. If facetNamesToInclude is null , all the facets are processed. If the facetNamesToInclude includes a null value inside the array, children for non-facet tags are created.
The filterCallback is an optional function to filter the children that are created. The filterCallback function is invoked with the AmxNode , the stampKey , the child tag, and the facet name (or null for non-facets). The filterCallback function must return a boolean . If true , the tag is used to create children; if false , the tag is not processed.
|