OracleJavaScript API Reference for Oracle ADF Faces

 

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

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

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlRichDialogService

public class AdfDhtmlRichDialogService
extends AdfObject
This is a singleton that is a client counterpart to the RichDialogService. This client service manages dialogs launched as browser windows or inline popups.



Field Summary

private static Object
_INLINEFRAMEID_EXPANDO
private static Object
_OP_CODE
Enumeration for operations on dialog
private static Object
_PANELWINDOWID_EXPANDO
private static Object
_RTNID_EXPANDO
private static Object
_WINDOW_DEFAULT_FEATURES_MAP
Map of default values passed as the feature string when opening a new browser window.
private static Object
_WINDOW_MODALITY_TYPE_APPLICATION_MODAL
Enumeration of the windowModalityType feature that indicates the dialog should be modal.


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

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfDhtmlRichDialogService()
This is a singleton that is a client counterpart to the RichDialogService.


Method Summary

private static String
_buildFeatureString(Object features)
private static void
_cancel(Number rtnId)
Cancels an inline or browser dialog window by return id.
public void
cancelAll()
Called by the parent page when unloading.
private static void
_cancelPopup(Object state)
Cancels an inline popup dialog window.
private static void
_checkForIframeTitleChangeWithPPRNavOn(Number rtnId)
This static function is called when we are opening a popup style of dialog and we detect that PPR navigation is enabled.
public void
checkForWindowCanceled(Number rtnId)
Only used by browser window dialogs.
private static Boolean
_closeWindow(Object state)
Closes a dependent browser window using the window reference passed in the state object.
public static boolean
dialogExists(Object rtnId)
private static String
_encodeURL(String srcURL, Number rtnId)
private static Number
_generateRtnId()
public static Object
getAndClearBusyState()
This method returns the information about dialogs launched / closed from the time this method was called last.
private static Object
_getDialogStateToken(Number rtnId)
public static AdfDhtmlRichDialogService
getInstance()
private static Number
_getOpenDialogCount()
public static Object
getWindowNameByReturnId(Object rtnId)
This method is used by WebDriver to figure out a stable window name for a window dialog.
public static boolean
hasModalDialogsOpen()
Checks to see if there are any open "modal" dialogs.
private static void
_hideModalGlass()
Remvoes the modal glass pane over the parent window.
private static void
_hidePopup(Object state)
Hides an inline popup dialog window.
private static void
_iframeBlurHandler(Object event)
iframeBlurHandler.
private static void
_iframeLoadHandler(DomEvent event)
Invoked when on load of the iframe.
public static boolean
isBusy()
private Object
_isBusyForAutomation()
public void
launchInline(String popupId)
Called by the RichDialogService to launch a dialog in an inline popup.
public void
launchWindow(String srcURL, String windowName, Object features, String dialogSourceClientId)
Used to launch a dialog as a browser window.
private static String
_normalizeLaunchSourceId(Object dialogSourceClientId)
Removes the currency from the client id if the command is in a collection type component.
private static void
_notifyWindowClosed(Object returnId, boolean withNextRequest)
Notify server that a dialog window is closed.
private static Window
_openWindow(String srcURL, String windowName, Object features, Number rtnId)
Opens a new browser window.
private static void
_popupClosedHandler(AdfPopupClosedEvent event)
Popup closed event handler.
private static void
_popupOpenedHandler(AdfPopupOpenedEvent event)
At this point, the dom has been delivered to the client.
private static void
_queueReturnEvent(Object state)
Queues the AdfReturnEvent on the launcher component if if can be found on the page.
private static void
_removeDialogStateToken(Number rtnId)
Removes the state of a dialog that has been dismissed.
public void
returnFrom(Number rtnId)
Cleans up the state of an open dialog, inline or browser window.
private static void
_setBusy(boolean isBusy, String op)
private static Object
_setDialogStateToken(Number rtnId, Object state)
private static void
_setWindowFocus(Number rtnId)
Cancels an inline or browser dialog window by return id.
private static void
_showModalGlass()
Shows the modal glass pane over the parent window.
private Object
_trackBusyState(Object isBusy, Object op)
static void
__unloadDocument(AdfRichPopup popup)
Force the iframe in the popup to unload its document to prevent additional GET requests when the visibility of the iframe is toggled in FF and Safari and also when the iframe is reparented in the dom.
public void
unsetWindowDialogCanceled(Number rtnId)
Only used by browser window dialogs.
void
__visitWindows(Function callback)
Visits all the open dialogs passing the state token to the callback function
public static Object
whyIsNotDialogSynchronizedWithServer(Object rtnId)
Counterpart of AdfDhtmlPage.whyIsNotSynchronizedWithServer This method reaches out to the dialog with return id passed and executes AdfPage.PAGE.whyIsNotSynchronizedWithServer on the dialog's ADF page.


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

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


