# JavaScript API Reference for Oracle ADF Faces

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Fusion Middleware Javascript API Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81451-01
PREV NEXT | FRAMES NO FRAMES Warning: private items are visible |

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

# oracle.adfinternal.view.js.laf.dhtml.rich
Class AdfDhtmlCommandToolbarButtonPeer

## Warning:

- This is an unsupported, internal implementation class.
- Use an API class that might provide equivalent functionality instead.
- This class will change without notice.
- It is not recommended that you use anything in this class.

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

    public class AdfDhtmlCommandToolbarButtonPeer
    extends AdfRichUIPeer

Peer Implementation for the command toolbar button

Deprecated: The commandToolbarButton component has been deprecated. Use the button component instead. `AdfDhtmlButtonPeer`

## Field Summary
`private static Object` | `_AFR_GROUPID`
`private static Object` | `_BUSY`
`protected Object` | `ComponentTextChanged`
`private static Object` | `_DEPRESSED_STYLE_CLASS`
`private static Object` | `_POPUP_CONTAINER`
`private static Object` | `_POPUP_CONTENT_ID`
`private static Object` | `_POPUP_CONTEXT_AREA`
`private static Object` | `_POPUP_ELEMENT`
`private static Object` | `_POPUP_ID`
`private static Object` | `_SELECTED_STYLE_CLASS`
`private static Object` | `_SUB_ID_MAP` commandToolbarButton component publishes the following sub ids [External Subid --> Internal Client SubId]:- 1.

### Fields inherited from oracle.adf.view.js.laf.rich.AdfRichUIPeer
`addComponentPropertyChanges, addComponentPropertyGetters, BUSY_STYLECLASS, CreateSubId, DISABLED_STYLECLASS, DRAG_READY_STYLECLASS, DRAG_SOURCE_STYLECLASS, DROP_TARGET_STYLECLASS, FOCUS_TARGET_STYLECLASS, HOVER_TARGET_STYLECLASS, READONLY_STYLECLASS, SELECTED_STYLECLASS`

### Fields inherited from oracle.adf.view.js.base.AdfObject
`constructor, superclass`

### Fields inherited from org.ecmascript.object.Object
`prototype`

## Constructor Summary
`public` | `AdfDhtmlCommandToolbarButtonPeer()` Peer Implementation for the command toolbar button

