OracleJavaScript API Reference for Oracle ADF Faces

 

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

oracle.adfinternal.view.js.agent.ie
Class AdfIEAgent

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adf.view.js.agent.AdfAgent
               |
               +--oracle.adfinternal.view.js.agent.ie.AdfIEAgent

public class AdfIEAgent
extends AdfAgent


Field Summary


Fields inherited from oracle.adf.view.js.agent.AdfAgent

ANDROID_OS, CAP_TOUCH_SCREEN, CAP_TOUCH_SCREEN_MULTIPLE, CAP_TOUCH_SCREEN_NONE, CAP_TOUCH_SCREEN_SINGLE, DRAG_GHOST_STYLECLASS, EDGE_PLATFORM, GECKO_PLATFORM, IE_PLATFORM, KEY_EVENTS, MAC_OS, OPERA_PLATFORM, REDISTRIBUTE_EVENTS, SOLARIS_OS, UNKNOWN_OS, UNKNOWN_PLATFORM, WEBKIT_PLATFORM, WINDOWS_OS

Fields inherited from oracle.adf.view.js.base.AdfObject

constructor, superclass

Fields inherited from org.ecmascript.object.Object

prototype

Constructor Summary

public
AdfIEAgent(Object version, Object domWindow)

Method Summary

public Object
addOption(Node element, String label, Object value, boolean selected, boolean disabled, String description, int index)
IE doesn't support disabled options natively.
public static void
assertBrowserMode(AdfAgent agent)
Checks the agent to determine if the browser is a supported version.
public void
autoCompleteForm(Form htmlForm)
Internet Explorer has a bug, that the autocomplete does not work when using JavaScript to submit a form.
public boolean
checkMouseOutEvent(Node element, Event evt)
Checks wthether a mouseout event was received by the container when mouse was moved form one of its child elements to another.
public void
clearSubtreeIds(HtmlElement element)
Clear id of the specified element and its children.
protected AdfLogWriter
CreateNativeLogWriter()
Creates and returns the native AdfLogWriter to use for this AdfAgent.
public HTMLElement
elementFromPagePoint(Number pageX, Object pageY, HTMLElement hintElement, Object exclusionContext, Object exclusionCallback)
Returns the topmost element at the give mouse point in Window coordinates.
static Float
__getAgentVersion(Object userAgent)
Checks the user agent string returning the current browser version.
private static Array
_getAllChildElements(Node parentElement)
With IE11 the node.all is "deprecated".
public Boolean
getBooleanAttribute(Node element, String attrName, Boolean defaultValue)
Returns the value of a boolean attribute.
public Object
getComputedStyle(Node element)
Tries to return the current style, taking into account the inline styles and style sheets.
public Array<AdfUIComponent>
getDescendantComponentsForNode(Node node, Array<AdfUIComponent> children)
Get components descended from a node.
public Float
getElementLeft(Node element)
Returns the element's left side in Window coordinates.
public Object
getElementPageBounds(HTMLElement domElement)
Return a rectangle object containing the page bounds of an element in top/left/bottom/right form.
public Node
getEventFromElement(Event nativeEvent)
Gets the element that the mouse pointer exited, if any.
public Object
getEventTarget(Object event)
IE sometimes queues a blur event even when the focus is not lost
public Node
getEventToElement(Event nativeEvent)
The object being moved to by the mouse or finger.
public HtmlElement
getFormElement(Form form, String elementName)
Finds the form element by name.
public Number
getIntAttribute(Node element, String attrName, Object defaultValue)
Returns the value of a number attribute.
public Object
getMaxConnectionsPerDomain()
Gets the maximum number of simultaneous connections allowed per domain by the client for IE
public Object
getMousePosition(Event evt)
Returns event's mouse coordinates relative to the document.
public Object
getOverrideStyle(Node element)
Returns the override style for this element.
private String
_getSessionStorageKey(String propKey)
static String
__getSpecificAgentClassName(Object userAgent, Object version)
Returns the specific agent class name that should be instantiated for this user agent string.
public String
getStyleProperty(Object style, String propertyName)
Returns the value of a property for the AdfAgent's style object
static Boolean
__getSupported(Object userAgent, Object version)
Checks if this browser is supported.
public Float
getWindowHeight()
Returns the content height of the browser window.
public Float
getWindowWidth()
Returns the content width of the browser window.
protected void
Init(Object version, Window domWindow)
Initialization/constructor for the IE agent instance.
protected Boolean
IsComputedWidthAuto()
public Boolean
isDisabledOptionSupported()
Returns whether or not disabled is supported on an option tag.
public Object
isEqualIcon(Node firstIcon, Node secondIcon)
IE's img icons innerHTML can be different.
public Boolean
isFunctionKey(Event keyEvent)
Returns whether the event's keycode should be considered as a function key.
private static boolean
_isIllegalBrowserDetected(AdfAgent agent)
public boolean
pointInElementBounds(Object element, Object pageX, Object pageY)
Returns true if the specified point in page space is in the bounds of this element.
public void
removeIdsFromDomSubTree(HTMLElement subTreeRoot)
Removes all of the ID values from every element in the given DOM sub tree.
public void
removeStyleProperty(Node element, String styleProperty)
Remove a styleProperty set on this element.
public void
setCssFloat(Node element, String value)
Sets the float style of the target element.
public void
setTableRowHeight(Node row, Number height)
Sets the height of the table row cell.
public Object
slice(Object file, Object startByte, Object stopByte)
For agents which support the File API, slices the File.

