JavaScript API Reference for Oracle ADF Faces
|
Oracle Fusion Middleware JavaScript API Reference for Oracle ADF Faces 11g Release 1 (11.1.1) E12046-05 |
||||||||
| PREV NEXT | FRAMES NO FRAMES Warning: private items are visible | ||||||||
org.ecmascript.object.Object | +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDomUtils
public class AdfDomUtils extends Object
Field Summary |
|
|---|---|
private static Object |
|
private static Object |
|
private static Object |
|
Fields inherited from org.ecmascript.object.Object |
constructor, prototype |
Constructor Summary |
|
|---|---|
public |
|
Method Summary |
|
|---|---|
public static Boolean |
|
public static Object |
|
public static Boolean |
|
public static Object |
|
private static Object |
|
public static Object |
|
static Object |
|
public static Boolean |
|
public static Object |
|
public static Object |
|
public static Object |
|
public static HTMLElement |
|
public static Object |
|
public static HTMLElement |
|
private static Number |
|
public static HTMLElement |
|
public static Object |
|
public static Number |
|
public static HTMLElement |
|
public static Object |
|
public static Object |
|
public static Object |
|
public static HTMLElement |
|
public static HTMLElement |
|
public static HTMLElement |
|
public static Object |
|
private static Object |
|
public static Object |
|
public static HTMLElement |
|
public static Object |
|
public static HTMLElement |
|
public static HTMLElement |
|
public static Number |
|
public static Object |
|
public static Number |
|
public static HTMLElement |
|
public static HTMLElement |
|
public static HTMLElement |
|
public static Object |
|
public static Object |
|
public static Object |
|
public static Object |
|
public static Object |
|
public static Object |
|
public static Object |
|
public static Object |
|
private static Object |
|
public static Object |
|
public static Boolean |
|
private static Object |
|
public static Object |
|
public static Object |
|
public static Object |
|
public static Object |
|
private static Object |
|
public static Object |
|
public static Object |
|
private static Object |
|
private static Object |
|
public static Object |
|
public static Object |
|
public static Object |
|
public static Object |
|
Field Detail |
|---|
private static Object _HELP_WINDOW_NAME_COOKIEprivate static Object _LEGAL_ATTRIBUTESprivate static Object _LEGAL_ELEMENTS
Constructor Detail |
|---|
public AdfDomUtils()
Method Detail |
|---|
public static Boolean addCSSClassName(HTMLElement domElement,
String className)true if the class name was added.domElement |
- | DOM Element to add style class name to |
className |
- | Name of style class to add
Default value = null
|
Boolean - null true if the style class was addedpublic static Object addInlineStyle(Object element,
Object newStyle,
Object takesPrecedence)element |
||
newStyle |
||
takesPrecedence |
Objectpublic static Boolean addOrRemoveCSSClassName(Boolean add,
HTMLElement domElement,
String className)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 |
Boolean - null true if the element's style class list changedpublic static Object canScroll(Object domNode,
Object viewPortWidth,
Object viewPortHeight)domNode |
||
viewPortWidth |
||
viewPortHeight |
Objectprivate static Object _cleanElementHtml(Object node)node |
Objectpublic static Object cleanHtml(Object domDocument,
Object value)domDocument |
||
value |
Objectstatic Object __componentTextChanged(Object component,
Object domElement,
Object newValue,
Object oldValue)component |
||
domElement |
||
newValue |
||
oldValue |
Objectpublic static Boolean containsCSSClassName(HTMLElement domElement,
String className)domElement |
- | DOM Element to check for the style className |
className |
- | the CSS className to check for |
Boolean - null true if the className is in the element's list of classespublic static Object fillEmptyCell(Object cell)cell |
Objectpublic static Object findAccessKeyDom(Object domElement,
Object accessKeyValue)domElement |
||
accessKeyValue |
Objectpublic static Object getAutoScrollDeltas(Object target,
Object clientX,
Object clientY)target |
||
clientX |
||
clientY |
Objectpublic static HTMLElement getChildElementByPosition(Object parentElement,
Object type,
Object position)parentElement |
- | the parent node |
type |
||
position |
- | the node position uder its parent element |
HTMLElement - the position if currentElement is not nullpublic static Object getChildElements(Object parentElement)parentElement |
Objectpublic static HTMLElement getCommonAncestor(HTMLElement nodeA,
HTMLElement nodeB)nodeA |
- | One of the DOM nodes to count nodes between |
nodeB |
- | One of the DOM nodes to count nodes between |
HTMLElement - null or the common ancestor of the two nodes.private static Number _getCSSClassNameIndex(String currentClassName,
String className)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 indexOfcurrentClassName |
- | Space-separated class name string to search |
className |
- | String to search for within currentClassName |
Number - index of className in currentClassName, or -1 if it doesn't existpublic static HTMLElement getDescendentElement(HTMLElement parentElement,
String elementName,
Number index)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. |
HTMLElement - The descendent element if one is found, otherwise null.public static Object getElementAtPoint(Object element,
Object pageX,
Object pageY,
Object closestMatch)element |
||
pageX |
||
pageY |
||
closestMatch |
Objectpublic static Number getElementDepth(HTMLElement element)element |
- | the element whose depth is returned |
Number - the number of nodes deep in the DOM treepublic static HTMLElement getElementPosition(Object currentElement)currentElement |
- | the current node |
HTMLElement - the position if currentElement is not nullpublic static Object getElementsByClassName(Object domNode,
Object className)domNode |
||
className |
Objectpublic static Object getFirstChildElement(Object parentElement)parentElement |
Objectpublic static Object getFirstChildNodeByType(Object parentElement,
Object type)parentElement |
||
type |
Objectpublic static HTMLElement getFirstDescendentElement(HTMLElement parentElement,
String elementName)parentElement |
- | The parent DOM element under which to search for the descendent. |
elementName |
- | The name of the descendent element to find (eg. "SPAN"). |
HTMLElement - The descendent element if one is found, otherwise null.public static HTMLElement getFirstElementByTagName(Object domElement,
Object tagName)domElement |
||
tagName |
HTMLElement - the DOM within the component related to scopedIdpublic static HTMLElement getFirstElementMatch(HTMLElement element,
Boolean isExclusive,
Function matchFunc,
Object context)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 |
HTMLElement - The first matching element if one is found, null otherwise.public static Object getFormElement(Object node)node |
Objectprivate static Object _getHelpWindowName()Objectpublic static Object getLastChildElement(Object parentElement)parentElement |
Objectpublic static HTMLElement getLastElementMatch(HTMLElement element,
Boolean isExclusive,
Function matchFunc,
Object context)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 |
HTMLElement - The last matching element if one is found, null otherwise.public static Object getMultiPartForm(Object actionForm)actionForm |
Objectpublic static HTMLElement getNextElement(Object currentElement)currentElement |
- | the current node |
HTMLElement - the nex sibiling element if found or null if notpublic static HTMLElement getNextElementMatch(HTMLElement element,
HTMLElement contextElement,
Boolean isExclusive,
Function matchFunc,
Object context)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 |
HTMLElement - The next matching element if one is found, null otherwise.public static Number getNodeDistance(HTMLElement nodeA,
HTMLElement nodeB)nodeA |
- | One of the DOM nodes to count nodes between |
nodeB |
- | One of the DOM nodes to count nodes between |
Number - zero if equal, the number of nodes between them, or Number.POSITIVE_INFINITY if the nodes are not connected.public static Object getNodeInfo(Object domNode)domNode |
Objectpublic static Number getNonWhitespaceChildCount(HTMLElement parentElement)parentElement |
- | the node whose children we want to count |
Number - the number of child elements and non-whitespace text nodespublic static HTMLElement getOnlyChildElement(HTMLElement parentElement)parentElement |
- | the node whose children we want to retrieve the sole child from |
HTMLElement - the only child element or null if 0 or more than 1 displayed child is foundpublic static HTMLElement getPreviousElement(Object currentElement)currentElement |
- | the current node |
HTMLElement - the previous sibling element if found or null if notpublic static HTMLElement getPreviousElementMatch(HTMLElement element,
HTMLElement contextElement,
Function matchFunc,
Object context)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 |
HTMLElement - The previous matching element if one is found, null otherwise.public static Object getTabIndex(Object element)element |
- | the element to get the property for |
Object - the tab index, if specified otherwise undefinedpublic static Object handleTextChangeWithAccessKey(Object component,
Object domElement,
Object newValue)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 |
Object - true if the value was able to be setpublic static Object isAncestor(Object ancestorNode,
Object node)ancestorNode |
||
node |
Objectpublic static Object isAncestorOrSelf(Object ancestorNode,
Object node)ancestorNode |
||
node |
Objectpublic static Object isInVisibleSubtree(Object node)node |
Objectpublic static Object isNodeInDocumentHierarchy(Object domDocument,
Object node)node is in the domDocument's hierarchydomDocument |
||
node |
Objectpublic static Object isVisible(Object domElement)domElement |
Objectpublic static Object launchHelpWindow(Object url)url |
- | The url that should be displayed in the help window. |
Objectprivate static Object _removeAccessKeyElement(Object domElement,
Object accessKeyElement)domElement |
||
accessKeyElement |
Objectpublic static Object removeAllNodes(HTMLElement element)element |
- | the DOM element whose children will be removed |
Objectpublic static Boolean removeCSSClassName(HTMLElement domElement,
String className)true if the class name was removed.domElement |
- | DOM Element to remove style class name from |
className |
- | Name of style class to remove
Default value = null
|
Boolean - null true if the style class was removedprivate static Object _removeSiblings(Object domElement)domElement |
Objectpublic static Object scrollChildIntoViewY(Object childElement)childElement |
Objectpublic static Object scrollDownBy(Object domElement,
Object deltaY)domElement |
||
deltaY |
Objectpublic static Object scrollRightBy(Object domElement,
Object deltaX)domElement |
||
deltaX |
Objectpublic static Object setAccessibleState(Object component,
Object state)component |
||
state |
Objectprivate static Object _setHelpWindowName(Object windowName)windowName |
Objectpublic static Object setScrollLeft(Object domElement,
Object newScrollLeft)domElement |
||
newScrollLeft |
Objectpublic static Object setScrollTop(Object domElement,
Object newScrollTop)domElement |
||
newScrollTop |
Objectprivate static Object _setTextAndAccessKeySpan(Object component,
Object domElement,
Object accessKeyValue,
Object accessKeySpan,
Object newValue)component |
||
domElement |
||
accessKeyValue |
||
accessKeySpan |
||
newValue |
Objectprivate static Object _setTextContent(Object domElement,
Object value)domElement |
||
value |
Objectpublic static Object setVisible(Object domElement,
Object visible)domElement |
||
visible |
Objectpublic static Object stripScripts(Object domElement)domElement |
Objectpublic static Object suppressActionLinkBrowserContextMenu(AdfUIInputEvent componentContextMenuEvent)componentContextMenuEvent |
- | The component context menu event |
Objectpublic static Object swapIcon(HTMLElement originalIcon,
String iconKey)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 |
Object
|
Oracle Fusion Middleware JavaScript API Reference for Oracle ADF Faces 11g Release 1 (11.1.1) E12046-05 |
||||||||
| PREV NEXT | FRAMES NO FRAMES Warning: private items are visible | ||||||||