## Method Summary
`protected Object` | `BindToComponent(Object component, Object domElement)` Update any state necessary to bind to the current DOM component
`protected Object` | `ComponentDisabledChanged(Object component, Object domElement, Object newValue, Object oldValue)`
`protected Object` | `ComponentSelectedChanged(Object component, Object domElement, Object newValue, Object oldValue)`
`protected Object` | `ComponentShortDescChanged(Object component, Object domElement, Object newValue, Object oldValue)` Property change handler
`private Object` | `_disableAriaChecked(AdfUIComponent component)` set arai-checked to false for unselected radio button
`private Object` | `_disableAriaPressed(AdfUIComponent component)` set aria-pressed to false for unselected button (toggle button)
`private Object` | `_displayDefaultIcon(Object component)`
`private Object` | `_displayDisabledIcon(Object component)`
`private Object` | `_displayIcon(Object component, Object icon)`
`private Object` | `_displayMouseDownIcon(Object component)`
`private Object` | `_displayMouseOverIcon(Object component)`
`private Object` | `_enableAriaChecked(AdfUIComponent component)` set aria-checked to true for selected radio button
`private Object` | `_enableAriaPressed(AdfUIComponent component)` set aria-pressed to selected button (toggle button)
`private Object` | `_execute()` Turns component-level clicks into Action events.
`protected Object` | `GetBestMatchSubId(Object domElement)` Returns the best match subId for the given domElement.
`protected Object` | `GetComponentText(Object component, Object domElement)` Optimized getter for text property
`private Object` | `_getGroupId(Object domElement)` Get the groupId for the specified domElement.
`private Object` | `_getIconElement(Object component)`
`protected Object` | `GetInlineEditor(Object event)` Given the component this peer is bound to and the optional DOM event to start editing, return the AdfRichInlineEditor for this component at the event location, if any.
`private Object` | `_getPopupId()` If available, returns the popup's id.
`protected Object` | `GetSubIdDomElement(Object subElementId)` Returns the DOM element identified by the passed in subId.
`protected Object` | `HandleComponentClick(Object componentEvent)` Turns component-level clicks into Action events.
`protected Object` | `HandleComponentKeyDown(Object componentEvent)` Handles keydown event to allow the popup facet popup to open by keyboard
`protected Object` | `HandleComponentMouseDown(AdfComponentEvent componentEvent)` Handles the mousedown either on the button or its dropdown, and adjusts the mousedown state accordingly.
`protected Object` | `HandleComponentMouseOut(AdfComponentEvent componentEvent)` On mouseout, the default icon is displayed.
`protected Object` | `HandleComponentMouseOver(AdfComponentEvent componentEvent)` On mouseover, the mouseover icon is displayed.
`protected Object` | `HandleComponentMouseUp(AdfComponentEvent componentEvent)` On mouse up, the mouseover icon is displayed.
`protected static Object` | `InitSubclass()`
`private boolean` | `_isEventInRootElement(AdfComponentEvent componentEvent)` Checks if the event target is within the root dom element.
`private Object` | `_isInPopupSelector(AdfComponentEvent componentEvent)` Sees if the event is in the popup target.
`private Object` | `_openPopupMenu(Object popupId, Object autoFocus, AdfComponentEvent componentEvent)` Opens the popup facet popup and aligns it after_start with the selector button
`protected Object` | `PopupClosed(Object component, Object contentDom, Object popupId)` Hook for notifying a peer that a popup of its was just closed.
`Object` | `__preferredSizeChangeNotify(AdfUIComponent component)` Notification that the components preferred size has changed.
`private Object` | `_removeAriaDisabled(AdfUIComponent component)` remove aria disabled attribute when enabled
`private Object` | `_setAriaDisabled(AdfUIComponent component)` set aria disabled attribute for disabled button
`protected Object` | `SetBusy(Object isBusy)` Override to disable the button when in busy state.
`private Object` | `_setDepressedStyle(Object component, Object depressed)` CommandToolbarButton uses depressed instead of active, in order to have finer control over depressed highlighting.
`private Object` | `_toggleComponentUnselected(Object buttonComponent)` Called to toggle a commandToolbarButton to off (unselected) when a new item is selected in a group of radio commandToolbarButtons.
`private Object` | `_toggleRadioGroupItems()` When a radio type item is selected, the other radio items in the group are unselected.

### Methods inherited from oracle.adf.view.js.laf.rich.AdfRichUIPeer
`addComponentEventHandlers, addComponentPropertyChanges, addComponentPropertyGetters, addDomEventHandlers, addEventHandlerToDomInstance, addSuppressedPPRAttributes, applyDragReadyState, ApplyDragReadyState, applyDragSourceState, ApplyDragSourceState, bind, cancelAllPopups, cancelPopup, ChildVisibilityChanged, clearDragReadyState, ClearDragReadyState, clearDragSourceState, ClearDragSourceState, ComponentInlineStyleChanged, ComponentPropertyChanged, componentRemoved, ComponentRemoved, ComponentStyleClassChanged, ComponentVisibleChanged, ConvertClientIdToLocator, convertLocatorToClientId, createComponentEvent, CreateComponentEvent, CreateDraggableNode, createInnerPeerClassWithSubId, createPeerClass, createSubId, DefaultInitClass, descendantMessageChanged, DescendantMessageChanged, DispatchComponentEvent, DispatchUncanceledComponentEvent, 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, getDomRootNodes, GetDomRootNodes, getDragOverFeedback, GetDragOverFeedback, getDragTransferable, GetDragTransferable, GetElementToReplaceWithSVG, getFallbackDomElement, GetFallbackDomElement, getFirstAncestorComponent, getInlineEditor, getInlineStyleProperty, getLocatorByDomElement, getPagePosition, getPopupWindow, getReadyState, GetReadyState, GetRichResourceURL, getSubIdDomElement, hideAllPopups, hidePopup, InitClass, InitDomElement, initialize, isAbsoluteLocatorCacheable, isActive, isBusy, isComponentContainedByElement, isInActiveHeirarchy, isInlineSVGIcon, isPopupVisible, messageNotify, MessageNotify, messageShow, MessageShow, needsChildVisibilityChanges, needsFocusTargetStyleClass, processPushData, ProcessPushData, registerADSAccessibility, RegisterADSAccessibility, registerKeyStroke, replaceDomElement, ReplaceDomElement, resizeNotify, ResizeNotify, scrollIntoView, ScrollIntoView, setBusy, setInlineStyleProperty, showContextMenu, showPopup, simulateMouse, SimulateMouseOnDescendant, TruncateClientId, TruncateClientIdOnceImpl, UnbindFromComponent, unregisterKeyStroke, UpdateMessageType, visitChildren`

