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.adfinternal.view.js.laf.dhtml.internalWindow.subids.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
_ANIMATE_SKIN_PROPERTY
private static Object
_ANIMATION_DURATION_SKIN_PROPERTY
private static Object
_BUTTON_ID_MAP
Map of button ids, which are used differently for new vs.
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_EXPANDO
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 org.ecmascript.object.Object

constructor, prototype


Constructor Summary

public
AdfDhtmlDialogPeer()
Client peer for the dialog component.


Method Summary

public Object
fireCancel()
Queues a dialog cancel event.
public String
getAnimateSkinProperty()
public String
getAnimationDurationSkinProperty()
private static HTMLElement
_getButtonDom(String clientId, String buttonId)
Get the af:commandButton or af:button DOM Element, if found.
private HTMLElement
_getButtonRootElement(Object domElement, String clientId)
Returns an af:button or af:commandButton root element for the provided interior domElement, or null if no potential button root element was found.
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)
Bug #13560292 - this method needs explicit export since it is being called from java code
protected Object
Init(Object component, Object usage)
protected Object
InitDomElement(Object component, Object domElement)
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:
private HTMLElement
_returnButtonElement(String buttonId)
Convenience method to handle both new af:buttons and old af:commandButtons.
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.
static Object
__setButtonVisible(String clientId, String buttonId, Boolean makeVisible)
Allow button visibility to be toggled on and off.
Object
__setDefaultButtonDisabled(String clientId, Boolean disabled)
Set the default button to the provided disabled value.
private static Object
_setOutcomeExpandos(String clientId)
Stores the outcome mapped to a button in an expando.
private static Object
_usesUnifiedButtons(Object clientId)
Returns true if dialog with this clientId is using unified af:buttons.


Field Detail


_ANIMATE_SKIN_PROPERTY

private static Object _ANIMATE_SKIN_PROPERTY

_ANIMATION_DURATION_SKIN_PROPERTY

private static Object _ANIMATION_DURATION_SKIN_PROPERTY

_BUTTON_ID_MAP

private static Object _BUTTON_ID_MAP

Map of button ids, which are used differently for new vs. old button impl.

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

private static Object _OUTCOME_ATTR_NAME_EXPANDO

_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. [close_icon --> close] - close icon 4. [ok_button] - ok button (mapped programmatically) 5. [yes_button] - yes button (mapped programmatically) 6. [no_button] - no button (mapped programmatically) 7. [cancel_button] - cancel button (mapped programmatically) 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

getAnimateSkinProperty

public String getAnimateSkinProperty()

Return:
String - null "-tr-animate" skinning property for the dialog component.

getAnimationDurationSkinProperty

public String getAnimationDurationSkinProperty()

Return:
String - skinning property name for the animation duration of the dialog.

_getButtonDom

private static HTMLElement _getButtonDom(String clientId,
                                         String buttonId)

Get the af:commandButton or af:button DOM Element, if found.

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

_getButtonRootElement

private HTMLElement _getButtonRootElement(Object domElement,
                                          String clientId)

Returns an af:button or af:commandButton root element for the provided interior domElement, or null if no potential button root element was found.

Parameters:
domElement    
clientId  -  dialog client id
Return:
HTMLElement - the root HTML dom element for the button, or null if not found.

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

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:
AdfDhtmlPanelWindowPeer.GetSubIdDomElement(String)

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

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

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

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

handleEscapeKey

public Object handleEscapeKey(Object event)

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

Parameters:
event    
Return:
Object

hideDialogIfNoMessages

public static Object hideDialogIfNoMessages(Object id)

Bug #13560292 - this method needs explicit export since it is being called from java code

Parameters:
id    
Return:
Object

Init

protected Object Init(Object component,
                      Object usage)

Parameters:
component    
usage    
Return:
Object

InitDomElement

protected Object InitDomElement(Object component,
                                Object domElement)

Parameters:
component    
domElement    
Return:
Object

InitSubclass

protected static Object InitSubclass()

Return:
Object

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

_returnButtonElement

private HTMLElement _returnButtonElement(String buttonId)

Convenience method to handle both new af:buttons and old af:commandButtons.

Parameters:
buttonId  -  the partial id used for the child button
Return:
HTMLElement - the DOM within the component related to scopedId

SetBusy

protected Object SetBusy(Object isBusy)

Override to disable the provided buttons when the dialog is busy

Parameters:
isBusy    
Return:
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

__setButtonVisible

static Object __setButtonVisible(String clientId,
                                  String buttonId,
                                  Boolean makeVisible)

Allow button visibility to be toggled on and off.

Parameters:
clientId  -  the client id of the dialog
buttonId  -  the id for the button
makeVisible  -  new visible state
Return:
Object

__setDefaultButtonDisabled

Object __setDefaultButtonDisabled(String clientId,
                                   Boolean disabled)

Set the default button to the provided disabled value.

Parameters:
clientId  -  the client id of the dialog
disabled  -  new disabled value
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

_usesUnifiedButtons

private static Object _usesUnifiedButtons(Object clientId)

Returns true if dialog with this clientId is using unified af:buttons.

Parameters:
clientId    
Return:
Object

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

 

Generated on 2014.03.27 12:59 UTC
Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.