Methods inherited from oracle.adf.view.js.agent.AdfAgent

addBubbleEventListener, addEventBubbles, addEventCaptures, addKeyEventListener, addResizeListener, allElementsRemoved, atLeast, beginDirtyStateTracking, cloneEvent, cloneNode, CopyDragSize, copyEvent, copyStyle, createContextMenuEventGenerator, createDefaultLogWriter, CreateDefaultLogWriter, createDraggableNode, createStyle, createTouchMoveManager, CreateUIInputEvent, createXmlDocument, createXMLHttpRequest, disableBrowserContextMenu, disableSelectionToggleOnEditableCell, disableUserSelect, dispatchEvent, eatEvent, eatEventCallback, elementsAdded, elementsRemoved, enableUserSelect, endDirtyStateTracking, endDocumentKeyEventCapture, execScript, forceCursorChange, getAgent, getAgentClassNameFromAgentString, getAttribute, getAttributeName, getBoxSizing, getBrowserViewportScrollLeft, getBrowserViewportScrollTop, getCapabilities, getComponentEvent, getCSS2Cursor, getCSSLengthAsInt, GetCssToDomPropertyNameMap, getCursor, getDomDocument, getDomForCSSPropertyName, getDomWindow, getElementById, getElementPosition, getElementsByName, getElementTop, getExpandoProperty, getKeyCode, getLocalName, getModifierDisplayName, getNodeName, getNodeType, getNodeXml, getOrigin, getOS, getOuterHeight, getOuterWidth, getPlatform, getPreferredKeyEventForRepetition, getPrefix, getScrollLeft, getSessionStorageProperty, getTableRow, getTableRowCells, getTableRows, getTextContent, GetTouchCapability, getVersion, getWindowClientHeight, getWindowClientWidth, getWindowScrollHeight, getWindowScrollWidth, guessOS, guessVersion, hasAttribute, InitClass, installKeyboardBlocker, isAttributeSpecified, isChromeEvent, isClipped, isDefaultPrevented, isDirty, isDragPrepEvent, isElementHTML, isEventInElement, isInlineDialogRepositioningOnScroll, isKeyboardEvent, isLeftButton, isLeftButtonClick, isMouseEvent, isSelectionToggle, isSessionStorageEnabled, isTouchFirstDevice, mapNativeToComponentEventType, modifyIdsInDomSubTree, parseXML, pointInElementChrome, pointInElementOrChildBounds, prepareStretchedChild, preventDefault, preventDefaultCallback, removeBubbleEventListener, removeEventBubbles, removeEventCaptures, removeKeyEventListener, removeResizeListener, removeSessionStorageProperty, replaceNode, repositionStretchedElement, resizeStretchedChild, resizeStretchedElement, scrollToPos, setAttribute, setButtonTextContent, setCursor, setDirty, setExpandoProperty, setImageSource, setImageTooltip, setInstance, setOpacity, setOuterHeight, setOuterMaxHeight, setOuterMaxWidth, setOuterWidth, setScrollLeft, setSessionStorageProperty, setTextContent, showBusyCursor, showTooltip, startDocumentKeyEventCapture, startMouseEventCapture, stopMouseEventCapture, stopPropagation, supportsTransientStyleClasses, toISOString

Methods inherited from oracle.adf.view.js.base.AdfObject

adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, exportPrototypeSymbol, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString

