OracleJavaScript API Reference for Oracle ADF Faces

 

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

oracle.adfinternal.view.js.laf.dhtml.internalWindow
Class AdfDhtmlPopupWindow

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adfinternal.view.js.laf.dhtml.internalWindow.AdfAbstractFloatingElement
               |
               +--oracle.adfinternal.view.js.laf.dhtml.internalWindow.AdfDhtmlPopupWindow
Direct Known Subclasses:
AdfDhtmlPopupMenu, AdfDhtmlPopupSelector, AdfDhtmlSimpleFloat

public class AdfDhtmlPopupWindow
extends AdfAbstractFloatingElement



Field Summary

 static Object
__CANCELED_EXPANDO
Holds the name of the expando property added to the contentDom of the AdfDhtmlPopupWindow.HINT_CLOSE_HANDLER_PARAM when the floating element is dismissed by calling cancel.
public static Object
HINT_ALIGN
public static Object
HINT_ALIGN_ELEMENT
public static Object
HINT_ANIMATE
public static Object
HINT_AUTODISMISS
public static Object
HINT_AUTODISMISS_ALWAYS
public static Object
HINT_AUTODISMISS_INACTIVATE
public static Object
HINT_AUTODISMISS_MENU
public static Object
HINT_AUTODISMISS_MOUSEOUT
public static Object
HINT_AUTODISMISS_MOUSEOUT_ID
public static Object
HINT_AUTODISMISS_NEVER
public static Object
HINT_AUTODISMISS_TIMEOUT
public static Object
HINT_CLOSE_HANDLER
public static Object
HINT_CLOSE_HANDLER_PARAM
public static Object
HINT_CLOSE_ON_ESCAPE
public static Object
HINT_COMPONENT_CLIENT_ID
public static Object
HINT_CONTENT
public static Object
HINT_DETACH_DRAG_END_HANDLER
public static Object
HINT_DETACH_DRAG_START_HANDLER
public static Object
HINT_DRAG_ELEMENT
public static Object
HINT_FOCUS
public static Object
HINT_LAUNCH_SOURCE_ID
Deprecated: private hint deprecated. Use public hint AdfRichPopup.HINT_LAUNCH_ID.
public static Object
HINT_LEFT_POSITION
public static Object
HINT_MAX_WIDTH
public static Object
HINT_MODAL
public static Object
HINT_MOUSEPOSITION
public static Object
HINT_OPENED_HANDLER
public static Object
HINT_OPENED_HANDLER_PARAM
public static Object
HINT_RESTORE_IMMEDIATE
public static Object
HINT_TITLE
public static Object
HINT_TOP_POSITION
public static Object
HINT_TYPE
public static Object
HINT_TYPE_DIALOG
public static Object
HINT_TYPE_INLINESELECTOR
public static Object
HINT_TYPE_LOVCOMBOBOX
public static Object
HINT_TYPE_MENU
public static Object
HINT_TYPE_NOTEWINDOW
 static Object
__REPLACEDOM_EXPANDO
private static Object
_SCROLL_POSITION
public Object
setElement


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

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfDhtmlPopupWindow()


Method Summary