Field Detail


_INLINEFRAMEID_EXPANDO

private static Object _INLINEFRAMEID_EXPANDO

_OP_CODE

private static Object _OP_CODE

Enumeration for operations on dialog

_PANELWINDOWID_EXPANDO

private static Object _PANELWINDOWID_EXPANDO

_RTNID_EXPANDO

private static Object _RTNID_EXPANDO

_WINDOW_DEFAULT_FEATURES_MAP

private static Object _WINDOW_DEFAULT_FEATURES_MAP

Map of default values passed as the feature string when opening a new browser window.

_WINDOW_MODALITY_TYPE_APPLICATION_MODAL

private static Object _WINDOW_MODALITY_TYPE_APPLICATION_MODAL

Enumeration of the windowModalityType feature that indicates the dialog should be modal.

Constructor Detail


AdfDhtmlRichDialogService

public AdfDhtmlRichDialogService()

This is a singleton that is a client counterpart to the RichDialogService. This client service manages dialogs launched as browser windows or inline popups.

Method Detail


_buildFeatureString

private static String _buildFeatureString(Object features)

Parameters:
features  -  map of window features
Return:
String - comma separated value list of features

_cancel

private static void _cancel(Number rtnId)

Cancels an inline or browser dialog window by return id.

Parameters:
rtnId  -  generated numeric id that tracks an open dialog
Return:
void - null

cancelAll

public void cancelAll()

Called by the parent page when unloading. Forces all dependent dialogs to dismiss.

Return:
void - null

_cancelPopup

private static void _cancelPopup(Object state)

Cancels an inline popup dialog window.

Parameters:
state  -  information about the open inline dialog
Return:
void - null

_checkForIframeTitleChangeWithPPRNavOn

private static void _checkForIframeTitleChangeWithPPRNavOn(Number rtnId)

This static function is called when we are opening a popup style of dialog and we detect that PPR navigation is enabled. When PPR navigation is on and when the child document navigates, the iframe will not receive a load event. So, we cannot use the load of the iframe to trigger setting the panel windows title with that of the content document. This function recursively schedules itself in 3 second intervals and will synchronize the content document title with that of the panel window of the inline popup.

Parameters:
rtnId  -  representing the dialog
Return:
void - null

checkForWindowCanceled

public void checkForWindowCanceled(Number rtnId)

Only used by browser window dialogs. Invoked from the frameset unload of the child window. Polls the opened state of the child window. Invokes clean up logic if it detect that the dialog window was closed.

Parameters:
rtnId  -  generated numeric id that tracks an open dialog
Return:
void - null
See also:
"unsetWindowDialogCanceled"

_closeWindow

private static Boolean _closeWindow(Object state)

Closes a dependent browser window using the window reference passed in the state object.

Parameters:
state  -  information about the open dialog
Return:
Boolean - returns the child windows closed state

dialogExists

public static boolean dialogExists(Object rtnId)

Parameters:
rtnId    
Return:
boolean - null true if a dialog identified by the rtnId is managed by this dialog service instance.

_encodeURL

private static String _encodeURL(String srcURL,
                                 Number rtnId)

Parameters:
srcURL  -  url to the internal dialog view
rtnId  -  representing the dialog
Return:
String - adds the rtnId to the srcURL as a query parameter.

_generateRtnId

private static Number _generateRtnId()

Return:
Number - generates a number to represent the dialog.

getAndClearBusyState

public static Object getAndClearBusyState()

This method returns the information about dialogs launched / closed from the time this method was called last. Data structure returned is of the form: [ { "operation": "LAUNCHING_WINDOW_DIALOG", "dialogInfo": { "launchSourceId": launchSourceId, "modal": modal, "windowName": windowName, "rtnId": rtnId } }, { "operation": "LAUNCHING_INLINE_DIALOG", "dialogInfo": { "launchSourceId": launchSourceId, "popupId": popupId, "frameName": inlineFrameId, "panelWindowId": panelWindowId, "rtnId": rtnId} }, ... ] "operation" is defined by AdfDhtmlRichDialogService._OP_CODE

