OracleJavaScript API Reference for Oracle ADF Faces

 

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

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

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.AdfDhtmlValuePeer
                           |
                           +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlEditableValuePeer
Direct Known Subclasses:
AdfDhtmlInputBasePeer, AdfDhtmlInputNumberSliderPeer, AdfDhtmlRichTextEditorPeer, AdfDhtmlSelectBooleanCheckboxPeer, AdfDhtmlSelectManyPeer, AdfDhtmlSelectOnePeer

public class AdfDhtmlEditableValuePeer
extends AdfDhtmlValuePeer
Subclasses of this should implement - GetSubmittedValue - return a value (or array of values for a selectMany) that are ready to be passed to the converter's getAsObject function - SetDisplayValue - this method is defined on AdfDhtmlValuePeer. This method takes a value that has already been converted. For example on inputText it would be passed a string, and on a selectMany an array of strings. Subclasses do not need to implement GetDisplayValue. GetDisplayValue will eventually call through to GetSubmittedValue.



Field Summary

protected Object
ComponentLabelChanged
Default optimized label setter for subclasses that support labels and for which an implementation which sets the label by setting the text of the label element is sufficient.
private static Object
_CONTENT_ID
private static Object
_CONTENT_ID_ATTR_NAME
private static Object
_HELPICON_ID
private static Object
_INITIALIZED
private static Object
_INSTRUCTIONS_TEXT
private static Object
_NOTE_WINDOW_FOOTER_STYLE_CLASS
private static Object
_NOTE_WINDOW_HINT_TEXT_STYLE_CLASS
private static Object
_NOTE_WINDOW_INSTRUCTIONS_STYLE_CLASS
private static Object
_NOTE_WINDOW_MAX_WIDTH
private static Object
_NOTE_WINDOW_POPUP_ID
private static Object
_NOTE_WINDOW_SEPARATOR_STYLE_CLASS
private static Object
_NOTE_WINDOW_SHORT_DESC_STYLE_CLASS
private static Object
_OLD_VALUE_EXPANDO
private static Object
_SCREEN_READER_LAUNCH_ID_EXPANDO
private static Object
_SCREEN_READER_NOTE_WINDOW_LAUNCH_ID
private static Object
_SCREEN_READER_NOTE_WINDOW_STATIC_EXPANDO


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
AdfDhtmlEditableValuePeer()
Subclasses of this should implement - GetSubmittedValue - return a value (or array of values for a selectMany) that are ready to be passed to the converter's getAsObject function - SetDisplayValue - this method is defined on AdfDhtmlValuePeer.


Method Summary

