OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

oracle.adfinternal.view.js.laf.dhtml.rich
Class AdfDomUtils

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDomUtils

public class AdfDomUtils
extends Object



Field Summary

private static Object
_HELP_WINDOW_NAME_COOKIE
private static Object
_LEGAL_ATTRIBUTES
private static Object
_LEGAL_ELEMENTS


Fields inherited from org.ecmascript.object.Object

constructor, prototype


Constructor Summary

public
AdfDomUtils()


Method Summary

public static Boolean
addCSSClassName(HTMLElement domElement, String className)
Adds a CSS className to the dom node if it doesn't already exist in the classNames list and returns true if the class name was added.
public static Object
addInlineStyle(Object element, Object newStyle, Object takesPrecedence)
public static Boolean
addOrRemoveCSSClassName(Boolean add, HTMLElement domElement, String className)
Convenient function to add or removes a CSS className from the dom node.
public static Object
canScroll(Object domNode, Object viewPortWidth, Object viewPortHeight)
private static Object
_cleanElementHtml(Object node)
public static Object
cleanHtml(Object domDocument, Object value)
static Object
__componentTextChanged(Object component, Object domElement, Object newValue, Object oldValue)
public static Boolean
containsCSSClassName(HTMLElement domElement, String className)
public static Object
fillEmptyCell(Object cell)
public static Object
findAccessKeyDom(Object domElement, Object accessKeyValue)
Find the accessKey SPAN within the given DOM element
public static Object
getAutoScrollDeltas(Object target, Object clientX, Object clientY)
Determines the number of pixels to autoscroll a target, given the current mouse location
public static HTMLElement
getChildElementByPosition(Object parentElement, Object type, Object position)
Get the element at the given position with same node type under parent element.
public static Object
getChildElements(Object parentElement)
Returns the child elements underneath the specified parent (only those with nodeType == 1).
public static HTMLElement
getCommonAncestor(HTMLElement nodeA, HTMLElement nodeB)
Gets the common ancestor node the number of nodes between the two given DOM nodes.
private static Number
_getCSSClassNameIndex(String currentClassName, String className)
Returns the index at which className appears within currentClassName with either a space or the beginning or end of currentClassName on either side.
public static HTMLElement
getDescendentElement(HTMLElement parentElement, String elementName, Number index)
Returns the descendent element underneath the specified parent element which matches the specified elementName, and is in the specified index.
public static Object
getElementAtPoint(Object element, Object pageX, Object pageY, Object closestMatch)
Return the element at a point in document coordinates, relative to a root.
public static Number
getElementDepth(HTMLElement element)
Gets the number of nodes deep that the element is in the DOM tree.
public static HTMLElement
getElementPosition(Object currentElement)
Get the position of current element with same node type under parent element.
public static Object
getElementsByClassName(Object domNode, Object className)
public static Object
getFirstChildElement(Object parentElement)
Returns the first child element underneath the specified parent
public static Object
getFirstChildNodeByType(Object parentElement, Object type)
Returns the first child node for a given type
public static HTMLElement
getFirstDescendentElement(HTMLElement parentElement, String elementName)
Returns the first descendent element underneath the specified parent element which matches the specified elementName.
public static HTMLElement
getFirstElementByTagName(Object domElement, Object tagName)
Returns the first element of a dom element with the given tagName.
public static HTMLElement
getFirstElementMatch(HTMLElement element, Boolean isExclusive, Function matchFunc, Object context)
Returns the first element inside of the specified element which matches some criteria defined by a match function.
public static Object
getFormElement(Object node)
Returns the form element for a given dom node.
public static Object
getFormElementValue(HTMLElement formElement, String formElementName)
Get the value for a form element
private static Object
_getHelpWindowName()
Method that will get the help window name.
public static Object
getLastChildElement(Object parentElement)
Returns the last child element underneath the specified parent
public static HTMLElement
getLastElementMatch(HTMLElement element, Boolean isExclusive, Function matchFunc, Object context)
Returns the last element inside of the specified element which matches some criteria defined by a match function.
public static Object
getMultiPartForm(Object actionForm)
Returns the form element, when input files with content are inside the form, or null.
public static HTMLElement
getNextElement(Object currentElement)
Find next sibling node.
public static HTMLElement
getNextElementMatch(HTMLElement element, HTMLElement contextElement, Boolean isExclusive, Function matchFunc, Object context)
Returns the next element after the specified element which matches some criteria defined by a match function.
public static Number
getNodeDistance(HTMLElement nodeA, HTMLElement nodeB)
Counts the number of nodes between the two given DOM nodes.
public static Object
getNodeInfo(Object domNode)
public static Number
getNonWhitespaceChildCount(HTMLElement parentElement)
Returns the number of displayed child elements and non-whitespace (e.g.
public static HTMLElement
getOnlyChildElement(HTMLElement parentElement)
Returns the only child element underneath the specified parent, or null if the parent has zero or more than one child element.
public static HTMLElement
getPreviousElement(Object currentElement)
Find previous sibling node.
public static HTMLElement
getPreviousElementMatch(HTMLElement element, HTMLElement contextElement, Function matchFunc, Object context)
Returns the previous element before the specified element which matches some criteria defined by a match function.
public static Object
getTabIndex(Object element)
Get the tabIndex for an element.
public static Object
handleTextChangeWithAccessKey(Object component, Object domElement, Object newValue)
Set the text of a domElement taking into account the component accessKey property.
public static Object
isAncestor(Object ancestorNode, Object node)
Checks to see if the "ancestorNode" is a ancestor of "node".
public static Object
isAncestorOrSelf(Object ancestorNode, Object node)
Checks to see if the "ancestorNode" is a ancestor of "node" or if they are the same.
public static Object
isInVisibleSubtree(Object node)
Tests whether DOM node is in a visible subtree.
public static Object
isNodeInDocumentHierarchy(Object domDocument, Object node)
Returns true if the node is in the domDocument's hierarchy
public static Object
isVisible(Object domElement)
Tests whether DOM node is visible.
public static Object
launchHelpWindow(Object url)
Method to launch the help window.
private static Object
_removeAccessKeyElement(Object domElement, Object accessKeyElement)
public static Object
removeAllNodes(HTMLElement element)
Removes all child nodes from the given element.
public static Boolean
removeCSSClassName(HTMLElement domElement, String className)
Removes a CSS className to the dom node if it existd in the classNames list and returns true if the class name was removed.
private static Object
_removeSiblings(Object domElement)
public static Object
scrollChildIntoViewY(Object childElement)
public static Object
scrollDownBy(Object domElement, Object deltaY)
public static Object
scrollRightBy(Object domElement, Object deltaX)
public static Object
setAccessibleState(Object component, Object state)
Sets the content of the component's "state" as rendered by RichRenderUtils.renderRoleState().
private static Object
_setHelpWindowName(Object windowName)
Method that will set the help window name.
public static Object
setScrollLeft(Object domElement, Object newScrollLeft)
Set the scrollLeft of the element, making sure that we don't scroll beyond the element's bounds
public static Object
setScrollTop(Object domElement, Object newScrollTop)
Set the scrollTop of the element, making sure that we don't scroll beyond the element's bounds
private static Object
_setTextAndAccessKeySpan(Object component, Object domElement, Object accessKeyValue, Object accessKeySpan, Object newValue)
private static Object
_setTextContent(Object domElement, Object value)
public static Object
setVisible(Object domElement, Object visible)
Hides/shows the domElement based on the boolean visible value.
public static Object
stripScripts(Object domElement)
Once the scripts are loaded they are no longer needed in the dom.
public static Object
suppressActionLinkBrowserContextMenu(AdfUIInputEvent componentContextMenuEvent)
Suppresses the browser's native context menu from being shown when the target of a HandleComponentContextMenu event is an action link (no href to load in a new tab/window).
public static Object
swapIcon(HTMLElement originalIcon, String iconKey)
This method looks in the lookAndFeel for the iconKey to get the new icon, and then it swaps out the original icon's dom and swaps in the new icon's dom.


Field Detail


_HELP_WINDOW_NAME_COOKIE

private static Object _HELP_WINDOW_NAME_COOKIE

_LEGAL_ATTRIBUTES

private static Object _LEGAL_ATTRIBUTES

_LEGAL_ELEMENTS

private static Object _LEGAL_ELEMENTS

Constructor Detail


AdfDomUtils

public AdfDomUtils()

Method Detail


addCSSClassName

public static Boolean addCSSClassName(HTMLElement domElement,
                                      String className)

Adds a CSS className to the dom node if it doesn't already exist in the classNames list and returns true if the class name was added.

Parameters:
domElement  -  DOM Element to add style class name to
className  -  Name of style class to add
Default value = null
Return:
Boolean - null true if the style class was added

addInlineStyle

public static Object addInlineStyle(Object element,
                                    Object newStyle,
                                    Object takesPrecedence)

Parameters:
element    
newStyle    
takesPrecedence    
Return:
Object

addOrRemoveCSSClassName

public static Boolean addOrRemoveCSSClassName(Boolean add,
                                              HTMLElement domElement,
                                              String className)

Convenient function to add or removes a CSS className from the dom node.

Parameters:
add  -  boolean value if we should do an add of a CSS className
domElement  -  DOM Element to remove style class name from
className  -  the CSS className which should be added or removed
Return:
Boolean - null true if the element's style class list changed

canScroll

public static Object canScroll(Object domNode,
                               Object viewPortWidth,
                               Object viewPortHeight)

Parameters:
domNode    
viewPortWidth    
viewPortHeight    
Return:
Object

_cleanElementHtml

private static Object _cleanElementHtml(Object node)

Parameters:
node    
Return:
Object

cleanHtml

public static Object cleanHtml(Object domDocument,
                               Object value)

Parameters:
domDocument    
value    
Return:
Object

__componentTextChanged

static Object __componentTextChanged(Object component,
                                      Object domElement,
                                      Object newValue,
                                      Object oldValue)

Parameters:
component    
domElement    
newValue    
oldValue    
Return:
Object

containsCSSClassName

public static Boolean containsCSSClassName(HTMLElement domElement,
                                           String className)

Parameters:
domElement  -  DOM Element to check for the style className
className  -  the CSS className to check for
Return:
Boolean - null true if the className is in the element's list of classes

fillEmptyCell

public static Object fillEmptyCell(Object cell)

Parameters:
cell    
Return:
Object

findAccessKeyDom

public static Object findAccessKeyDom(Object domElement,
                                      Object accessKeyValue)

Find the accessKey SPAN within the given DOM element

Parameters:
domElement    
accessKeyValue    
Return:
Object

getAutoScrollDeltas

public static Object getAutoScrollDeltas(Object target,
                                         Object clientX,
                                         Object clientY)

Determines the number of pixels to autoscroll a target, given the current mouse location

Parameters:
target    
clientX    
clientY    
Return:
Object

getChildElementByPosition

public static HTMLElement getChildElementByPosition(Object parentElement,
                                                    Object type,
                                                    Object position)

Get the element at the given position with same node type under parent element.

Parameters:
parentElement  -  the parent node
type    
position  -  the node position uder its parent element
Return:
HTMLElement - the position if currentElement is not null

getChildElements

public static Object getChildElements(Object parentElement)

Returns the child elements underneath the specified parent (only those with nodeType == 1).

Parameters:
parentElement    
Return:
Object

getCommonAncestor

public static HTMLElement getCommonAncestor(HTMLElement nodeA,
                                            HTMLElement nodeB)

Gets the common ancestor node the number of nodes between the two given DOM nodes.

Parameters:
nodeA  -  One of the DOM nodes to count nodes between
nodeB  -  One of the DOM nodes to count nodes between
Return:
HTMLElement - null or the common ancestor of the two nodes.

_getCSSClassNameIndex

private static Number _getCSSClassNameIndex(String currentClassName,
                                            String className)

Returns the index at which className appears within currentClassName with either a space or the beginning or end of currentClassName on either side. This function optimizes the runtime speed by not creating objects in most cases and assuming 1) It is OK to only check for spaces as whitespace characters 2) It is rare for the searched className to be a substring of another className, therefore if we get a hit on indexOf, we have almost certainly found our className 3) It is even rarer for the searched className to be a substring of more than one className, therefore, repeating the search from the end of the string should almost always either return our className or the original search hit from indexOf