protected Object
AnimateOpening(Object animationDuration)
Animates the opening of the popup.
private Object
_animateUsingWrapper(Number animationDuration, Object isAchorRight, Object isAchorBottom)
Removes the managed dom element replacing with a hidden div.
private static Object
_animationComplete(Object context)
Callback invoked after open animation has completed.
private Object
_announce(String messageKey)
Announces a popup status change to assistive technologies.
public Object
autoSize()
Updates the size of the popup to match its content and resizes the shadow decorator.
public Object
cancel(boolean replaceDom)
Dismisses the floating element indicating an awkward state or unexpected state.
protected HTMLElement
CreateDomElement()
Create and initialize the html.
private static String
_createFocusPagePropertyKey(String clientId)
Generates a key based on the popup's client id by replacing all ":" char's with "$" and then adding a sufix of "$restoreFocus".
protected Object
CreateShadow(Boolean afterAnimation)
Creates the shadow for this popup window.
public Object
destroy()
Unregister event handlers, remove the shadow decorator, unregister with the position manager before calling on super.
protected Object
DoResizeNotifyDom(Object content)
Perform a resize notification traversal when showing popup contents so that geometry managing components are given the opportunity to lay themselves out.
protected Object
DoShow(Object hints)
Do the work to actually display of the popup window.
protected Object
FocusOnFirstElement()
Sets focus to the first content element in the window.
protected Number
GetAnimationDuration()
protected String
GetAnimationDurationSkinProperty()
public HTMLElement
getContent()
protected HTMLElement
GetContentParent()
Gets the dom element that is the parent of the popup's content.
protected HTMLElement
GetFocusContent()
Returns the content dom node for the popup.
protected Boolean
GetFocusOnOpen()
protected Object
GetLaunchSourceElement()
Get the launch source element (if available).
public String
getLaunchSourceId()
Returns the clientId of the launching source if provided using the AdfRichPopup.HINT_LAUNCH_ID popup hint.
protected int
GetMaxWidth()
public String
getPopupClientId()
This getter exposes a popup hint that captures the popups's clientId.
protected Number
GetPositionManagerIndex()
protected Object
HandleEscapeKey(Object event)
Overridable function to handle escape key.
private Object
_handleKeyDown(Event event)
Handles the keydown event from the document.
protected Object
HandleKeyNavigation(Object event)
Overridable function to handle ctr+alt+w window navigation.
private Object
_handleKeyUp(Object event)
Handles the keyup event from the document.
private Object
_handleResize()
Callback invoked every time the size of the floating element changes.
public Object
hide()
Hides this popup window.
protected Object
Init()
Initializes the instance.
protected static Object
InitClass()
public Object
isAnimating()
Returns if the popup window is currently animating during the opening of the window.
private boolean
_isRestoring(AdfRichPopup component)
Used to determine if the popup should restore focus when closed.
public Boolean
isVisible()
protected Object
OpenedPopup()
protected Object
Position(String hintAlign)
Registers this floating element with the position manager based on the alignment hint.
private Object
_positionAtMousePointer(Object pos)
Registers this floating element with the position manager based on a mouse x,y position.
private Object
_registerEventHandlers()
Registers listeners with the document.
private Object
_restoreFocus()
Restore the keyboard focus to its previous location
private static Object
_restoreRootPostAnimation(Object wrapper)
Restores the dom element after animation has completed.
protected Object
RestoreScrollValues(HTMLElement domElement)
Finds all child DOM elements that need their vertical scroll values restored and restores them.
protected Object
SaveScrollValues(HTMLElement domElement)
Finds all child DOM elements that have scroll values and saves their scroll value information.
public Object
setCloseHandler(Function handler)
Sets the Handler invoked when the selector is being dismissed
public Object
setCloseHandlerParam(Object param)
Sets the parameter for the Handler invoked when the selector is being dismissed
public Object
setContent(HTMLElement selectorContent)
Sets the content of this popup window.
protected Object
SetFocusOnOpen(Boolean focusHint)
protected Boolean
ShouldHideOnClip()
Return boolean indicating if popup window should hide on clip.
public Object
show(Object hints)
Displays a popup window on the screen.
private Object
_size()
Sizes the popup window and then validate the position with the position manager service.
private void
_toggleOffAnimating()
When a popup is open and there is not room for it in the window it foces scroll.
private Object
_unregisterEventHandlers()
Unregisters listeners registered with the document.
protected Object
WrapContent(Object hints, Object content, Object isScreenReaderMode)
Wraps the content of the popup window.


Methods inherited from oracle.adfinternal.view.js.laf.dhtml.internalWindow.AdfAbstractFloatingElement