private Object
_addMessageTimeout(Object componentId)
public Object
autoSubmit(Object component)
Handle autoSubmitting when the converter has returned undefined
protected Object
BindToComponent(Object component, Object domElement)
Update any state necessary to bind to the current DOM component
protected Boolean
ComponentChanged(AdfDomComponentFocusEvent componentEvent)
Convenience function for determining whether the active component has changed.
static Object
__componentLabelChanged(Object component, Object domElement, Object newValue, Object oldValue)
protected Object
ComponentSubmittedValueChanged(Object component, Object domElement, Object newValue, Object oldValue)
public Object
disableBrowserAutoComplete(Object component)
Disables the browser auto-complete property of the input element bound to the component instance.
protected Object
Focus()
Override of AdfRichUIPeer.Focus.
protected String
GetComponentLabel(Object component, Object domElement)
Default optimized label getter for subclasses that support labels and for which an implementation which retrieves the label text by getting the text of the label element is sufficient.
protected Object
GetComponentSubmittedValue(Object component, Object domElement)
protected Object
GetComponentValue(Object component, Object domElement)
protected static Object
GetContentNode(Object component, Object rootNode)
Returns the content node of the supplied component.
protected static Object
GetContentNodeId(Object component, Object rootNode)
The 'content' node is the one with an html id that has a subId of 'content', so if the id of the component is 'foo', the html id is 'foo::content'.
protected Object
GetDisplayValue(Object component, Object domElement, Object unconditional)
return a value that is ready to be passed to the converter
protected Object
GetNoteWindowAlignmentHint()
protected Object
GetNoteWindowAlignmentNode(Object component, Object rootNode)
Returns the node for which to align the note help window
protected Object
GetSubmittedValue(Object component, Object domElement)
Returns the submittedValue by getting the value of the input dom node.
protected Object
GetValidatorHints(Object component)
Returns the hints for all used validators of the peer in a JS array.
protected Object
HandleComponentClick(Object componentEvent)
protected Object
HandleComponentFocus(Object componentEvent)
protected Object
HandleComponentKeyUp(Object componentEvent)
Intercept the ctrl+alt+w key combination and activate an associated notewindow if one is open.
protected Object
HideNoteWindow(Object component)
protected Object
InitDomElement(Object component, Object domElement)
Initialize the associated domElement when the peer is created.
private Object
_initializeScreenReader(Object component, Object domElement)
protected static Object
InitSubclass()
protected Object
IsInitialized(Object component, Object domElement)
protected Object
IsNoteWindowVisible(Object component)
private Object
_killNoteWindowFocusTimeout()
private Object
_killNoteWindowMouseTimeout()
private Object
_killNoteWindowTimeout()
protected Object
LazyInitialize(Object component, Object domElement)
We need to initialize the 'value' property before the user makes any changes so that we're not going to the peer for the 'value' property in the component.setProperty method.
protected Object
MessageNotify(Object maxType, Object messages)
Overrides to hide the note window when the message changes.
private Object
_messageNotifyScreenReader(Object maxType, Object messages)
In screen reader mode we may need to change/hide the icon that's rendered in the launch link when messages are added/removed.
protected Object
MessageShow(Object maxType, Object messages)
Overrides to hide the note window when the message changes.
private Object
_onFocusTimeout(Object componentId)
private Object
_onMouseOverTimeout(Object componentId)
protected Object
ShouldShowHint(Object component, Object domElement)
Controls whether we show hints in the note window.
protected Object
ShowNoteWindow(Object component, Object isMouseOver)
- kill any timeout to show the note window - if there is no note window visible create it if needed - if there is a note window shown and isMouseOver is false change the autodismiss hint to 'menu'
protected Object
ShowNoteWindowMouseOver(Object componentEvent)
protected Object
StashOldValue(Object component, Object domElement)
If we need to postpone validation, we stash the old value for later comparison
protected Object
Validate(Object component, Object submittedValue)
protected Object
ValidateAndStashNewValue(Object component, Object domElement)
If the old value doesn't equal the cur value, then a validate needs to happen and we need to stash the new value.
protected Object
ValidateIfStashedOldValue(Object component, Object domElement)
If we have stashed the old value, that means we have a pending validate that needs to happen (only if the value has changed).
protected Object
VetoShowNoteWindow(Object component)
protected Object
WasSubmitted(Object component)
Override this method to return "false" if the component was not actually submitted (if, for instance, it was disabled or "read-only".


Methods inherited from oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlValuePeer

ComponentValueChanged, getConvertedObject, getConvertedValue, getFormatHint, GetNullDefault, isEmpty, SetDisplayValue


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

addComponentEventHandlers, addComponentPropertyChanges, addComponentPropertyGetters, addDomEventHandlers, addEventHandlerToDomInstance, addSuppressedPPRAttributes, bind, cancelAllPopups, cancelPopup, ChildVisibilityChanged, ComponentInlineStyleChanged, ComponentPropertyChanged, componentRemoved, ComponentRemoved, ComponentStyleClassChanged, ComponentVisibleChanged, ConvertClientIdToLocator, convertLocatorToClientId, CreateDraggableNode, createPeerClass, createSubId, CreateSubId, DefaultInitClass, DispatchComponentEvent, domReplaceNotify, DomReplaceNotify, 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, initialize, isActive, isInActiveHeirarchy, isPopupVisible, messageNotify, messageShow, needsChildVisibilityChanges, PopupClosed, 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, 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


ComponentLabelChanged

protected Object ComponentLabelChanged

Default optimized label setter for subclasses that support labels and for which an implementation which sets the label by setting the text of the label element is sufficient.

Note this setter is not registered in the AdfDhtmlEditableValuePeer. Subclasses are responsible for registering the existence of a label setter themselves if they want to use this implementation.


_CONTENT_ID

private static Object _CONTENT_ID

_CONTENT_ID_ATTR_NAME

private static Object _CONTENT_ID_ATTR_NAME

_HELPICON_ID

private static Object _HELPICON_ID

_INITIALIZED

private static Object _INITIALIZED

_INSTRUCTIONS_TEXT

private static Object _INSTRUCTIONS_TEXT

_NOTE_WINDOW_FOOTER_STYLE_CLASS

private static Object _NOTE_WINDOW_FOOTER_STYLE_CLASS

_NOTE_WINDOW_HINT_TEXT_STYLE_CLASS

private static Object _NOTE_WINDOW_HINT_TEXT_STYLE_CLASS

_NOTE_WINDOW_INSTRUCTIONS_STYLE_CLASS

private static Object _NOTE_WINDOW_INSTRUCTIONS_STYLE_CLASS

_NOTE_WINDOW_MAX_WIDTH

private static Object _NOTE_WINDOW_MAX_WIDTH

_NOTE_WINDOW_POPUP_ID

private static Object _NOTE_WINDOW_POPUP_ID

_NOTE_WINDOW_SEPARATOR_STYLE_CLASS

private static Object _NOTE_WINDOW_SEPARATOR_STYLE_CLASS

_NOTE_WINDOW_SHORT_DESC_STYLE_CLASS

private static Object _NOTE_WINDOW_SHORT_DESC_STYLE_CLASS

_OLD_VALUE_EXPANDO

private static Object _OLD_VALUE_EXPANDO

_SCREEN_READER_LAUNCH_ID_EXPANDO

private static Object _SCREEN_READER_LAUNCH_ID_EXPANDO

_SCREEN_READER_NOTE_WINDOW_LAUNCH_ID

private static Object _SCREEN_READER_NOTE_WINDOW_LAUNCH_ID

_SCREEN_READER_NOTE_WINDOW_STATIC_EXPANDO

private static Object _SCREEN_READER_NOTE_WINDOW_STATIC_EXPANDO

Constructor Detail


AdfDhtmlEditableValuePeer

public AdfDhtmlEditableValuePeer()

Subclasses of this should implement - GetSubmittedValue - return a value (or array of values for a selectMany) that are ready to be passed to the converter's getAsObject function - SetDisplayValue - this method is defined on AdfDhtmlValuePeer. This method takes a value that has already been converted. For example on inputText it would be passed a string, and on a selectMany an array of strings. Subclasses do not need to implement GetDisplayValue. GetDisplayValue will eventually call through to GetSubmittedValue.

Method Detail


_addMessageTimeout

private Object _addMessageTimeout(Object componentId)

Parameters:
componentId    
Return:
Object

autoSubmit

public Object autoSubmit(Object component)

Handle autoSubmitting when the converter has returned undefined

Parameters:
component    
Return:
Object

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)