Return:
Object - null if there are no saved states, or an array containing details of dialogs launched / closed

_getDialogStateToken

private static Object _getDialogStateToken(Number rtnId)

Parameters:
rtnId  -  id of an open dialog
Return:
Object - state information about an open dialog

getInstance

public static AdfDhtmlRichDialogService getInstance()

Return:
AdfDhtmlRichDialogService - Instantiate the singleton

_getOpenDialogCount

private static Number _getOpenDialogCount()

Return:
Number - number of open dependent dialogs

getWindowNameByReturnId

public static Object getWindowNameByReturnId(Object rtnId)

This method is used by WebDriver to figure out a stable window name for a window dialog. Because of some logic in dialog framework, the window dialog's "window.name" changes after it is created. So the "windowName" returned from StateMap does not hold good for WebDriver to address the window. This method is used to work around that. WebDriver will invoke this method on a timeout until either (1) window name until it has a "$" or (2) a "null" returned from this method (in case dialog closed in between). This workaround can be removed once there is a direct way to obtain the stable window name.

Parameters:
rtnId    
Return:
Object
See also:
"AdfDhtmlRichDialogService.getAndClearBusyState"
"AdfDhtmlRichDialogService.launchWindow"

hasModalDialogsOpen

public static boolean hasModalDialogsOpen()

Checks to see if there are any open "modal" dialogs.

Return:
boolean - returns true if there are one or more rich dialogs open

_hideModalGlass

private static void _hideModalGlass()

Remvoes the modal glass pane over the parent window.

Return:
void - null

_hidePopup

private static void _hidePopup(Object state)

Hides an inline popup dialog window.

Parameters:
state  -  information about the open inline dialog
Return:
void - null

_iframeBlurHandler

private static void _iframeBlurHandler(Object event)

iframeBlurHandler.

Parameters:
event    
Return:
void - null

_iframeLoadHandler

private static void _iframeLoadHandler(DomEvent event)

Invoked when on load of the iframe. Looks into the content window and grabs the document title and sets the title of the panelWindow.

Parameters:
event  -  onload event handler
Return:
void - null

isBusy

public static boolean isBusy()

Return:
boolean - true if the manager is in a critical section or waiting on a browser window dialog to close.

_isBusyForAutomation

private Object _isBusyForAutomation()

Return:
Object

launchInline

public void launchInline(String popupId)

Called by the RichDialogService to launch a dialog in an inline popup.

Parameters:
popupId  -  the client id of the popup dynamically added to the component tree
Return:
void - null

launchWindow

public void launchWindow(String srcURL,
                         String windowName,
                         Object features,
                         String dialogSourceClientId)

Used to launch a dialog as a browser window. Invoked from the RichDialogService.

Parameters:
srcURL  -  internal dialog view URL
windowName  -  assigned to the dependent child browser window
features  -  map includes in window parameter overrides valid keys are alwayslowered, alwaysraised, channelmode, copyhistory, dependent, directories, fullscreen, hotkeys, location, menubar, resizable, scrollbars, status, titlebar, toolbar, z-loc, windowModalityType
dialogSourceClientId  -  launcher command component that will get a ReturnEvent
Default value = null
Return:
void - null

_normalizeLaunchSourceId

private static String _normalizeLaunchSourceId(Object dialogSourceClientId)

Removes the currency from the client id if the command is in a collection type component.

Parameters:
dialogSourceClientId    
Return:
String - component id of the launcher command component

_notifyWindowClosed

private static void _notifyWindowClosed(Object returnId,
                                        boolean withNextRequest)

Notify server that a dialog window is closed.

Parameters:
returnId    
withNextRequest  -  optional param indicates the notification will be sent to the server with the dialog return event versus forcing its own request.
Return:
void - null

_openWindow

private static Window _openWindow(String srcURL,
                                  String windowName,
                                  Object features,
                                  Number rtnId)

Opens a new browser window.

Parameters:
srcURL  -  target URL to open in new browser window
windowName  -  name of the child window
features  -  a map with feature overrides such as height and width
rtnId  -  identifies the child window
Return:
Window - child window

