OracleJavaScript API Reference for Oracle ADF Faces

 

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

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

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adf.view.js.base.AdfUIPeer
               |
               +--oracle.adf.view.js.laf.rich.AdfRichUIPeer
                     |
                     +--oracle.adfinternal.view.js.laf.dhtml.internalWindow.AdfDhtmlPanelWindowPeer
                           |
                           +--oracle.adfinternal.view.js.laf.dhtml.internalWindow.AdfDhtmlDialogPeer

public class AdfDhtmlDialogPeer
extends AdfDhtmlPanelWindowPeer
Client peer for the dialog component.



Field Summary

private static Object
_ANIMATION_DURATION_SKIN_PROPERTY
private static Object
_BUTTON_IDS
private static Object
_BUTTON_OUTCOMES
private static Object
_CANCEL_ID
private static Object
_DIALOG_RESIZE_GHOST_CLASS
private static Object
_NO_ID
private static Object
_OK_ID
private static Object
_OUTCOME_ATTR_NAME
private static Object
_SUB_ID_MAP
dialog component publishes the following sub ids [External Subid --> Internal Client SubId]:- 1.
private static Object
_YES_ID


Fields inherited from oracle.adfinternal.view.js.laf.dhtml.internalWindow.AdfDhtmlPanelWindowPeer

GetSubIdDomElement


Fields inherited from oracle.adf.view.js.laf.rich.AdfRichUIPeer

addComponentPropertyChanges, addComponentPropertyGetters, BUSY_STYLECLASS, DISABLED_STYLECLASS, DRAG_SOURCE_STYLECLASS, DROP_TARGET_STYLECLASS, FOCUS_TARGET_STYLECLASS, HOVER_TARGET_STYLECLASS, READONLY_STYLECLASS


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

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfDhtmlDialogPeer()
Client peer for the dialog component.


Method Summary

public Object
fireCancel()
Queues a dialog cancel event.
public String
getAnimationDurationSkinProperty()
private static HTMLElement
_getButtonDom(String clientId, String buttonId)
Get button DOM Element
public HTMLElement
getDefaultButtonDom(String clientId)
Looks for the default button in order of precedence.
protected String
GetResizeGhostSelector()
protected HTMLElement
GetSubIdDomElement(String subElementId)
Returns the dom element for a given subElementId for dialog.
protected Object
HandleComponentClick(AdfUIInputEvent componentEvent)
Raises the correct AdfDialogEvent based on the id of the dom element associated with the native event target.
protected Object
HandleComponentKeyDown(AdfUIInputEvent componentEvent)
The AdfUIInputEvent.KEY_DOWN_EVENT_TYPE is registered in the super class AdfDhtmlPanelWindowPeer.
protected Object
HandleComponentKeyPress(AdfUIInputEvent componentEvent)
There is a one condition that is handled here:
protected Object
HandleComponentKeyUp(AdfUIInputEvent componentEvent)
The AdfUIInputEvent.KEY_UP_EVENT_TYPE is registered in the super class AdfDhtmlPanelWindowPeer.
public Object
handleEscapeKey(Object event)
Fires the AdfDialogEvent.OUTCOME_CANCEL event in response to an Esc key.
public static Object
hideDialogIfNoMessages(Object id)
protected Object
Init(Object component, Object usage)
Initializes the instance.
protected Object
InitDomElement(Object component, Object domElement)
Initialize the associated domElement when the peer is created.
protected static Object
InitSubclass()
protected Boolean
IsBusy(String clientId)
private static Boolean
_isOKPresent(String clientId)
Returns the OK button's DOM element, if any
private static Boolean
_isYesPresent(String clientId)
private String
_queueDialogOutcome(AdfRichDialog component, AdfUIInputEvent componentEvent, Boolean ignoreCancelAndClose)
Queues a dialog event with an appropriate outcome if the component event was for one of these source elements:
protected Object
SetBusy(Object isBusy)
Override to disable the provided buttons when the dialog is busy
private static Object
_setButtonDisableState(String clientId, Boolean disabled)
Stores the outcome mapped to a button in an expando.
private static Object
_setOutcomeExpandos(String clientId)
Stores the outcome mapped to a button in an expando.


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

