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
_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
_beforeUnloadHandler(DomEvent event)
Before unload handler that will notify the use there are dependent dialogs open.
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()
private static Object
_getDialogStateToken(Number rtnId)
public static AdfDhtmlRichDialogService
getInstance()
private static Number
_getOpenDialogCount()
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
_iframeLoadHandler(DomEvent event)
Invoked when on load of the iframe.
private static void
_installBeforeUnloadHandler()
Installs the before unload handler for the first dependent dialog.
public static boolean
isBusy()
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)
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)
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 static void
_uninstallBeforeUnloadHandler()
Uninstalls the onl before unload handler if there are no longer open dialogs.
private 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.
void
__visitWindows(Function callback)
Visits all the open dialogs passing the state token to the callback function


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

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


Field Detail


_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


_beforeUnloadHandler

private static String _beforeUnloadHandler(DomEvent event)

Before unload handler that will notify the use there are dependent dialogs open.

Parameters:
event  -  before unload event
Return:
String - before unload message

_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

_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.

_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

_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

_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

_installBeforeUnloadHandler

private static void _installBeforeUnloadHandler()

Installs the before unload handler for the first dependent dialog.

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.

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 inculudes in window parameter overrides
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)

Notify server that a dialog window is closed.

Parameters:
returnId    
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)

Parameters:
isBusy  -  indicates if the manager is in a critical section
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

_uninstallBeforeUnloadHandler

private static void _uninstallBeforeUnloadHandler()

Uninstalls the onl before unload handler if there are no longer open dialogs.

Return:
void - null

_unloadDocument

private 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

__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

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.