_popupClosedHandler

private static void _popupClosedHandler(AdfPopupClosedEvent event)

Popup closed event handler. Cleans up the dialog's state and uninstalls the before unload handler if needed.

Parameters:
event  -  popup closed event
Return:
void - null

_popupOpenedHandler

private static void _popupOpenedHandler(AdfPopupOpenedEvent event)

At this point, the dom has been delivered to the client. Search for the nested panelWindow and inlineFrame components. Register a on load listener on the dom of the inlineFrame.

Parameters:
event  -  popup opening event
Return:
void - null

_queueReturnEvent

private static void _queueReturnEvent(Object state)

Queues the AdfReturnEvent on the launcher component if if can be found on the page.

Parameters:
state  -  information about the open dialog
Return:
void - null

_removeDialogStateToken

private static void _removeDialogStateToken(Number rtnId)

Removes the state of a dialog that has been dismissed.

Parameters:
rtnId  -  id of an dialog
Return:
void - null

returnFrom

public void returnFrom(Number rtnId)

Cleans up the state of an open dialog, inline or browser window. Closes down the window and queues the ReturnEvent. Removes the modal glass and uninstalls the before unload handler if there are not anymore open dependent dialogs.

Parameters:
rtnId  -  generated numeric id that tracks an open dialog
Return:
void - null

_setBusy

private static void _setBusy(boolean isBusy,
                             String op)

Parameters:
isBusy  -  indicates if the manager is in a critical section
op  -  indicates the operation for which busy state is set, passed only when isBusy is true
Return:
void - null

_setDialogStateToken

private static Object _setDialogStateToken(Number rtnId,
                                           Object state)

Parameters:
rtnId  -  id of an open dialog
state  -  information about an open dialog
Return:
Object

_setWindowFocus

private static void _setWindowFocus(Number rtnId)

Cancels an inline or browser dialog window by return id.

Parameters:
rtnId  -  generated numeric id that tracks an open dialog
Return:
void - null

_showModalGlass

private static void _showModalGlass()

Shows the modal glass pane over the parent window.

Return:
void - null

_trackBusyState

private Object _trackBusyState(Object isBusy,
                               Object op)

Parameters:
isBusy    
op    
Return:
Object

__unloadDocument

static void __unloadDocument(AdfRichPopup popup)

Force the iframe in the popup to unload its document to prevent additional GET requests when the visibility of the iframe is toggled in FF and Safari and also when the iframe is reparented in the dom.

Parameters:
popup  -  holding nested document
Return:
void - null

unsetWindowDialogCanceled

public void unsetWindowDialogCanceled(Number rtnId)

Only used by browser window dialogs. Invoked from the frameset onload of the child window. This call is for the use case where window dialog was refreshed. On refresh, the window dialog's document unloads. It sets up a timer on the parent ADF page's AdfDhtmlRichDialogService to wait for the dialog dismissal. But when dialog is merely refreshed, this timer never runs out. Also whyIsNotSynchronizedWithServer() keeps returning the timer as the reason the ADF page is not ready. This method call is provided as onload for the window dialog so that the timer scheduling is stopped by changing the loadingState of the window dialog.

Parameters:
rtnId  -  generated numeric id that tracks a window dialog that was refreshed
Return:
void - null
See also:
"checkForWindowCanceled"

__visitWindows

void __visitWindows(Function callback)

Visits all the open dialogs passing the state token to the callback function

Parameters:
callback  -  that is passed the window state map as a single parameter
Return:
void - null

whyIsNotDialogSynchronizedWithServer

public static Object whyIsNotDialogSynchronizedWithServer(Object rtnId)

Counterpart of AdfDhtmlPage.whyIsNotSynchronizedWithServer This method reaches out to the dialog with return id passed and executes AdfPage.PAGE.whyIsNotSynchronizedWithServer on the dialog's ADF page.

Parameters:
rtnId  -  {String} - return id of dialog which we want to sync
Return:
Object - null if dialog's ADF page is synced else an object of the form: { "reason": reason, "message": humanReadableMessageForReason, "details": [arrayContainingOptionalDetails], "nested": if any reason is returned by the dialog's ADF page }

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

 

Generated on 2017.04.19 06:37 UTC
Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.