### Methods inherited from oracle.adf.view.js.base.AdfUIPeer
`getDefaultDragRecognizer, getParentPeer, Init, initiateDrag, isVisible, needsResizeNotify`

### Methods inherited from oracle.adf.view.js.base.AdfObject
`adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, exportPrototypeSymbol, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString`

## Field Detail

### _AFR_GROUPID

`private static Object _AFR_GROUPID`

### _BUSY

`private static Object _BUSY`

### ComponentTextChanged

`protected Object ComponentTextChanged`

### _DEPRESSED_STYLE_CLASS

`private static Object _DEPRESSED_STYLE_CLASS`

### _POPUP_CONTAINER

`private static Object _POPUP_CONTAINER`

### _POPUP_CONTENT_ID

`private static Object _POPUP_CONTENT_ID`

### _POPUP_CONTEXT_AREA

`private static Object _POPUP_CONTEXT_AREA`

### _POPUP_ELEMENT

`private static Object _POPUP_ELEMENT`

### _POPUP_ID

`private static Object _POPUP_ID`

### _SELECTED_STYLE_CLASS

`private static Object _SELECTED_STYLE_CLASS`

### _SUB_ID_MAP

`private static Object _SUB_ID_MAP`
  commandToolbarButton component publishes the following sub ids [External Subid --> Internal Client SubId]:- 1. [dropdown --> popEl] - the dropdown indicator, present on a button with a popup facet 2. [icon --> icon] - the button icon, if present 3. [text --> the text value (mapped programmatically)] Note that "text" does not have a corresponding ID to map to. Instead it is determined programmatically in AdfDhtmlCommandToolbarButtonPeer.GetSubIdDomElement().

## Constructor Detail

### AdfDhtmlCommandToolbarButtonPeer

`public AdfDhtmlCommandToolbarButtonPeer()`
  Peer Implementation for the command toolbar button

## Method Detail

### BindToComponent

`protected Object BindToComponent(Object component,
Object domElement)`
  Update any state necessary to bind to the current DOM component
  Parameters:

    `component` |  |
    `domElement` |  |

  Return:
    `Object`
  Overrides:
    `AdfRichUIPeer.BindToComponent(Object, Object)`

### ComponentDisabledChanged

`protected Object ComponentDisabledChanged(Object component,
Object domElement,
Object newValue,
Object oldValue)`
  Parameters:

    `component` |  |
    `domElement` |  |
    `newValue` |  |
    `oldValue` |  |

  Return:
    `Object`

### ComponentSelectedChanged

`protected Object ComponentSelectedChanged(Object component,
Object domElement,
Object newValue,
Object oldValue)`
  Parameters:

    `component` |  |
    `domElement` |  |
    `newValue` |  |
    `oldValue` |  |

  Return:
    `Object`

### ComponentShortDescChanged

`protected Object ComponentShortDescChanged(Object component,
Object domElement,
Object newValue,
Object oldValue)`
  Property change handler
  Parameters:

    `component` |  |
    `domElement` |  |
    `newValue` |  |
    `oldValue` |  |

  Return:
    `Object`

### _disableAriaChecked

`private Object _disableAriaChecked(AdfUIComponent component)`
  set arai-checked to false for unselected radio button
  Parameters:

    `component` | - | The button component

  Return:
    `Object`

### _disableAriaPressed

`private Object _disableAriaPressed(AdfUIComponent component)`
  set aria-pressed to false for unselected button (toggle button)
  Parameters:

    `component` | - | The button component

  Return:
    `Object`