BindToComponent, calculateMinimumContentSize, Cancel, ComponentContentHeightChanged, ComponentContentWidthChanged, ComponentRemoved, ComponentTitleChanged, ComponentTitleIconSourceChanged, GetComponentContentHeight, GetComponentContentWidth, getDragElement, HandleComponentFocus, HandleComponentMouseDown, Hide, IsClose, isContentResized


Methods inherited from oracle.adf.view.js.laf.rich.AdfRichUIPeer

addComponentEventHandlers, addComponentPropertyChanges, addComponentPropertyGetters, addDomEventHandlers, addEventHandlerToDomInstance, addSuppressedPPRAttributes, bind, cancelAllPopups, cancelPopup, ChildVisibilityChanged, ComponentInlineStyleChanged, ComponentPropertyChanged, componentRemoved, ComponentStyleClassChanged, ComponentVisibleChanged, ConvertClientIdToLocator, convertLocatorToClientId, CreateDraggableNode, createPeerClass, createSubId, CreateSubId, DefaultInitClass, descendantMessageChanged, DescendantMessageChanged, DispatchComponentEvent, domReplaceNotify, DomReplaceNotify, focus, Focus, getAbsoluteId, getAbsoluteLocator, getAccessibleName, GetAccessibleName, getAllPopups, getComponent, GetComponent, GetComponentId, getComponentParent, getComponentProperty, GetComponentVisible, getDescendantComponents, getDomContentElement, getDomContentElementForComponent, GetDomContentElementForNode, getDomDocument, getDomElement, getDomElementForComponent, getDomNode, GetDomNodeForCommentComponent, getDomNodeForComponent, getDragOverFeedback, GetDragOverFeedback, getDragTransferable, GetDragTransferable, getFirstAncestorComponent, getInlineEditor, GetInlineEditor, getInlineStyleProperty, getLocatorByDomElement, getPagePosition, getPopupWindow, getReadyState, GetReadyState, GetRichResourceURL, getSubIdDomElement, hideAllPopups, hidePopup, InitClass, initialize, isActive, isInActiveHeirarchy, isPopupVisible, messageNotify, MessageNotify, messageShow, MessageShow, needsChildVisibilityChanges, needsFocusTargetStyleClass, PopupClosed, processPushData, ProcessPushData, registerKeyStroke, replaceDomElement, ReplaceDomElement, resizeNotify, ResizeNotify, scrollIntoView, ScrollIntoView, setBusy, setInlineStyleProperty, showContextMenu, showPopup, TruncateClientId, TruncateClientIdOnceImpl, UnbindFromComponent, unregisterKeyStroke, visitChildren


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

getDefaultDragRecognizer, getParentPeer, initiateDrag, isVisible, needsResizeNotify


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

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


Field Detail


_ANIMATION_DURATION_SKIN_PROPERTY

private static Object _ANIMATION_DURATION_SKIN_PROPERTY

Overrides:
AdfDhtmlPanelWindowPeer._ANIMATION_DURATION_SKIN_PROPERTY

_BUTTON_IDS

private static Object _BUTTON_IDS

_BUTTON_OUTCOMES

private static Object _BUTTON_OUTCOMES

_CANCEL_ID

private static Object _CANCEL_ID

_DIALOG_RESIZE_GHOST_CLASS

private static Object _DIALOG_RESIZE_GHOST_CLASS

_NO_ID

private static Object _NO_ID

_OK_ID

private static Object _OK_ID

_OUTCOME_ATTR_NAME

private static Object _OUTCOME_ATTR_NAME

_SUB_ID_MAP