Parameters:
currentClassName  -  Space-separated class name string to search
className  -  String to search for within currentClassName
Return:
Number - index of className in currentClassName, or -1 if it doesn't exist

getDescendentElement

public static HTMLElement getDescendentElement(HTMLElement parentElement,
                                               String elementName,
                                               Number index)

Returns the descendent element underneath the specified parent element which matches the specified elementName, and is in the specified index.

Parameters:
parentElement  -  The parent DOM element under which to search for the descendent.
elementName  -  The name of the descendent element to find (eg. "SPAN").
index  -  The numeric position of the descendent element, starting with "0". For clarification, 0 is the first position, 1 is the second position, etc.
Return:
HTMLElement - The descendent element if one is found, otherwise null.

getElementAtPoint

public static Object getElementAtPoint(Object element,
                                       Object pageX,
                                       Object pageY,
                                       Object closestMatch)

Return the element at a point in document coordinates, relative to a root.

Parameters:
element    
pageX    
pageY    
closestMatch    
Return:
Object

getElementDepth

public static Number getElementDepth(HTMLElement element)

Gets the number of nodes deep that the element is in the DOM tree.

Parameters:
element  -  the element whose depth is returned
Return:
Number - the number of nodes deep in the DOM tree

getElementPosition

public static HTMLElement getElementPosition(Object currentElement)