CreateTable, getAlignElement, getAlignPosition, getElement, GetFloatingType, getHeight, getLeft, getShadowAnchor, getTop, getWidth, raiseToFront, setAlignElement, setAlignPosition, setElement, setLeft, setPosition, setShadowAnchor, setTop


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

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


Field Detail


__CANCELED_EXPANDO

static Object __CANCELED_EXPANDO

Holds the name of the expando property added to the contentDom of the AdfDhtmlPopupWindow.HINT_CLOSE_HANDLER_PARAM when the floating element is dismissed by calling cancel.

HINT_ALIGN

public static Object HINT_ALIGN

HINT_ALIGN_ELEMENT

public static Object HINT_ALIGN_ELEMENT

HINT_ANIMATE

public static Object HINT_ANIMATE

HINT_AUTODISMISS

public static Object HINT_AUTODISMISS

HINT_AUTODISMISS_ALWAYS

public static Object HINT_AUTODISMISS_ALWAYS

HINT_AUTODISMISS_INACTIVATE

public static Object HINT_AUTODISMISS_INACTIVATE

HINT_AUTODISMISS_MENU

public static Object HINT_AUTODISMISS_MENU

HINT_AUTODISMISS_MOUSEOUT

public static Object HINT_AUTODISMISS_MOUSEOUT

HINT_AUTODISMISS_MOUSEOUT_ID

public static Object HINT_AUTODISMISS_MOUSEOUT_ID

HINT_AUTODISMISS_NEVER

public static Object HINT_AUTODISMISS_NEVER

HINT_AUTODISMISS_TIMEOUT

public static Object HINT_AUTODISMISS_TIMEOUT

HINT_CLOSE_HANDLER

public static Object HINT_CLOSE_HANDLER

HINT_CLOSE_HANDLER_PARAM

public static Object HINT_CLOSE_HANDLER_PARAM

HINT_CLOSE_ON_ESCAPE

public static Object HINT_CLOSE_ON_ESCAPE

HINT_COMPONENT_CLIENT_ID

public static Object HINT_COMPONENT_CLIENT_ID

HINT_CONTENT

public static Object HINT_CONTENT

HINT_DETACH_DRAG_END_HANDLER

public static Object HINT_DETACH_DRAG_END_HANDLER

HINT_DETACH_DRAG_START_HANDLER

public static Object HINT_DETACH_DRAG_START_HANDLER

HINT_DRAG_ELEMENT

public static Object HINT_DRAG_ELEMENT

HINT_FOCUS

public static Object HINT_FOCUS

HINT_LAUNCH_SOURCE_ID

public static Object HINT_LAUNCH_SOURCE_ID

Deprecated: private hint deprecated. Use public hint AdfRichPopup.HINT_LAUNCH_ID.

HINT_LEFT_POSITION

public static Object HINT_LEFT_POSITION

HINT_MAX_WIDTH

public static Object HINT_MAX_WIDTH

HINT_MODAL

public static Object HINT_MODAL

HINT_MOUSEPOSITION

public static Object HINT_MOUSEPOSITION

HINT_OPENED_HANDLER

public static Object HINT_OPENED_HANDLER

HINT_OPENED_HANDLER_PARAM

public static Object HINT_OPENED_HANDLER_PARAM

HINT_RESTORE_IMMEDIATE

public static Object HINT_RESTORE_IMMEDIATE

HINT_TITLE

public static Object HINT_TITLE

HINT_TOP_POSITION

public static Object HINT_TOP_POSITION

HINT_TYPE

public static Object HINT_TYPE

HINT_TYPE_DIALOG

public static Object HINT_TYPE_DIALOG

HINT_TYPE_INLINESELECTOR

public static Object HINT_TYPE_INLINESELECTOR

HINT_TYPE_LOVCOMBOBOX

public static Object HINT_TYPE_LOVCOMBOBOX

HINT_TYPE_MENU

public static Object HINT_TYPE_MENU

HINT_TYPE_NOTEWINDOW

public static Object HINT_TYPE_NOTEWINDOW

