Namespace: amx

Oracle® Fusion Middleware JSDoc Reference for Oracle Mobile Application Framework
2.1.3.0.0

E59895-03

QuickNav

adf.mf.api.amx

Classes

ActionEvent
AmxNode
AmxNodeUpdateArguments
AmxTag
DomEvent
MoveEvent
RangeChangeEvent
SelectionEvent
TypeHandler
ValueChangeEvent
VisitContext

Namespaces

AmxNodeChangeResult
AmxNodeCreateChildrenNodesResult
AmxNodeNotifications
AmxNodeStates
VisitResult

Methods

<static> acceptEvent() → {Boolean}

Determines whether an event can be processed.
Returns:
whether it is safe to proceed with event processing (not in the middle of a transition)
Type
Boolean

<static> addBubbleEventListener(domNode, eventType, listener, eventData)

Register a bubble event listener (e.g. tap, taphold, keydown, touchstart, touchmove, touchend, focus, blur, resize, etc.). It is important to note that web browsers do not support all event types on all DOM nodes. Refer to browser documentation for specifics. The eventData is optional and serves as extra data to be made available to your listener function.
Parameters:
Name Type Description
domNode DOMNode the target element for this event
eventType String the name of the event to listen for
listener Function the function that will be invoked when the specified element encounters this event (with a parameter that is the DOM event object)
eventData Object extra event data that will be made available on the "data" member of the event object

<static> addDragListener(domNode, playload, eventData)

Allow a DOM node to trigger AMX drag events. The payload object defines 3 member functions: "start", "drag", "end" where each one's first parameter is the DOM event, the second parameter is a "dragExtra" object with members: "eventSource" (the DOM event source), "pageX" (the x coordinate of the event, "pageY" the y coordinate of the event, "startPageX" (the original pageX), "startPageY" (the original pageY), "deltaPageX" (the change in pageX), "deltaPageY" (the change in pageY), "originalAngle" (if available, it will be the original angle of the drag in degrees where 0 degrees as east, 90 is north, -90 is south, 180 is west), and modifiable member flags: "preventDefault", and "stopPropagation".
Parameters:
Name Type Description
domNode DOMNode the DOM node that can trigger the drag event
playload Object the specifics about the drag event
eventData Object the extra event data

<static> addMessage(severity, summary, detail, clientId)