Get the position of current element with same node type under parent element.

Parameters:
currentElement  -  the current node
Return:
HTMLElement - the position if currentElement is not null

getElementsByClassName

public static Object getElementsByClassName(Object domNode,
                                            Object className)

Parameters:
domNode    
className    
Return:
Object

getFirstChildElement

public static Object getFirstChildElement(Object parentElement)

Returns the first child element underneath the specified parent

Parameters:
parentElement    
Return:
Object

getFirstChildNodeByType

public static Object getFirstChildNodeByType(Object parentElement,
                                             Object type)

Returns the first child node for a given type

Parameters:
parentElement    
type    
Return:
Object

getFirstDescendentElement

public static HTMLElement getFirstDescendentElement(HTMLElement parentElement,
                                                    String elementName)

Returns the first descendent element underneath the specified parent element which matches the specified elementName.

Parameters:
parentElement  -  The parent DOM element under which to search for the descendent.
elementName  -  The name of the descendent element to find (eg. "SPAN").
Return:
HTMLElement - The descendent element if one is found, otherwise null.

getFirstElementByTagName

public static HTMLElement getFirstElementByTagName(Object domElement,
                                                   Object tagName)

Returns the first element of a dom element with the given tagName.

Parameters:
domElement    
tagName    
Return:
HTMLElement - the DOM within the component related to scopedId

