OracleJavaScript API Reference for Oracle ADF Faces

 

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

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

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.rich.AdfDhtmlPopupPeer

public class AdfDhtmlPopupPeer
extends AdfRichUIPeer



Field Summary

private static Object
_LAUNCH_ID
private static Object
_SHOWN


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

addComponentPropertyChanges, addComponentPropertyGetters, BUSY_STYLECLASS, DISABLED_STYLECLASS, DRAG_SOURCE_STYLECLASS, DROP_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
AdfDhtmlPopupPeer()


Method Summary

public Object
cancel(AdfUIComponent component)
Hides the popup and raises the AdfPopupCanceledEvent.
protected Object
ComponentRemoved(AdfUIComponent component)
Removes the content from the popup component.
private static String
_createPagePropertyKey(String clientId)
Replaces all ":" char's with "$".
protected Object
DispatchComponentEvent(AdfBaseEvent componentEvent)
Callback event invoked when the content has been delivered.
public Boolean
fetchCanceled(AdfUIComponent component)
If the popup is currently fetching content from the server, cancel opening.
public Object
fireContentDeliveryNotify()
This function raises a AdfContentFetchEvent with the AdfContentFetchEvent.LOADED_EVENT_TYPE event type.
public static HTMLElement
getContentDom(Object component)
Returns the DOM node containing the content of the popup node.
private AdfDhtmlMenuPeer
_getFirstMenuPeer(AdfUIComponent component, Object hints)
Inspects the content of the popup and returns the peer if the first child is a AdfRichMenu component.
protected Object
HandleComponentKeyPress(AdfBaseEvent componentEvent)
Intercepts the key press event and invokes a partial submit on the default command if a subform is contained in the content of the popup.
static Object
__handlePopupCanceled(AdfRichPopup component, HTMLElement contentDom)
Checks the content dom for an indicator that the popup was dismissed by calling on one of the cancel methods.
public Object
hide(AdfUIComponent component)
Hides a client popup component and removes the content if the content delivery is CONTENT_DELIVERY_LAZY_UNCACHED.
protected static Object
InitSubclass()
public Object
isVisible(AdfUIComponent component)
Changes the state of the popup component making it visible.
protected Object
PopupClosed(AdfUIComponent component, HTMLElement contentDom)
Fires the "popupClosed" on the component after moving the contentDom back under the popupDom.
protected Object
PopupOpened(AdfUIComponent component)
Callback handler that is invoked after the popup becomes visible.
private Object
_resetContentDelivery(AdfUIComponent component)
public static Object
setChildHints(AdfUIComponent popupComponent, Object hints)
Provides popup hit overrides that are merged into the hints provided as the actaul parameter fo the show method.
private static Object
_setShown(AdfUIComponent component, Boolean shown)
Sets a property on the component that is prorogated to the server indicating the client component is shown.
public Object
show(AdfUIComponent component, Object hints)
Shows the content of the popup component using the supplied hints.
private Object
_showPopup(AdfUIComponent component, Object hints)
Inspects the content of the popup looking for a menu as the first child.
private Number
_visitChildrenForMenu(AdfUIComponent component)
Callback used by _getFirstMenuPeer to visitChildren on the component.


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

addComponentEventHandlers, addComponentPropertyChanges, addComponentPropertyGetters, addDomEventHandlers, addEventHandlerToDomInstance, addSuppressedPPRAttributes, bind, BindToComponent, cancelAllPopups, cancelPopup, ChildVisibilityChanged, ComponentInlineStyleChanged, ComponentPropertyChanged, componentRemoved, ComponentStyleClassChanged, ComponentVisibleChanged, ConvertClientIdToLocator, convertLocatorToClientId, CreateDraggableNode, createPeerClass, createSubId, CreateSubId, DefaultInitClass, 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, GetRichResourceURL, getSubIdDomElement, GetSubIdDomElement, hideAllPopups, hidePopup, Init, InitClass, InitDomElement, initialize, isActive, isInActiveHeirarchy, isPopupVisible, messageNotify, MessageNotify, messageShow, MessageShow, needsChildVisibilityChanges, processPushData, ProcessPushData, registerKeyStroke, replaceDomElement, ReplaceDomElement, resizeNotify, ResizeNotify, scrollIntoView, ScrollIntoView, setBusy, SetBusy, setInlineStyleProperty, showContextMenu, showPopup, TruncateClientId, TruncateClientIdOnceImpl, UnbindFromComponent, unregisterKeyStroke, visitChildren


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