Adds a message to the message box (and shows it if it isn't already showing.
Parameters:
Name Type Description
severity string the severity of the message (e.g. "fatal", "error", "warning", "confirmation", "info")
summary string the short title of the message (e.g. exception message)
detail string null or the optional long detail of the message (e.g. stack trace)
clientId string null or the optional client ID that uniquely identify which component instance the message should be associated with

<static> applyRequiredMarker(amxNode, field)

Rendrer would call this function to change the style of showRequired attribute
Parameters:
Name Type Description
amxNode Object This is the amxNode object
field Object This object is returned from createField method and must have a "fieldRoot" property
See:
  • See also the definition of amx.createField method inside amx-commonTags.js

<static> buildRelativePath(url) → {string}

Builds the relative path based to the specified resource assuming it is relative to the current AMX page. If there is a protocol on the resource then it is assumed to be an absolute path and left unmodified.
Parameters:
Name Type Description
url string the location of the specified resource
Returns:
the resolved path
Type
string

<static> bulkLoadProviders(treeNodeIterator, startingPoint, numberOfRows, success, failed)

Bulk load a set of providers so they cached and accessibly locally.
Parameters:
Name Type Description
treeNodeIterator Object is the tree node iterator to load the provider from
startingPoint number to load from, typically 0 but recursive calls will change those to be page/set boundary markers
numberOfRows number to load up to the number of providers in the collection. Represents the total number of rows, not relative to the starting point
success function the callback to invoke when all the providers have been loaded
failed function the callback to invoke on error

<static> createIterator(the) → {Object}

Create an iterator that will support either a JavaScript array of objects or iterator over a tree node iterator (collection model).
Parameters:
Name Type Description
the Array | TreeNodeIterator items to iterate over
Returns:
iterator object with "next", "hasNext", and "isTreeNodeIterator" functions where "next" will return undefined when no more objects are available.
Type
Object

<static> displayAmxPage(amxPageName) → {Object}

Load and display an AMX page.
Parameters:
Name Type Description
amxPageName Object the name of the page to load
Returns:
promise object that is resolved once the page has been rendered. Currently resolved with the jQuery object for the view container element
Type
Object

<static> emptyHtmlElement(element)

Empty an HTML element by removing children DOM nodes and calling adf.mf.api.amx.removeDomNode on each of the children nodes.
Parameters:
Name Type Description
element HTMLElement the HTML element to empty

<static> enableAmxEvent(amxNode, domNode, eventType)

Allow a DOM node to trigger custom AMX events for amx:showPopupBehavior, amx:setPropertyListener, etc. like "tapHold" and the "swipe".
Parameters:
Name Type Description
amxNode adf.mf.api.amx.AmxNode the AmxNode that owns the DOM for the event
domNode DOMNode the DOM node that can trigger the event
eventType String the type of event being associated; either "tapHold" or "swipe"

<static> enableScrolling()

Enable scrolling for the given element. This operation may append a style class to the element so ensure that you do not overwrite the element class name after calling this API.

<static> getClientState()

Deprecated:
  • Use amxNode.getClientState instead.

    <static> getEventDebugString(element, shortenLimit) → {String}

    Generate a debugging string for events associated with a given HTML element.
    Parameters:
    Name Type Description
    element HTMLElement the HTML element whose event detail will be generated
    shortenLimit Number optional number that can change the limit to the length of debug listener or data text
    Returns:
    a debugging string representing details about events associated with the given HTML element
    Type
    String

    <static> getPageRootNode() → {adf.mf.api.amx.AmxNode|null}

    Get the AmxNode root node for the currently loaded page.
    Returns:
    the amx node or null if the page is not loaded.
    Type
    adf.mf.api.amx.AmxNode | null

    <static> getVolatileState()

    Deprecated:
    • Use amxNode.getVolatileState instead.

      <static> hideLoadingIndicator()

      Hides one instance of the loading indicator.

      <static> hideLoadingIndicatorOnlyIfFirstTime()

      This is a special case for clearing the loading/busy indicator. On the initial load of the feature we set the style on the DIV to show the loading indicator. This means there will be no call to hiding and instead call this function. Unfortunalty this function will get called multiple times based on where this call had to put. This means we need to make sure this is only called the once and we rely on the attribute being set for this.

      <static> invokeEl(expression, params, returnType, paramTypes, successCallback, failureCallback)

      Utility similar to adf.mf.el.invoke() for invoking an EL method but will refrain execution in environments such as design time previews.
      Parameters:
      Name Type Description
      expression string the EL method to invoke
      params Array.<string> an array of parameters to send to the method
      returnType string null or the return type for the method
      paramTypes Array.<string> an array of types for each parameter in the params array
      successCallback function optional function to call when the method is invoked
      failureCallback function optional function to call if something failed while attempting to invoke the method

      <static> isValueFalse()

      Returns true if the value is boolean false or string "false". If undefined, returns false.

      <static> isValueTrue()

      Returns true if the value is boolean true or string "true". If undefined, returns false.

      <static> markNodeForUpdate(args)

      Function for TypeHandlers to notify the framework of a state change to an AmxNode that requires the AmxNode hierarchy to be updated at that node and below. If a custom createChildrenNodes method exists on the TypeHandlers, it will be called again for these AmxNode. This will allow AmxNode that stamp their children to add new stamps due to a user change. The refresh method will be called on the AmxNode with the provided properties if the AmxNode is ready to render. If the AmxNode is not ready to render, the framework will wait for any EL to be resolved and the refresh method will be called once all the data is available.
      Parameters:
      Name Type Description
      args adf.mf.api.amx.AmxNodeUpdateArguments the change arguments

      <static> processAmxEvent(amxNode, amxEventType, attributeValueName, newValue, amxEvent, successfulCallback, failureCallback)

      Process an AMX Event. Change the value if attributeValueName is defined, process the appropriate setPropertyListener and actionListener sub tags and then process the [amxEventType]Listener attribute. For valueChange events, the attribute must have already been registered on the node as the input value. Use getInputValueAttribute on the type handler of the AMX node to return the attribute name that accepts the input value for which value changes occur.
      Parameters:
      Name Type Argument Description
      amxNode adf.mf.api.amx.AmxNode The node to process the event on.
      amxEventType string String that represents the event type that triggered the call.
      attributeValueName string | undefined The name of the attribute whose value will be changed (or undefined if not applicable).
      newValue string | undefined The new value to be applied to the attribute sent in (or undefined if not applicable).
      amxEvent Object The new AmxEvent being queued.
      successfulCallback function <optional>
      An optional function to invoke once the event has been successfully processed.
      failureCallback function <optional>
      Optional callback function if the processing of the event fails

      <static> removeBubbleEventListener(domNode, eventType, listener, eventData)

      Unregister a bubble event listener that was added via adf.mf.api.amx.addBubbleEventListener. If eventType is not specified, all listeners registered by the add function will be removed. If listener is not specified, all listeners registered by the add function of the given type will be removed.
      Parameters:
      Name Type Description
      domNode DOMNode the target element for which an event listener was previously added
      eventType String the name of the event
      listener Function the event listener function
      eventData Object the extra event data

      <static> removeDomNode(domNode)

      Remove a DOM node (and its children) but first removes event listeners that were added via adf.mf.api.amx.addBubbleEventListener and ensures any components inside it get cleaned up properly.
      Parameters:
      Name Type Description
      domNode DOMNode the DOM node to remove

      <static> renderNode(node)

      Render a amxNode or the xmlNode. If it is an xmlNode, then, it will be processed before rendering it.
      Parameters:
      Name Type Description
      node xmlNode | adf.mf.api.amx.AmxNode The node for a given element. Can be the process AMXNode or the XMLNode.
      Returns:
      the rendered jQuery node or null if nothing rendered

      <static> renderSubNodes()

      Deprecated:
      • Yes

      <static> setClientState()

      Deprecated:
      • Use amxNode.setClientState instead.

        <static> setVolatileState()

        Deprecated:
        • Use amxNode.setVolatileState instead.

          <static> showLoadingIndicator(failSafeDuration, failSafeClientHandler)

          This function shows the busy indicator. You are responsible for hiding the indicator or else it will be shown longer than necessary. First consider whether you really need to use this API. This function is generally targeted for component developers. If you are an app developer, you might simply need to use amx:loadingIndicatorBehavior tag in your page with its failSafeDuration attribute.
          Parameters:
          Name Type Description
          failSafeDuration number The approximate duration (non-negative integer in milliseconds) that the framework will wait between showing and hiding the loading indicator (assuming some other trigger has not already shown the indicator); if null or not specified, 10000 (10 seconds) will be used instead.
          failSafeClientHandler function() : string The optional JavaScript function that will be invoked when the failSafeDuration has been reached. This function can be used to decide how to proceed. This function must return a String that is one of these values: (a) "hide" (meaning just hide the indicator like the default fail-safe), (b) "repeat" (meaning restart the timer for another duration where the function may get invoked again), or (c) "freeze" (meaning keep the indicator up and wait indefinitely; the page may become stuck in a frozen state until restarted).

          <static> triggerBubbleEventListener(eventTarget, eventName)

          Triggers an HTML bubble event listener (e.g. tap, taphold, keydown, touchstart, touchmove, touchend, focus, blur, resize, etc.). It is important to note that web browsers do not support all event types on all DOM nodes. Refer to browser documentation for specifics.
          Parameters:
          Name Type Description
          eventTarget DOMNode the target DOM node for this event
          eventName String the name of the HTML event to listen for

          <static> validate(domNode, successCallback)

          Use this when performing an operation like a navigation where you would want to prevent navigating when there are unsatisfied validators (required or AMX validationBehavior). The successCallback will be invoked if allowed to proceed.
          Parameters:
          Name Type Description
          domNode DOMNode the element whose associated validation is to be tested
          successCallback function the function to invoke if the event should be accepted