getFirstElementMatch

public static HTMLElement getFirstElementMatch(HTMLElement element,
                                               Boolean isExclusive,
                                               Function matchFunc,
                                               Object context)

Returns the first element inside of the specified element which matches some criteria defined by a match function.

Parameters:
element  -  element to begin searching from
isExclusive  -  Whether to include provided element in the search
matchFunc  -  A function which is used to test whether a particular element is a match. The function takes a single argument - the element to test - and returns a boolean indicating whether the element is a match.
context  -  optional context for the match function
Return:
HTMLElement - The first matching element if one is found, null otherwise.

getFormElement

public static Object getFormElement(Object node)

Returns the form element for a given dom node. This implementation walks up the DOM tree until it finds the form element. null is returned if the form element cannot be found.

Parameters:
node    
Return:
Object

getFormElementValue

public static Object getFormElementValue(HTMLElement formElement,
                                         String formElementName)

Get the value for a form element

Parameters:
formElement  -  the FORM element
formElementName  -  The name of the form element to get the value of.
Return:
Object

_getHelpWindowName

private static Object _getHelpWindowName()

Method that will get the help window name.

Return:
Object

getLastChildElement

public static Object getLastChildElement(Object parentElement)

Returns the last child element underneath the specified parent

Parameters:
parentElement    
Return:
Object

getLastElementMatch

public static HTMLElement getLastElementMatch(HTMLElement element,
                                              Boolean isExclusive,
                                              Function matchFunc,
                                              Object context)

Returns the last element inside of the specified element which matches some criteria defined by a match function.

Parameters:
element  -  element to begin searching from
isExclusive  -  Whether to include provided element in the search
matchFunc  -  A function which is used to test whether a particular element is a match. The function takes a single argument - the element to test - and returns a boolean indicating whether the element is a match.
context  -  optional context for the match function
Return:
HTMLElement - The last matching element if one is found, null otherwise.

getMultiPartForm

public static Object getMultiPartForm(Object actionForm)

Returns the form element, when input files with content are inside the form, or null.

Parameters:
actionForm    
Return:
Object

getNextElement

public static HTMLElement getNextElement(Object currentElement)

Find next sibling node.

Parameters:
currentElement  -  the current node
Return:
HTMLElement - the nex sibiling element if found or null if not

getNextElementMatch

public static HTMLElement getNextElementMatch(HTMLElement element,
                                              HTMLElement contextElement,
                                              Boolean isExclusive,
                                              Function matchFunc,
                                              Object context)

Returns the next element after the specified element which matches some criteria defined by a match function.