__REPLACEDOM_EXPANDO

static Object __REPLACEDOM_EXPANDO

_SCROLL_POSITION

private static Object _SCROLL_POSITION

setElement

public Object setElement

Constructor Detail


AdfDhtmlPopupWindow

public AdfDhtmlPopupWindow()

Method Detail


AnimateOpening

protected Object AnimateOpening(Object animationDuration)

Animates the opening of the popup.

Parameters:
animationDuration    
Return:
Object
See also:
GetAnimationDuration()

_animateUsingWrapper

private Object _animateUsingWrapper(Number animationDuration,
                                    Object isAchorRight,
                                    Object isAchorBottom)

Removes the managed dom element replacing with a hidden div. The current coordinates are captured and used as the finals for the animation.

Parameters:
animationDuration  -  elapsed time the opening animation should take. Configured per component as a skinning property.
isAchorRight    
isAchorBottom    
Return:
Object

_animationComplete

private static Object _animationComplete(Object context)

Callback invoked after open animation has completed. Restores the dom element, creates the shadow decorator and then invokes the popup opening logic.

Parameters:
context    
Return:
Object
See also:
_restoreRootPostAnimation(Object)
CreateShadow(Boolean)
OpenedPopup()

_announce

private Object _announce(String messageKey)

Announces a popup status change to assistive technologies.

Parameters:
messageKey  -  identifies the message to announce
Return:
Object

autoSize

public Object autoSize()

Updates the size of the popup to match its content and resizes the shadow decorator.

Return:
Object

cancel

public Object cancel(boolean replaceDom)

Dismisses the floating element indicating an awkward state or unexpected state.

Parameters:
replaceDom  -  optional flag that indicates the popup was canceled due to a dom replacement of its markup.
Return:
Object
Overrides:
AdfAbstractFloatingElement.cancel()

CreateDomElement

protected HTMLElement CreateDomElement()

Create and initialize the html. Subclasses must override this method

Return:
HTMLElement - the root dom element of this popup.

_createFocusPagePropertyKey

private static String _createFocusPagePropertyKey(String clientId)

Generates a key based on the popup's client id by replacing all ":" char's with "$" and then adding a sufix of "$restoreFocus". The returned key is passed to AdfDhtmlPage.setPageProperty(Object, Object) and AdfDhtmlPage.getPageProperty(Object). This value pair will hold the last active dom element before the popup was cancled due to a dom replacement.

Parameters:
clientId  -  of the popup component
Return:
String - map safe key

CreateShadow

protected Object CreateShadow(Boolean afterAnimation)

Creates the shadow for this popup window.

Parameters:
afterAnimation  -  flag indicates that we want to create the shadow after animation
Return:
Object

destroy

public Object destroy()

Unregister event handlers, remove the shadow decorator, unregister with the position manager before calling on super.

Return:
Object
Overrides:
AdfAbstractFloatingElement.destroy()

DoResizeNotifyDom

protected Object DoResizeNotifyDom(Object content)

Perform a resize notification traversal when showing popup contents so that geometry managing components are given the opportunity to lay themselves out.

Parameters:
content    
Return:
Object

DoShow

protected Object DoShow(Object hints)

Do the work to actually display of the popup window.

Parameters:
hints  -  a set of popup hints (see AdfDhtmlPopupWindow)
Default value = null
Return:
Object

FocusOnFirstElement

protected Object FocusOnFirstElement()

Sets focus to the first content element in the window.

Return:
Object
See also:
GetFocusContent()

GetAnimationDuration

protected Number GetAnimationDuration()

Return:
Number - the duration of the animation for the popup

GetAnimationDurationSkinProperty

protected String GetAnimationDurationSkinProperty()

Return:
String - the skin property for animation duriation

getContent

public HTMLElement getContent()

Return:
HTMLElement - returns the dom element that is the content of this popup window

GetContentParent

protected HTMLElement GetContentParent()

Gets the dom element that is the parent of the popup's content. Subclasses must override this method