### _displayDefaultIcon

`private Object _displayDefaultIcon(Object component)`
  Parameters:

    `component` |  |

  Return:
    `Object`

### _displayDisabledIcon

`private Object _displayDisabledIcon(Object component)`
  Parameters:

    `component` |  |

  Return:
    `Object`

### _displayIcon

`private Object _displayIcon(Object component,
Object icon)`
  Parameters:

    `component` |  |
    `icon` |  |

  Return:
    `Object`

### _displayMouseDownIcon

`private Object _displayMouseDownIcon(Object component)`
  Parameters:

    `component` |  |

  Return:
    `Object`

### _displayMouseOverIcon

`private Object _displayMouseOverIcon(Object component)`
  Parameters:

    `component` |  |

  Return:
    `Object`

### _enableAriaChecked

`private Object _enableAriaChecked(AdfUIComponent component)`
  set aria-checked to true for selected radio button
  Parameters:

    `component` | - | The button component

  Return:
    `Object`

### _enableAriaPressed

`private Object _enableAriaPressed(AdfUIComponent component)`
  set aria-pressed to selected button (toggle button)
  Parameters:

    `component` | - | The button component

  Return:
    `Object`

### _execute

`private Object _execute()`
  Turns component-level clicks into Action events.
  Return:
    `Object`

### GetBestMatchSubId

`protected Object GetBestMatchSubId(Object domElement)`
  Returns the best match subId for the given domElement. If available in the subid map returns the match directly and handles programmatic cases. WARNING - You must make sure to bind the component to the peer before calling this function.
  Parameters:

    `domElement` |  |

  Return:
    `Object`
  See also:
    `AdfRichUIPeer.GetSubIdDomElement(Object)`
  Overrides:
    `AdfRichUIPeer.GetBestMatchSubId(Object)`

### GetComponentText

`protected Object GetComponentText(Object component,
Object domElement)`
  Optimized getter for text property
  Parameters:

    `component` |  |
    `domElement` |  |

  Return:
    `Object`

### _getGroupId

`private Object _getGroupId(Object domElement)`
  Get the groupId for the specified domElement. Return null if domElement doesn't have a group id.
  Parameters:

    `domElement` |  |

  Return:
    `Object`

### _getIconElement

`private Object _getIconElement(Object component)`
  Parameters:

    `component` |  |

  Return:
    `Object`

### GetInlineEditor

`protected Object GetInlineEditor(Object event)`
  Given the component this peer is bound to and the optional DOM event to start editing, return the AdfRichInlineEditor for this component at the event location, if any. Subclasses should override `GetInlineEditor`.
  Parameters:

    `event` |  |

  Return:
    `Object`
  Overrides:
    `AdfRichUIPeer.getInlineEditor(AdfUIComponent, Object)`

### _getPopupId

`private Object _getPopupId()`
  If available, returns the popup's id.
  Return:
    `Object` - popupId if found, otherwise null

### GetSubIdDomElement

`protected Object GetSubIdDomElement(Object subElementId)`
  Returns the DOM element identified by the passed in subId.
  Parameters:

    `subElementId` |  |

  Return:
    `Object` - the DOM element
  Overrides:
    `AdfRichUIPeer.getSubIdDomElement(Object, Object)`

### HandleComponentClick

`protected Object HandleComponentClick(Object componentEvent)`
  Turns component-level clicks into Action events.
  Parameters:

    `componentEvent` | - | The component event being dispatched

  Return:
    `Object`

### HandleComponentKeyDown

`protected Object HandleComponentKeyDown(Object componentEvent)`
  Handles keydown event to allow the popup facet popup to open by keyboard
  Parameters:

    `componentEvent` | - | The component event being dispatched

  Return:
    `Object`

### HandleComponentMouseDown

`protected Object HandleComponentMouseDown(AdfComponentEvent componentEvent)`
  Handles the mousedown either on the button or its dropdown, and adjusts the mousedown state accordingly.
  Parameters:

    `componentEvent` | - | The component event being dispatched

  Return:
    `Object`

### HandleComponentMouseOut

`protected Object HandleComponentMouseOut(AdfComponentEvent componentEvent)`
  On mouseout, the default icon is displayed.
  Parameters:

    `componentEvent` | - | The component event being dispatched

  Return:
    `Object`