Parameters:
element  -  element to begin searching from
contextElement  -  The search is constrained to the subtree within the this element. If no context element is specified, the root document element is treated as the context element.
isExclusive  -  Whether to include the children of the provided element in the search.
Default value = false
matchFunc  -  A function which is used to test whether a particular element is a match. The function takes a single argument - the element to test - and returns a boolean indicating whether the element is a match.
context  -  optional context for the match function
Return:
HTMLElement - The next matching element if one is found, null otherwise.

getNodeDistance

public static Number getNodeDistance(HTMLElement nodeA,
                                     HTMLElement nodeB)

Counts the number of nodes between the two given DOM nodes.

Parameters:
nodeA  -  One of the DOM nodes to count nodes between
nodeB  -  One of the DOM nodes to count nodes between
Return:
Number - zero if equal, the number of nodes between them, or Number.POSITIVE_INFINITY if the nodes are not connected.

getNodeInfo

public static Object getNodeInfo(Object domNode)

Parameters:
domNode    
Return:
Object

getNonWhitespaceChildCount

public static Number getNonWhitespaceChildCount(HTMLElement parentElement)

Returns the number of displayed child elements and non-whitespace (e.g. pretty printed) text nodes underneath the specified parent. Comments are not counted either.

Parameters:
parentElement  -  the node whose children we want to count
Return:
Number - the number of child elements and non-whitespace text nodes

getOnlyChildElement

public static HTMLElement getOnlyChildElement(HTMLElement parentElement)

Returns the only child element underneath the specified parent, or null if the parent has zero or more than one child element.

Parameters:
parentElement  -  the node whose children we want to retrieve the sole child from
Return:
HTMLElement - the only child element or null if 0 or more than 1 displayed child is found

getPreviousElement

public static HTMLElement getPreviousElement(Object currentElement)

Find previous sibling node.

Parameters:
currentElement  -  the current node
Return:
HTMLElement - the previous sibling element if found or null if not

getPreviousElementMatch

public static HTMLElement getPreviousElementMatch(HTMLElement element,
                                                  HTMLElement contextElement,
                                                  Function matchFunc,
                                                  Object context)

Returns the previous element before the specified element which matches some criteria defined by a match function.

Parameters:
element  -  element to begin searching from
contextElement  -  The search is constrained to the subtree within the this element. If no context element is specified, the root document element is treated as the context element.
matchFunc  -  A function which is used to test whether a particular element is a match. The function takes a single argument - the element to test - and returns a boolean indicating whether the element is a match.
context  -  optional context for the match function
Return:
HTMLElement - The previous matching element if one is found, null otherwise.

getTabIndex

public static Object getTabIndex(Object element)

Get the tabIndex for an element. Returns undefined if the tab index has not been specified.

Parameters:
element  -  the element to get the property for
Return:
Object - the tab index, if specified otherwise undefined

handleTextChangeWithAccessKey

public static Object handleTextChangeWithAccessKey(Object component,
                                                   Object domElement,
                                                   Object newValue)

Set the text of a domElement taking into account the component accessKey property.

Parameters:
component  -  The component that the text changed for
domElement  -  The element that renders the text value for this component (not necessarily the root element for the component)
newValue  -  The new text value for the component
Return:
Object - true if the value was able to be set

isAncestor

public static Object isAncestor(Object ancestorNode,
                                Object node)

Checks to see if the "ancestorNode" is a ancestor of "node".

Parameters:
ancestorNode    
node    
Return:
Object

isAncestorOrSelf

public static Object isAncestorOrSelf(Object ancestorNode,
                                      Object node)

Checks to see if the "ancestorNode" is a ancestor of "node" or if they are the same.

Parameters:
ancestorNode    
node    
Return:
Object

isInVisibleSubtree

public static Object isInVisibleSubtree(Object node)

Tests whether DOM node is in a visible subtree. Returns false if a null DOM node is specified.

Parameters:
node    
Return:
Object

isNodeInDocumentHierarchy

public static Object isNodeInDocumentHierarchy(Object domDocument,
                                               Object node)

Returns true if the node is in the domDocument's hierarchy

Parameters:
domDocument    
node    
Return:
Object

isVisible

public static Object isVisible(Object domElement)

Tests whether DOM node is visible. Returns false if a null DOM node is specified.

Parameters:
domElement    
Return:
Object

launchHelpWindow

public static Object launchHelpWindow(Object url)

Method to launch the help window. RichRenderUtils.renderHelpIcon will generate onclick JavaScript that will call this method when the help icon is pressed.