Field Detail


Constructor Detail


AdfIEAgent

public AdfIEAgent(Object version,
                  Object domWindow)

Parameters:
version  
domWindow  

Method Detail


addOption

public Object addOption(Node element,
                        String label,
                        Object value,
                        boolean selected,
                        boolean disabled,
                        String description,
                        int index)

IE doesn't support disabled options natively. TODO - investigate showing a "disabled" option in ie - some fancy javascript could probably make it work

Parameters:
element  
label  
value  
selected  
disabled  
description  
index  
Return:
Object
Overrides:
AdfAgent.addOption(Object, Object, Object, Object, Object, Object, Object)

assertBrowserMode

public static void assertBrowserMode(AdfAgent agent)

Checks the agent to determine if the browser is a supported version. Displays an alert message depending on the configuration settings and loggs a warning message if the browser is unsupported.

Parameters:
agent - that is current
Return:
void - null

autoCompleteForm

public void autoCompleteForm(Form htmlForm)

Internet Explorer has a bug, that the autocomplete does not work when using JavaScript to submit a form.

Parameters:
htmlForm  
Return:
void - null
Overrides:
AdfAgent.autoCompleteForm(Object)

checkMouseOutEvent

public boolean checkMouseOutEvent(Node element,
                                  Event evt)

Checks wthether a mouseout event was received by the container when mouse was moved form one of its child elements to another.

Parameters:
element - container node
evt - event object
Return:
boolean - true if mouse was moved outside of the container, false otherwise
Overrides:
AdfAgent.checkMouseOutEvent(Object, Object)

clearSubtreeIds

public void clearSubtreeIds(HtmlElement element)

Clear id of the specified element and its children. This is called on cloned node for dragging so that the new node won't conflict with the original Node. For IE, we will use browser generated uniqueID property as the new id for the new element if it is available, otherwise, we'll just eliminate the id.

Parameters:
element  
Return:
void - null
Overrides:
AdfAgent.clearSubtreeIds(Object)

CreateNativeLogWriter

protected AdfLogWriter CreateNativeLogWriter()

Creates and returns the native AdfLogWriter to use for this AdfAgent. Subclasses should override this to return a AdfLogWriter that takes advantage of any User AdfAgent console or debugger logging facilities

Return:
AdfLogWriter - that writes to the developer tools console
Overrides:
AdfAgent.CreateNativeLogWriter()

elementFromPagePoint

public HTMLElement elementFromPagePoint(Number pageX,
                                        Object pageY,
                                        HTMLElement hintElement,
                                        Object exclusionContext,
                                        Object exclusionCallback)