Return:
HTMLElement - contentParentElement the parent of the content

GetFocusContent

protected HTMLElement GetFocusContent()

Returns the content dom node for the popup. This method should be overridden by subclasses to return the inner content area versus the outer border/title dom structure.

Return:
HTMLElement - content area of the popup

GetFocusOnOpen

protected Boolean GetFocusOnOpen()

Return:
Boolean - null true if the popup window should steal focus when opened. The AdfDhtmlPopupWindow.HINT_FOCUS sets this value.

GetLaunchSourceElement

protected Object GetLaunchSourceElement()

Get the launch source element (if available). May return null. This is a protected method and may be overwritten by child classes (AdfDhtmlPopupMenu.js).

Return:
Object

getLaunchSourceId

public String getLaunchSourceId()

Returns the clientId of the launching source if provided using the AdfRichPopup.HINT_LAUNCH_ID popup hint. The launch source id is passed as a popup hint by default when using showPopupBehavior.

Return:
String - clientId of the launching source or null if not provided

GetMaxWidth

protected int GetMaxWidth()

Return:
int - the value passed in by the AdfDhtmlPopupWindow.HINT_MAX_WIDTH popup hint.

getPopupClientId

public String getPopupClientId()

This getter exposes a popup hint that captures the popups's clientId. It is a quick way to find the owning popup component.

Return:
String - the clientId of the outer popup component

GetPositionManagerIndex

protected Number GetPositionManagerIndex()

Return:
Number - numeric token used by the position manager service to track a registed floating element.

HandleEscapeKey

protected Object HandleEscapeKey(Object event)

Overridable function to handle escape key.

Parameters:
event    
Return:
Object

_handleKeyDown

private Object _handleKeyDown(Event event)

Handles the keydown event from the document. The _registerEventHanders and _unregisterEventHandlers functions manage registration and called from the show and hide functions. Intercepts the tab key press to cycle focus within the floating element. If focus is on the last element, focus returns to the first tab-able element in the popup.

Parameters:
event    
Return:
Object

HandleKeyNavigation

protected Object HandleKeyNavigation(Object event)

Overridable function to handle ctr+alt+w window navigation.

Parameters:
event    
Return:
Object

_handleKeyUp

private Object _handleKeyUp(Object event)

Handles the keyup event from the document. The _registerEventHanders and _unregisterEventHandlers functions manage registration and called from the show and hide functions. The ESC key is handled if the HINT_CLOSE_ON_ESCAPE hint was turned on. This logic will hide the floating element if the event target is within the popup. Or, if the HINT_LAUNCH_SOURCE_ID hint is provided, the dom element it points to is considered within the popup.

Parameters:
event    
Return:
Object
See also:
HandleEscapeKey(Object)

_handleResize

private Object _handleResize()

Callback invoked every time the size of the floating element changes.

Return:
Object
See also:
AdfAgent.addResizeListener(String, Function)

hide

public Object hide()

Hides this popup window.

Return:
Object
See also:
show(Object)
Overrides:
AdfAbstractFloatingElement.hide()

Init

protected Object Init()

Initializes the instance. Subclasses of AdfObject must call their superclass' Init

Return:
Object
Overrides:
AdfObject.Init()

InitClass

protected static Object InitClass()

Return:
Object

isAnimating

public Object isAnimating()

Returns if the popup window is currently animating during the opening of the window.

Return:
Object - true if the popup is currently animating during opening else false.

_isRestoring

private boolean _isRestoring(AdfRichPopup component)

Used to determine if the popup should restore focus when closed. If the popup is canceled and needs to be restored, we don't need to restore focus prior to when the popup was open.

Parameters:
component  -  popup component
Return:
boolean - true if the component is a AdfRichPopup, property autoCancel is disabled, and the popup was canceled due to a dom replacement.

isVisible

public Boolean isVisible()

Return:
Boolean - indicates the visual state of the selector

OpenedPopup