getDefaultDragRecognizer, getParentPeer, initiateDrag, 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


_LAUNCH_ID

private static Object _LAUNCH_ID

_SHOWN

private static Object _SHOWN

Constructor Detail


AdfDhtmlPopupPeer

public AdfDhtmlPopupPeer()

Method Detail


cancel

public Object cancel(AdfUIComponent component)

Hides the popup and raises the AdfPopupCanceledEvent. This event will propagate to the server if there are registered server-side listeners. We also remove the content if the content delivery is CONTENT_DELIVERY_LAZY_UNCACHED.

Parameters:
component  -  target getting dismissed
Return:
Object

ComponentRemoved

protected Object ComponentRemoved(AdfUIComponent component)

Removes the content from the popup component.

Parameters:
component  -  popup
Return:
Object
Overrides:
AdfUIPeer.componentRemoved(AdfUIComponent)

_createPagePropertyKey

private static String _createPagePropertyKey(String clientId)

Replaces all ":" char's with "$".

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

DispatchComponentEvent

protected Object DispatchComponentEvent(AdfBaseEvent componentEvent)

Callback event invoked when the content has been delivered.

Parameters:
componentEvent  -  content fetch event requesting content reload
Return:
Object
Overrides:
AdfUIPeer.DispatchComponentEvent(Object)

fetchCanceled

public Boolean fetchCanceled(AdfUIComponent component)

If the popup is currently fetching content from the server, cancel opening.

Parameters:
component  -  popup component
Return:
Boolean - true if the component is currently fetching content from the server

fireContentDeliveryNotify

public Object fireContentDeliveryNotify()

This function raises a AdfContentFetchEvent with the AdfContentFetchEvent.LOADED_EVENT_TYPE event type. This act completes the dynamic content delivery of the popup. The same event is raised in DispatchComponentEvent but with a AdfContentFetchEvent.FETCH_EVENT_TYPE. This function will be called by the server-side renderer in response to the fetch. The event has to be queued using script versus the DomReplaceNotify that is called when a partial fragment is replaced. The popup might have a parent that is folded into the same PPR request. In this case, the parent will render it's children including the popup and the content notify will be fired on the parent peer.

Return:
Object

getContentDom

public static HTMLElement getContentDom(Object component)

Returns the DOM node containing the content of the popup node. The node is returned by sub client id.

Parameters:
component    
Return:
HTMLElement - content dom node

_getFirstMenuPeer

private AdfDhtmlMenuPeer _getFirstMenuPeer(AdfUIComponent component,
                                                Object hints)

Inspects the content of the popup and returns the peer if the first child is a AdfRichMenu component. If hints are given and the HINT_TYPE_MENU is not given, the content is not inspected.

Parameters:
component  -  root popup component
hints  -  popup hints
Default value = null
Return:
AdfDhtmlMenuPeer - menu peer if the first child is a AdfRichMenu

HandleComponentKeyPress

protected Object HandleComponentKeyPress(AdfBaseEvent componentEvent)

Intercepts the key press event and invokes a partial submit on the default command if a subform is contained in the content of the popup.

Parameters:
componentEvent  -  key stroke event
Return:
Object

__handlePopupCanceled

static Object __handlePopupCanceled(AdfRichPopup component,
                                     HTMLElement contentDom)

Checks the content dom for an indicator that the popup was dismissed by calling on one of the cancel methods. The contentDom is not reparented here. It is only needed to check for the indicator. For the context menu, it will be the menu's content dom not the popup's content. The AdfPopupCanceledEvent is queued if closed in a cancel status. This event will conditionally propragate to the server depending on if there are any server-side listeners attached to the popup component.