Returns the topmost element at the give mouse point in Window coordinates. By default, all elements are included in the search for the topmost element. In some cases, for example, when a "glass pane" is used, the caller may need to exclude certain components (eg. the "glass pane" from the search. To accomplish this, an optional "exclusion filter" function may be specified. This exclusion filter is a function which is called for each element in the search. If the exclusion filter returns true, the element and its descendents are excluded from the search.

Please keep in mind that this method is inefficient when the there is no native implementation by the browser. This is because the method iterates the entire document depth first to find the element at a particular point


Parameters:
pageX - the y coordinate to test for
pageY  
hintElement - Optional hint element to begin searching from as an optimization. If no element is found inside the hintElement, its ancestors will be considered.
Default value = undefined
exclusionContext  
exclusionCallback  
Return:
HTMLElement - the topmost domElement at the given point
Overrides:
AdfAgent.elementFromPagePoint(Number, Object, HTMLElement, Object, Object)

__getAgentVersion

static Float __getAgentVersion(Object userAgent)

Checks the user agent string returning the current browser version. First checks the trident version and falls back on the msie version for older verions.

Parameters:
userAgent  
Return:
Float - IE version identified by the user agent string
Overrides:
AdfAgent.__getAgentVersion(Object)

_getAllChildElements

private static Array _getAllChildElements(Node parentElement)

With IE11 the node.all is "deprecated". The expression (node.all?true:false) always returns false regardless of if there is a collection returned. The documentation describes it as: "document.all is now flagged as a falsy". (Whatever, right)

Parameters:
parentElement - to deliver children for
Return:
Array - all nodes under the subtree defined by the parentElement

getBooleanAttribute

public Boolean getBooleanAttribute(Node element,
                                   String attrName,
                                   Boolean defaultValue)

Returns the value of a boolean attribute.

Parameters:
element - target
attrName - target attribute name
defaultValue - optional default value
Return:
Boolean - attribute value as a boolean
Overrides:
AdfAgent.getBooleanAttribute(Object, Object, Object)

getComputedStyle

public Object getComputedStyle(Node element)

Tries to return the current style, taking into account the inline styles and style sheets.

Parameters:
element - to return the computed style
Return:
Object - computed style object for the element
Overrides:
AdfAgent.getComputedStyle(Object)

getDescendantComponentsForNode

public Array<AdfUIComponent> getDescendantComponentsForNode(Node node,
                                                            Array<AdfUIComponent> children)

Get components descended from a node. Children are returned in an array.

There is no guarantee about the order of the children returned. If visiting the children in a known order is required please use AdfUIComponent.visitChildren.

All descendent children are returned, visible or not. If ignoring hidden children is required please use AdfUIComponent.visitChildren.

This method is faster than AdfUIComponent.visitChildren, if the limitations above are acceptable it is preferable to use this method.


Parameters:
node - DOM node where to start searching
children - array to store child components in. Descendent components will be added to the end of the array. This param is optional, if not passed in an array will be created.
Return:
Array<AdfUIComponent> - array of descendent components, may be empty
Overrides:
AdfAgent.getDescendantComponentsForNode(Node, Array)

getElementLeft

public Float getElementLeft(Node element)

Returns the element's left side in Window coordinates. This reproduce the code from the getElementPosition method.

Parameters:
element - target node to return the window coordinates
Return:
Float - Returns the element's left side in Window coordinates
Overrides:
AdfAgent.getElementLeft(Object)

getElementPageBounds

public Object getElementPageBounds(HTMLElement domElement)

Return a rectangle object containing the page bounds of an element in top/left/bottom/right form.

Parameters:
domElement - target element to return coordinates on the page
Return:
Object - object with members "top", "left", "bottom", and "right"
Overrides:
AdfAgent.getElementPageBounds(HTMLElement)

getEventFromElement

public Node getEventFromElement(Event nativeEvent)

Gets the element that the mouse pointer exited, if any.

Parameters:
nativeEvent  
Return:
Node - associated element
Overrides:
AdfAgent.getEventFromElement(Object)

getEventTarget

public Object getEventTarget(Object event)

IE sometimes queues a blur event even when the focus is not lost

Parameters:
event  
Return:
Object
Overrides:
AdfAgent.getEventTarget(Object)

getEventToElement

public Node getEventToElement(Event nativeEvent)

The object being moved to by the mouse or finger.

Parameters:
nativeEvent  
Return:
Node - node assocaited with the native event
Overrides:
AdfAgent.getEventToElement(Object)

getFormElement

public HtmlElement getFormElement(Form form,
                                  String elementName)

Finds the form element by name.

Parameters:
form - the form
elementName - the name of the form element
Return:
HtmlElement - null
Overrides:
AdfAgent.getFormElement(Object, Object)

getIntAttribute

public Number getIntAttribute(Node element,
                              String attrName,
                              Object defaultValue)

Returns the value of a number attribute.

Parameters:
element - target
attrName - target attribute name
defaultValue  
Return:
Number - attribute value as a number
Overrides:
AdfAgent.getIntAttribute(Object, Object, Object)

getMaxConnectionsPerDomain

public Object getMaxConnectionsPerDomain()

Gets the maximum number of simultaneous connections allowed per domain by the client for IE

Return:
Object
Overrides:
AdfAgent.getMaxConnectionsPerDomain()

getMousePosition

public Object getMousePosition(Event evt)

Returns event's mouse coordinates relative to the document.

Parameters:
evt - event object
Return:
Object - an object with two properties (x for the left coordinate and y for the top coordinate)
Overrides:
AdfAgent.getMousePosition(Object)

getOverrideStyle

public Object getOverrideStyle(Node element)

Returns the override style for this element.

Parameters:
element - for which to return the runtime style
Return:
Object - runtime style object
Overrides:
AdfAgent.getOverrideStyle(Object)

_getSessionStorageKey

private String _getSessionStorageKey(String propKey)

Parameters:
propKey - root property key identifier
Return:
String - a propKey prefixed by the current protocol used. If protocol is undefined or null, it returns propKey

__getSpecificAgentClassName

static String __getSpecificAgentClassName(Object userAgent,
                                           Object version)

Returns the specific agent class name that should be instantiated for this user agent string.

Parameters:
userAgent  
version  
Return:
String - specific agent class to be instantiated
Overrides:
AdfAgent.__getSpecificAgentClassName(Object, Object)

getStyleProperty

public String getStyleProperty(Object style,
                               String propertyName)

Returns the value of a property for the AdfAgent's style object

Parameters:
style - object for an element
propertyName - of the style sheet name
Return:
String - value of the style sheet object property
Overrides:
AdfAgent.getStyleProperty(Object, Object)

__getSupported

static Boolean __getSupported(Object userAgent,
                               Object version)

Checks if this browser is supported.

Parameters:
userAgent  
version  
Return:
Boolean - supported
Overrides:
AdfAgent.__getSupported(Object, Object)

getWindowHeight

public Float getWindowHeight()

Returns the content height of the browser window.

Return:
Float - returns the content height of the browser window.
Overrides:
AdfAgent.getWindowHeight()

getWindowWidth

public Float getWindowWidth()

Returns the content width of the browser window.

Return:
Float - returns the content width of the browser window.
Overrides:
AdfAgent.getWindowWidth()

Init

protected void Init(Object version,
                    Window domWindow)

Initialization/constructor for the IE agent instance.

Parameters:
version  
domWindow - that is a associated with the singleton instance
Return:
void - null
Overrides:
AdfObject.Init()

IsComputedWidthAuto

protected Boolean IsComputedWidthAuto()

Return:
Boolean - true if the computed style for this agent may return "auto" as a value instead of an actual pixel size.
Overrides:
AdfAgent.IsComputedWidthAuto()

isDisabledOptionSupported

public Boolean isDisabledOptionSupported()

Returns whether or not disabled is supported on an option tag.

Return:
Boolean - null true if disabled is supported on the option input tag.
Overrides:
AdfAgent.isDisabledOptionSupported()

isEqualIcon

public Object isEqualIcon(Node firstIcon,
                          Node secondIcon)

IE's img icons innerHTML can be different. One can have the src be the complete url, another can be a relative url. This will return whether or not the icons contents are essentially equal for icon swapping purposes.

Parameters:
firstIcon  
secondIcon  
Return:
Object
Overrides:
AdfAgent.isEqualIcon(Object, Object)

isFunctionKey

public Boolean isFunctionKey(Event keyEvent)

Returns whether the event's keycode should be considered as a function key.

Parameters:
keyEvent  
Return:
Boolean - null true if the event's keycode is a function key
Overrides:
AdfAgent.isFunctionKey(Object)

_isIllegalBrowserDetected

private static boolean _isIllegalBrowserDetected(AdfAgent agent)

Parameters:
agent - that is current
Return:
boolean - null true if the browser is not supported

pointInElementBounds

public boolean pointInElementBounds(Object element,
                                    Object pageX,
                                    Object pageY)

Returns true if the specified point in page space is in the bounds of this element.

Parameters:
element  
pageX  
pageY  
Return:
boolean - null true if the point defined byt the x,y coordinates is within the element
Overrides:
AdfAgent.pointInElementBounds(Object, Object, Object)

removeIdsFromDomSubTree

public void removeIdsFromDomSubTree(HTMLElement subTreeRoot)

Removes all of the ID values from every element in the given DOM sub tree.

Parameters:
subTreeRoot - the root of the sub tree to remove IDs from
Return:
void - null
Overrides:
AdfAgent.removeIdsFromDomSubTree(HTMLElement)

removeStyleProperty

public void removeStyleProperty(Node element,
                                String styleProperty)

Remove a styleProperty set on this element.

Parameters:
element  
styleProperty  
Return:
void - null
Overrides:
AdfAgent.removeStyleProperty(Object, Object)

setCssFloat

public void setCssFloat(Node element,
                        String value)

Sets the float style of the target element.

Parameters:
element - target html element
value - to set
Return:
void - null
Overrides:
AdfAgent.setCssFloat(Object, Object)

setTableRowHeight

public void setTableRowHeight(Node row,
                              Number height)

Sets the height of the table row cell.

Parameters:
row  
height  
Return:
void - null
Overrides:
AdfAgent.setTableRowHeight(Object, Object)

slice

public Object slice(Object file,
                    Object startByte,
                    Object stopByte)

For agents which support the File API, slices the File. If slice is not supported then returns undefined.

Parameters:
file  
startByte  
stopByte  
Return:
Object
Overrides:
AdfAgent.slice(File, Number, Number)

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

 

Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.