Parameters:
url  -  The url that should be displayed in the help window.
Return:
Object

_removeAccessKeyElement

private static Object _removeAccessKeyElement(Object domElement,
                                              Object accessKeyElement)

Parameters:
domElement    
accessKeyElement    
Return:
Object

removeAllNodes

public static Object removeAllNodes(HTMLElement element)

Removes all child nodes from the given element.

Parameters:
element  -  the DOM element whose children will be removed
Return:
Object

removeCSSClassName

public static Boolean removeCSSClassName(HTMLElement domElement,
                                         String className)

Removes a CSS className to the dom node if it existd in the classNames list and returns true if the class name was removed.

Parameters:
domElement  -  DOM Element to remove style class name from
className  -  Name of style class to remove
Default value = null
Return:
Boolean - null true if the style class was removed

_removeSiblings

private static Object _removeSiblings(Object domElement)

Parameters:
domElement    
Return:
Object

scrollChildIntoViewY

public static Object scrollChildIntoViewY(Object childElement)

Parameters:
childElement    
Return:
Object

scrollDownBy

public static Object scrollDownBy(Object domElement,
                                  Object deltaY)

Parameters:
domElement    
deltaY    
Return:
Object

scrollRightBy

public static Object scrollRightBy(Object domElement,
                                   Object deltaX)

Parameters:
domElement    
deltaX    
Return:
Object

setAccessibleState

public static Object setAccessibleState(Object component,
                                        Object state)

Sets the content of the component's "state" as rendered by RichRenderUtils.renderRoleState(). It is important to note that this API completly replaces the content of the state. So if there are multiple states (like submenu and selected) then the state parameter must contain all of these states. Otherwise some of your state information may be lost. The element that is used for this replacement is assumed to be a "state" subId of the current component. Like the renderRoleState() function, this function will add whitespace around the state information.

Parameters:
component    
state    
Return:
Object

_setHelpWindowName

private static Object _setHelpWindowName(Object windowName)

Method that will set the help window name. This is implemented as a cookie, with no expiry so that it becomes a session cookie (ie it will be deleted when the session disappears.

Parameters:
windowName    
Return:
Object

setScrollLeft

public static Object setScrollLeft(Object domElement,
                                   Object newScrollLeft)

Set the scrollLeft of the element, making sure that we don't scroll beyond the element's bounds

Parameters:
domElement    
newScrollLeft    
Return:
Object

setScrollTop

public static Object setScrollTop(Object domElement,
                                  Object newScrollTop)

Set the scrollTop of the element, making sure that we don't scroll beyond the element's bounds

Parameters:
domElement    
newScrollTop    
Return:
Object

_setTextAndAccessKeySpan

private static Object _setTextAndAccessKeySpan(Object component,
                                               Object domElement,
                                               Object accessKeyValue,
                                               Object accessKeySpan,
                                               Object newValue)

Parameters:
component    
domElement    
accessKeyValue    
accessKeySpan    
newValue    
Return:
Object

_setTextContent

private static Object _setTextContent(Object domElement,
                                      Object value)

Parameters:
domElement    
value    
Return:
Object

setVisible

public static Object setVisible(Object domElement,
                                Object visible)

Hides/shows the domElement based on the boolean visible value. The domElement must be non-null.

Parameters:
domElement    
visible    
Return:
Object

stripScripts

public static Object stripScripts(Object domElement)

Once the scripts are loaded they are no longer needed in the dom.

Parameters:
domElement    
Return:
Object

suppressActionLinkBrowserContextMenu

public static Object suppressActionLinkBrowserContextMenu(AdfUIInputEvent componentContextMenuEvent)

Suppresses the browser's native context menu from being shown when the target of a HandleComponentContextMenu event is an action link (no href to load in a new tab/window).

Parameters:
componentContextMenuEvent  -  The component context menu event
Return:
Object

swapIcon

public static Object swapIcon(HTMLElement originalIcon,
                              String iconKey)

This method looks in the lookAndFeel for the iconKey to get the new icon, and then it swaps out the original icon's dom and swaps in the new icon's dom. Call this method from component's mouseover or mouseout event. It does not work well with mousedown events -- it causes the mouseclick event to get lost.

Parameters:
originalIcon  -  the original icon dom element that you want swapped out. The originalIcon must have a parent node in order to be replaced.
iconKey  -  Key used to identify this icon
Return:
Object

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Generated on 2011.04.27 02:28 UTC
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.