Parameters:
component  -  dismissed popup
contentDom  -  content dom that was reparented when the popup was shown
Return:
Object

hide

public Object hide(AdfUIComponent component)

Hides a client popup component and removes the content if the content delivery is CONTENT_DELIVERY_LAZY_UNCACHED.

Parameters:
component  -  target being hidden
Return:
Object

InitSubclass

protected static Object InitSubclass()

Return:
Object

isVisible

public Object isVisible(AdfUIComponent component)

Changes the state of the popup component making it visible.

Parameters:
component  -  target being made visible
Return:
Object
Overrides:
AdfUIPeer.isVisible()

PopupClosed

protected Object PopupClosed(AdfUIComponent component,
                             HTMLElement contentDom)

Fires the "popupClosed" on the component after moving the contentDom back under the popupDom. The act of moving the dom subtree hides the markup under a hidden div. When the popup is used with the context menu, the contentDom parameter will be null. The menu handles reparenting the dom used by the floating element versus using the "::content" marker of the popup's content.

Parameters:
component  -  target being closed
contentDom  -  content shown in the popup
Default value = null
Return:
Object
See also:
AdfDhtmlMenuPeer.PopupClosed(Object, Object, Object)
Overrides:
AdfRichUIPeer.PopupClosed(AdfUIComponent, HTMLElement, String)

PopupOpened

protected Object PopupOpened(AdfUIComponent component)

Callback handler that is invoked after the popup becomes visible. The visibility is conditionally controlled in a timed event. The "popupOpened" event needs to be fired after visible so that the focus can be controlled. This event can not be canceled. The "shown" status is set by calling _setShown prior to raising the AdfPopupOpenEvent.

Parameters:
component  -  source of the AdfPopupOpenedEvent
Return:
Object

_resetContentDelivery

private Object _resetContentDelivery(AdfUIComponent component)

Parameters:
component  -  to reset content delivery
Return:
Object

setChildHints

public static Object setChildHints(AdfUIComponent popupComponent,
                                   Object hints)

Provides popup hit overrides that are merged into the hints provided as the actaul parameter fo the show method.

Parameters:
popupComponent  -  target hints assignee
hints  -  additional hints used by the component when show is invoked
Default value = null
Return:
Object

_setShown

private static Object _setShown(AdfUIComponent component,
                                Boolean shown)

Sets a property on the component that is prorogated to the server indicating the client component is shown.

Parameters:
component  -  target being shown or hidden
shown  -  boolean flag indicating visible state
Return:
Object

show

public Object show(AdfUIComponent component,
                   Object hints)

Shows the content of the popup component using the supplied hints. If the component is already visbile, the function is returned. If the component requires lazy content delivery, the event is queued and this method will be invoked again from the "DispatchComponentEvent" method. This peer makes sure that the "popupOpening" event is fired. If the AdfPopupOpeningEvent is not canceled, the popup is show and the shown status sent to the server. This method hooks-up the PopupOpened callback handler that is invoked after the popup becomes visible.

Parameters:
component  -  popup component
hints  -  parameters setting behaviors
Default value = null
Return:
Object

_showPopup

private Object _showPopup(AdfUIComponent component,
                          Object hints)

Inspects the content of the popup looking for a menu as the first child. If a menu exists, invoke the menus peer; otherwise, invoke the standard popup logic in the base peer. The popup hits are merged with _childHints before invoker either peer.

Parameters:
component  -  target popup component
hints    
Return:
Object

_visitChildrenForMenu

private Number _visitChildrenForMenu(AdfUIComponent component)

Callback used by _getFirstMenuPeer to visitChildren on the component. The callback looks at the first child to see if it is a AdfRichMenu. If the first child is a menu, it is assigned to a temporary private variable. If the child is an AdfRichRegion, the search continues

Parameters:
component  -  child component visited
Return:
Number - returns a value of 2 if traversal has finished, 0 if traversal needs to continue

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

 

Generated on 2009.09.25 03:44 UTC
Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.