private static Object _SUB_ID_MAP

dialog component publishes the following sub ids [External Subid --> Internal Client SubId]:- 1. [title --> _ttxt] - dialog title text 2. [content --> contentContainer] - center content 3. [ok_button --> ok] - ok button 4. [yes_button --> yes] - yes button 5. [no_button --> no] - no button 6. [cancel_button --> cancel] - cancel button 7. [close_icon --> close] - close icon 8. [title_icon] - the icon in the title (mapped programmatically)

Overrides:
AdfDhtmlPanelWindowPeer._SUB_ID_MAP

_YES_ID

private static Object _YES_ID

Constructor Detail


AdfDhtmlDialogPeer

public AdfDhtmlDialogPeer()

Client peer for the dialog component.

Method Detail


fireCancel

public Object fireCancel()

Queues a dialog cancel event. This is invoked when the dialog is force close by the AdfDhtmlDialogManager when a modal dialog has modeless children.

Return:
Object

getAnimationDurationSkinProperty

public String getAnimationDurationSkinProperty()

Return:
String - skinning property name for the animation duration of the dialog.
Overrides:
AdfDhtmlPanelWindowPeer.getAnimationDurationSkinProperty()

_getButtonDom

private static HTMLElement _getButtonDom(String clientId,
                                         String buttonId)

Get button DOM Element

Parameters:
clientId  -  the client id of the dialog
buttonId  -  used to for the subclientId
Return:
HTMLElement - The HTML Dom Element for the button

getDefaultButtonDom

public HTMLElement getDefaultButtonDom(String clientId)

Looks for the default button in order of precedence. Returns null if "Yes", "OK", "No", or "Cancel" buttons do not exist.

Parameters:
clientId  -  the client id of the dialog
Return:
HTMLElement - The HTML Dom Element for the button

GetResizeGhostSelector

protected String GetResizeGhostSelector()

Return:
String - the selector name that is used to locate the client style that's applied the to drag ghost during drag-and-drop resizing
Overrides:
AdfDhtmlPanelWindowPeer.GetResizeGhostSelector()

GetSubIdDomElement

protected HTMLElement GetSubIdDomElement(String subElementId)

Returns the dom element for a given subElementId for dialog.

Parameters:
subElementId  -  the id of the child dom element or component
Return:
HTMLElement - the DOM within the component related to scopedId
Overrides:
AdfRichUIPeer.getSubIdDomElement(Object, Object)

HandleComponentClick

protected Object HandleComponentClick(AdfUIInputEvent componentEvent)

Raises the correct AdfDialogEvent based on the id of the dom element associated with the native event target. Expandos attributes set in the InitDomElement are use to map the target's id to the AdfDialogEvent's outcome.

Parameters:
componentEvent  -  click event
Return:
Object
Overrides:
AdfDhtmlPanelWindowPeer.HandleComponentClick(AdfUIInputEvent)

HandleComponentKeyDown

protected Object HandleComponentKeyDown(AdfUIInputEvent componentEvent)

The AdfUIInputEvent.KEY_DOWN_EVENT_TYPE is registered in the super class AdfDhtmlPanelWindowPeer. There are a few conditions that are handled here; otherwise, the super implementation is invoked. 1.) If the enter key was used and the OK button is present, AdfDialogEvent.OUTCOME_OK is fired. 2.) If the enter key was used and the YES button is present, AdfDialogEvent.OUTCOME_YES is fired. Note that if the enter key was used and the close or cancel buttons were in focus, we do not want to do anything because those will be handled by keypress instead.

Parameters:
componentEvent  -  wrapped key down event
Return:
Object
Overrides:
AdfDhtmlPanelWindowPeer.HandleComponentKeyDown(AdfUIInputEvent)

HandleComponentKeyPress

protected Object HandleComponentKeyPress(AdfUIInputEvent componentEvent)

There is a one condition that is handled here: 1.) If enter key on the close or cancel buttons, hide the dialog.