ComponentChanged

protected Boolean ComponentChanged(AdfDomComponentFocusEvent componentEvent)

Convenience function for determining whether the active component has changed. This function should be passed a focus or blur event, so for example, you could call this function from within HandleComponentFocus.

Parameters:
componentEvent  -  A component focus event
Return:
Boolean - Returns undefined if componentEvent is not an instance of AdfDomComponentFocusEvent. Otherwise, returns true if the active component changed; else, false.

__componentLabelChanged

static Object __componentLabelChanged(Object component,
                                       Object domElement,
                                       Object newValue,
                                       Object oldValue)

Parameters:
component    
domElement    
newValue    
oldValue    
Return:
Object

ComponentSubmittedValueChanged

protected Object ComponentSubmittedValueChanged(Object component,
                                                Object domElement,
                                                Object newValue,
                                                Object oldValue)

Parameters:
component    
domElement    
newValue    
oldValue    
Return:
Object

disableBrowserAutoComplete

public Object disableBrowserAutoComplete(Object component)

Disables the browser auto-complete property of the input element bound to the component instance.

Parameters:
component    
Return:
Object

Focus

protected Object Focus()

Override of AdfRichUIPeer.Focus. The first tab stop could be the help icon or context facet so we want to move to the content.

Return:
Object
Overrides:
AdfUIPeer.focus(Object)

GetComponentLabel

protected String GetComponentLabel(Object component,
                                   Object domElement)

Default optimized label getter for subclasses that support labels and for which an implementation which retrieves the label text by getting the text of the label</code> element is sufficient.