protected Object OpenedPopup()

Return:
Object

Position

protected Object Position(String hintAlign)

Registers this floating element with the position manager based on the alignment hint. Unregisters if already registered.

Parameters:
hintAlign  -  alignment constants
Return:
Object

_positionAtMousePointer

private Object _positionAtMousePointer(Object pos)

Registers this floating element with the position manager based on a mouse x,y position.

Parameters:
pos    
Return:
Object

_registerEventHandlers

private Object _registerEventHandlers()

Registers listeners with the document.

Return:
Object

_restoreFocus

private Object _restoreFocus()

Restore the keyboard focus to its previous location

Return:
Object

_restoreRootPostAnimation

private static Object _restoreRootPostAnimation(Object wrapper)

Restores the dom element after animation has completed.

Parameters:
wrapper  -  object holding the content element and instance of this object
Return:
Object

RestoreScrollValues

protected Object RestoreScrollValues(HTMLElement domElement)

Finds all child DOM elements that need their vertical scroll values restored and restores them. By default, vertical scroll values are lost when DOM elements are reparented - which happens when popups are hidden and then reshown. This method looks for saved scroll values on components (that were saved during the popup hide method, and restores any that are found.

Parameters:
domElement  -  the root domElement in the popup
Return:
Object

SaveScrollValues

protected Object SaveScrollValues(HTMLElement domElement)

Finds all child DOM elements that have scroll values and saves their scroll value information. By default, vertical scroll values are lost when DOM elements are reparented - which happens when popups are hidden and then reshown. This method looks for child elements that have vertical scroll values. Any scroll values found are saved so they can be restored if later the popup is shown again.

Parameters:
domElement  -  the root domElement in the popup
Return:
Object

setCloseHandler

public Object setCloseHandler(Function handler)

Sets the Handler invoked when the selector is being dismissed

Parameters:
handler  -  callback
Return:
Object

setCloseHandlerParam

public Object setCloseHandlerParam(Object param)

Sets the parameter for the Handler invoked when the selector is being dismissed

Parameters:
param    
Return:
Object
See also:
setCloseHandler(Function)

setContent

public Object setContent(HTMLElement selectorContent)

Sets the content of this popup window.

Parameters:
selectorContent  -  the dom element that is the content of the popupwindow
Return:
Object

SetFocusOnOpen

protected Object SetFocusOnOpen(Boolean focusHint)

Parameters:
focusHint  -  determines if the popup window should steal focus when opened. The AdfDhtmlPopupWindow.HINT_FOCUS sets this value.
Return:
Object

ShouldHideOnClip

protected Boolean ShouldHideOnClip()

Return boolean indicating if popup window should hide on clip. This behavior is by default true, and can be overwriten in subclasses.

Return:
Boolean - if popup window should hide on clip

show

public Object show(Object hints)

Displays a popup window on the screen.

Parameters:
hints  -  a set of popup hints (see AdfDhtmlPopupWindow)
Default value = null
Return:
Object
See also:
hide()
Overrides:
AdfAbstractFloatingElement.show()

_size

private Object _size()

Sizes the popup window and then validate the position with the position manager service. If animation is enabled, animate the window sizing from the alignment computed by the position manager.

Return:
Object

_toggleOffAnimating

private void _toggleOffAnimating()

When a popup is open and there is not room for it in the window it foces scroll. In IE this causes several "resize" events. The last resize is after popup has been open and animation stopped. This function is called in a timeout period for IE giving the position manager more time to process the resize events and discard if still animating.

Return:
void - null
See also:
_animationComplete(Object)

_unregisterEventHandlers

private Object _unregisterEventHandlers()

Unregisters listeners registered with the document.

Return:
Object

WrapContent

protected Object WrapContent(Object hints,
                             Object content,
                             Object isScreenReaderMode)

Wraps the content of the popup window.

Parameters:
hints    
content    
isScreenReaderMode    
Return:
Object - the wrapped content

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

 

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