Parameters:
componentEvent  -  wrapped key press event
Return:
Object
Overrides:
AdfDhtmlPanelWindowPeer.HandleComponentKeyPress(AdfUIInputEvent)

HandleComponentKeyUp

protected Object HandleComponentKeyUp(AdfUIInputEvent componentEvent)

The AdfUIInputEvent.KEY_UP_EVENT_TYPE is registered in the super class AdfDhtmlPanelWindowPeer. There is one condition that is handled here; otherwise, the super implementation is invoked. 1.) If the space key was used on the close button, the AdfDialogEvent.OUTCOME_CANCEL is fired.

Parameters:
componentEvent  -  wrappered dom event
Return:
Object
Overrides:
AdfDhtmlPanelWindowPeer.HandleComponentKeyUp(AdfUIInputEvent)

handleEscapeKey

public Object handleEscapeKey(Object event)

Fires the AdfDialogEvent.OUTCOME_CANCEL event in response to an Esc key.

Parameters:
event    
Return:
Object
Overrides:
AdfDhtmlPanelWindowPeer.handleEscapeKey(Object)

hideDialogIfNoMessages

public static Object hideDialogIfNoMessages(Object id)

Parameters:
id    
Return:
Object

Init

protected Object Init(Object component,
                      Object usage)

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

Parameters:
component    
usage    
Return:
Object
Overrides:
AdfObject.Init()

InitDomElement

protected Object InitDomElement(Object component,
                                Object domElement)

Initialize the associated domElement when the peer is created. Stateless peers are not bound at the time that this method is called.

Parameters:
component    
domElement    
Return:
Object
Overrides:
AdfRichUIPeer.InitDomElement(AdfUIComponent, Object)

InitSubclass

protected static Object InitSubclass()

Return:
Object
Overrides:
AdfDhtmlPanelWindowPeer.InitSubclass()

IsBusy

protected Boolean IsBusy(String clientId)

Parameters:
clientId  -  the client id of the dialog
Return:
Boolean - null true if the dialog is in a busy state.

_isOKPresent

private static Boolean _isOKPresent(String clientId)

Returns the OK button's DOM element, if any

Parameters:
clientId  -  the client id of the dialog
Return:
Boolean - true if the OK button is within the content of the dialog

_isYesPresent

private static Boolean _isYesPresent(String clientId)

Parameters:
clientId  -  the client id of the dialog
Return:
Boolean - true if the Yes button is within the content of the dialog

_queueDialogOutcome

private String _queueDialogOutcome(AdfRichDialog component,
                                   AdfUIInputEvent componentEvent,
                                   Boolean ignoreCancelAndClose)

Queues a dialog event with an appropriate outcome if the component event was for one of these source elements: - The yes button - The no button - The ok button - The cancel button - The close button

Parameters:
component  -  this dialog component
componentEvent  -  the mouse up or key up component event
ignoreCancelAndClose  -  true if cancel/close should not queue an outcome
Return:
String - undefined , the DialogEvent outcome, or true if handled otherwise

SetBusy

protected Object SetBusy(Object isBusy)

Override to disable the provided buttons when the dialog is busy

Parameters:
isBusy    
Return:
Object
Overrides:
AdfRichUIPeer.setBusy(Object, Object)

_setButtonDisableState

private static Object _setButtonDisableState(String clientId,
                                             Boolean disabled)

Stores the outcome mapped to a button in an expando. This reference is used by the HandleComponentMouseUp to raise correct AdfDialogEvent.

Parameters:
clientId  -  the client id of the dialog
disabled    
Return:
Object

_setOutcomeExpandos

private static Object _setOutcomeExpandos(String clientId)

Stores the outcome mapped to a button in an expando. This reference is used by the HandleComponentMouseUp to raise correct AdfDialogEvent.

Parameters:
clientId  -  the client id of the dialog
Return:
Object

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.