### HandleComponentMouseOver

`protected Object HandleComponentMouseOver(AdfComponentEvent componentEvent)`
  On mouseover, the mouseover icon is displayed.
  Parameters:

    `componentEvent` | - | The component event being dispatched

  Return:
    `Object`

### HandleComponentMouseUp

`protected Object HandleComponentMouseUp(AdfComponentEvent componentEvent)`
  On mouse up, the mouseover icon is displayed.
  Parameters:

    `componentEvent` | - | The component event being dispatched

  Return:
    `Object`

### InitSubclass

`protected static Object InitSubclass()`
  Return:
    `Object`

### _isEventInRootElement

`private boolean _isEventInRootElement(AdfComponentEvent componentEvent)`
  Checks if the event target is within the root dom element. This method is useful to determine if the event is registered inside popup facet
  Parameters:

    `componentEvent` | - | The component event

  Return:
    `boolean` - true if the event target is within root dom element

### _isInPopupSelector

`private Object _isInPopupSelector(AdfComponentEvent componentEvent)`
  Sees if the event is in the popup target.
  Parameters:

    `componentEvent` | - | The componentEvent

  Return:
    `Object`

### _openPopupMenu

`private Object _openPopupMenu(Object popupId,
Object autoFocus,
AdfComponentEvent componentEvent)`
  Opens the popup facet popup and aligns it after_start with the selector button
  Parameters:

    `popupId` |  |
    `autoFocus` |  |
    `componentEvent` | - | The component event being dispatched

  Return:
    `Object`

### PopupClosed

`protected Object PopupClosed(Object component,
Object contentDom,
Object popupId)`
  Hook for notifying a peer that a popup of its was just closed.
  Parameters:

    `component` |  |
    `contentDom` |  |
    `popupId` |  |

  Return:
    `Object`
  Overrides:
    `AdfRichUIPeer.PopupClosed(AdfUIComponent, HTMLElement, String)`

### __preferredSizeChangeNotify

`Object __preferredSizeChangeNotify(AdfUIComponent component)`
  Notification that the components preferred size has changed. This is needed for toolbars and toolboxes that used cached size values, and need to be notified when sizes change due to delayed image delivery. This is a temporary method and fix for bug 9035962, to be replaced by er 9491549 fix.
  Parameters:

    `component` | - | the associated component (not necessarily bound) identified as having a preferred size change.

  Return:
    `Object`

### _removeAriaDisabled

`private Object _removeAriaDisabled(AdfUIComponent component)`
  remove aria disabled attribute when enabled
  Parameters:

    `component` | - | The button component

  Return:
    `Object`

### _setAriaDisabled

`private Object _setAriaDisabled(AdfUIComponent component)`
  set aria disabled attribute for disabled button
  Parameters:

    `component` | - | The button component

  Return:
    `Object`

### SetBusy

`protected Object SetBusy(Object isBusy)`
  Override to disable the button when in busy state.
  Parameters:

    `isBusy` |  |

  Return:
    `Object`
  Overrides:
    `AdfRichUIPeer.setBusy(Object, Object)`

### _setDepressedStyle

`private Object _setDepressedStyle(Object component,
Object depressed)`
  CommandToolbarButton uses depressed instead of active, in order to have finer control over depressed highlighting. This method sets the depressed style state.
  Parameters:

    `component` |  |
    `depressed` |  |

  Return:
    `Object`

### _toggleComponentUnselected

`private Object _toggleComponentUnselected(Object buttonComponent)`
  Called to toggle a commandToolbarButton to off (unselected) when a new item is selected in a group of radio commandToolbarButtons. NOTE: We could look to promote this to a public interface class if we want to implement a generic radio items implementation across different component types.
  Parameters:

    `buttonComponent` | - | the toolbar component to unselect

  Return:
    `Object`

### _toggleRadioGroupItems

`private Object _toggleRadioGroupItems()`
  When a radio type item is selected, the other radio items in the group are unselected.
  Return:
    `Object`

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

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Fusion Middleware Javascript API Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81451-01
PREV NEXT | FRAMES NO FRAMES Warning: private items are visible |

Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.