Note this getter is not registered in the AdfDhtmlEditableValuePeer. Subclasses are responsible for registering the existence of a label getter themselves if they want to use this implementation, e.g., AdfRichUIPeer.addComponentPropertyGetters(this, AdfRichInputText.LABEL);


Parameters:
component  -  Component that this peer will be associated with
domElement  -  Root DOM element of this peer
Return:
String - label

GetComponentSubmittedValue

protected Object GetComponentSubmittedValue(Object component,
                                            Object domElement)

Parameters:
component    
domElement    
Return:
Object

GetComponentValue

protected Object GetComponentValue(Object component,
                                   Object domElement)

Parameters:
component    
domElement    
Return:
Object
Overrides:
AdfDhtmlValuePeer.GetComponentValue(Object, Object)

GetContentNode

protected static Object GetContentNode(Object component,
                                       Object rootNode)

Returns the content node of the supplied component. This will be used to determine where the note window should be aligned to and provides some convenience methods for subclasses of this component. Passing the rootNode is optional, the method will call AdfRichUIPeer.getDomElementForComponent(component) to figure out the root node if you don't pass in anything.

Parameters:
component    
rootNode    
Return:
Object

GetContentNodeId

protected static Object GetContentNodeId(Object component,
                                         Object rootNode)

The 'content' node is the one with an html id that has a subId of 'content', so if the id of the component is 'foo', the html id is 'foo::content'. Passing the rootNode is optional, the method will call AdfRichUIPeer.getDomElementForComponent(component) to figure out the root node if you don't pass in anything.

Parameters:
component    
rootNode    
Return:
Object

GetDisplayValue

protected Object GetDisplayValue(Object component,
                                 Object domElement,
                                 Object unconditional)

return a value that is ready to be passed to the converter

Parameters:
component    
domElement    
unconditional    
Return:
Object
Overrides:
AdfDhtmlValuePeer.GetDisplayValue(Object, Object, Object)

GetNoteWindowAlignmentHint

protected Object GetNoteWindowAlignmentHint()

Return:
Object

GetNoteWindowAlignmentNode

protected Object GetNoteWindowAlignmentNode(Object component,
                                            Object rootNode)

Returns the node for which to align the note help window

Parameters:
component    
rootNode    
Return:
Object

GetSubmittedValue

protected Object GetSubmittedValue(Object component,
                                   Object domElement)

Returns the submittedValue by getting the value of the input dom node.

Parameters:
component  -  Component that this peer will be associated with
domElement  -  Root DOM element of this peer
Return:
Object - submittedValue

GetValidatorHints

protected Object GetValidatorHints(Object component)

Returns the hints for all used validators of the peer in a JS array.

Parameters:
component    
Return:
Object

HandleComponentClick

protected Object HandleComponentClick(Object componentEvent)

Parameters:
componentEvent    
Return:
Object

HandleComponentFocus

protected Object HandleComponentFocus(Object componentEvent)

Parameters:
componentEvent    
Return:
Object

HandleComponentKeyUp

protected Object HandleComponentKeyUp(Object componentEvent)

Intercept the ctrl+alt+w key combination and activate an associated notewindow if one is open. Note windows do not steal focus when shown. From the notewindow, the same sequence of keys will force navigation back to the owning input component.

Parameters:
componentEvent    
Return:
Object

HideNoteWindow

protected Object HideNoteWindow(Object component)

Parameters:
component    
Return:
Object

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  -  Component that this peer will be associated with
domElement  -  Root DOM element of this peer
Return:
Object
Overrides:
AdfRichUIPeer.InitDomElement(AdfUIComponent, Object)

_initializeScreenReader

private Object _initializeScreenReader(Object component,
                                       Object domElement)

Parameters:
component    
domElement    
Return:
Object

InitSubclass

protected static Object InitSubclass()

Return:
Object
Overrides:
AdfDhtmlValuePeer.InitSubclass()

IsInitialized

protected Object IsInitialized(Object component,
                               Object domElement)

Parameters:
component    
domElement    
Return:
Object

IsNoteWindowVisible

protected Object IsNoteWindowVisible(Object component)

Parameters:
component    
Return:
Object

_killNoteWindowFocusTimeout

private Object _killNoteWindowFocusTimeout()

Return:
Object

_killNoteWindowMouseTimeout

private Object _killNoteWindowMouseTimeout()

Return:
Object

_killNoteWindowTimeout

private Object _killNoteWindowTimeout()

Return:
Object

LazyInitialize

protected Object LazyInitialize(Object component,
                                Object domElement)

We need to initialize the 'value' property before the user makes any changes so that we're not going to the peer for the 'value' property in the component.setProperty method. See explanation below. Background: 1. In component.setProperty if the old and new value of a property are equal the setProperty method returns without setting anything. This is to avoid unnecessary propertyChangeEvents. 2. We do not send down the 'value' property from the server, so the 'value' property starts out undefined. If a property is undefined then calls to get the current value will go to the peer. So initally calls to getValue() go to the peer's GetComponentValue() Issue: - Mostly component.setProperty will only be called after the user makes a change, and if the property is currently undefined the peer's property getter will be called for the 'old' value. The peer will then return the current value, which is the new changed value. - That means the 'old' value is the same as the new value, and so the property is not set (see point 1 above). - Therefore we need to initialize the 'value' property before the user makes any changes so that we're not going to the peer for the 'value' property in the component.setProperty method.

Parameters:
component    
domElement    
Return:
Object

MessageNotify

protected Object MessageNotify(Object maxType,
                               Object messages)

Overrides to hide the note window when the message changes.

Parameters:
maxType    
messages    
Return:
Object
Overrides:
AdfUIPeer.messageNotify(Object, Number, Array)

_messageNotifyScreenReader

private Object _messageNotifyScreenReader(Object maxType,
                                          Object messages)

In screen reader mode we may need to change/hide the icon that's rendered in the launch link when messages are added/removed.

Parameters:
maxType    
messages    
Return:
Object

MessageShow

protected Object MessageShow(Object maxType,
                             Object messages)

Overrides to hide the note window when the message changes.

Parameters:
maxType    
messages    
Return:
Object
Overrides:
AdfUIPeer.messageShow(Object, Number, Array)

_onFocusTimeout

private Object _onFocusTimeout(Object componentId)

Parameters:
componentId    
Return:
Object

_onMouseOverTimeout

private Object _onMouseOverTimeout(Object componentId)

Parameters:
componentId    
Return:
Object

ShouldShowHint

protected Object ShouldShowHint(Object component,
                                Object domElement)

Controls whether we show hints in the note window. Default is to not show hints in note window, override to show. Due to screen reader mode this can get called in InitDomElement, so you must use the component/domElement passed in. Do not call this.getComponent() for example.

Parameters:
component    
domElement    
Return:
Object

ShowNoteWindow

protected Object ShowNoteWindow(Object component,
                                Object isMouseOver)

- kill any timeout to show the note window - if there is no note window visible create it if needed - if there is a note window shown and isMouseOver is false change the autodismiss hint to 'menu'

Parameters:
component    
isMouseOver    
Return:
Object

ShowNoteWindowMouseOver

protected Object ShowNoteWindowMouseOver(Object componentEvent)

Parameters:
componentEvent    
Return:
Object

StashOldValue

protected Object StashOldValue(Object component,
                               Object domElement)

If we need to postpone validation, we stash the old value for later comparison

Parameters:
component    
domElement    
Return:
Object

Validate

protected Object Validate(Object component,
                          Object submittedValue)

Parameters:
component    
submittedValue    
Return:
Object

ValidateAndStashNewValue

protected Object ValidateAndStashNewValue(Object component,
                                          Object domElement)

If the old value doesn't equal the cur value, then a validate needs to happen and we need to stash the new value. This is normally called from the blur handler and is primarily used by screen reader peers.

Parameters:
component    
domElement    
Return:
Object

ValidateIfStashedOldValue

protected Object ValidateIfStashedOldValue(Object component,
                                           Object domElement)

If we have stashed the old value, that means we have a pending validate that needs to happen (only if the value has changed).

Parameters:
component    
domElement    
Return:
Object

VetoShowNoteWindow

protected Object VetoShowNoteWindow(Object component)

Parameters:
component    
Return:
Object

WasSubmitted

protected Object WasSubmitted(Object component)

Override this method to return "false" if the component was not actually submitted (if, for instance, it was disabled or "read-only".

Parameters:
component    
Return:
Object

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

 

Generated on 2010.03.26 00:15 UTC
Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.