OracleJavaScript API Reference for Oracle ADF Faces

 

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

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

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
Direct Known Subclasses:
AdfDhtmlEditableValuePeer, AdfDhtmlOutputFormattedPeer, AdfDhtmlOutputLabelPeer, AdfDhtmlTextPeer

public class AdfDhtmlValuePeer
extends AdfRichUIPeer
Subclasses of this should implement - GetDisplayValue - return a value that is ready to be passed to the converter - SetDisplayValue - This method takes a value that has already been converted. For most subclasses this method is passed a string.


Field Summary


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
AdfDhtmlValuePeer()
Subclasses of this should implement - GetDisplayValue - return a value that is ready to be passed to the converter - SetDisplayValue - This method takes a value that has already been converted.

Method Summary

protected Object
ComponentValueChanged(Object component, Object domElement, Object newValue, Object oldValue)
protected Object
GetBestMatchSubId(Object domElement)
Returns the best match subId for the given domElement.
protected Object
GetComponentValue(Object component, Object domElement)
public Object
getConvertedObject(Object component, Object value)
This usually gets the converter and calls getAsString.
public Object
getConvertedValue(Object component, Object submittedValue)
akin to javax.faces.render.Renderer.getConvertedValue() can return undefined if converter was not successful
protected Object
GetDisplayValue(Object component, Object domElement, Object unconditional)
return a value that is ready to be passed to the converter
public Object
getFormatHint(Object component)
Returns the format hint for the used converter of a peer
protected String
GetFormattedDisplayValue(AdfUIComponent component, HTMLElement domElement, TrClientConverter clientConverter)
Returns a client formatted value.
protected Object
GetNullDefault()
protected HTMLElement
GetSubIdDomElement(Object subElementId)
Returns the dom element for a given subId for the input* or select* component.
protected Object
InitDomElement(Object component, Object domElement)
Initialize the associated domElement when the peer is created.
protected static Object
InitSubclass()
public Object
isEmpty(Object submittedValue)
This is needed in the case where the client converter return undefined.
public Object
setDisplayValue(Object component, Object newValue)
start:
protected Object
SetDisplayValue(Object component, Object domElement, Object newValue)
set the display string

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

addComponentEventHandlers, addComponentPropertyChanges, addComponentPropertyGetters, addDomEventHandlers, addEventHandlerToDomInstance, addSuppressedPPRAttributes, applyDragReadyState, ApplyDragReadyState, applyDragSourceState, ApplyDragSourceState, bind, BindToComponent, 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, GetInlineEditor, getInlineStyleProperty, getLocatorByDomElement, getPagePosition, getPopupWindow, getReadyState, GetReadyState, GetRichResourceURL, getSubIdDomElement, hideAllPopups, hidePopup, InitClass, initialize, isAbsoluteLocatorCacheable, isActive, isBusy, isComponentContainedByElement, isInActiveHeirarchy, isInlineSVGIcon, isPopupVisible, messageNotify, MessageNotify, messageShow, MessageShow, needsChildVisibilityChanges, needsFocusTargetStyleClass, PopupClosed, processPushData, ProcessPushData, registerADSAccessibility, RegisterADSAccessibility, registerKeyStroke, replaceDomElement, ReplaceDomElement, resizeNotify, ResizeNotify, scrollIntoView, ScrollIntoView, setBusy, 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


Constructor Detail


AdfDhtmlValuePeer

public AdfDhtmlValuePeer()

Subclasses of this should implement - GetDisplayValue - return a value that is ready to be passed to the converter - SetDisplayValue - This method takes a value that has already been converted. For most subclasses this method is passed a string.

Method Detail


ComponentValueChanged

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

Parameters:
component  
domElement  
newValue  
oldValue  
Return:
Object

GetBestMatchSubId

protected Object GetBestMatchSubId(Object domElement)

Returns the best match subId for the given domElement. This can be enhanced further to return programmatically determined subIds. 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)

GetComponentValue

protected Object GetComponentValue(Object component,
                                   Object domElement)

Parameters:
component  
domElement  
Return:
Object

getConvertedObject

public Object getConvertedObject(Object component,
                                 Object value)

This usually gets the converter and calls getAsString. Not calling this getConvertedString since this may return a list of strings or any object that the peer understands, thus calling it getConvertedObject instead. Can return undefined if converter not successful

Parameters:
component  
value  
Return:
Object

getConvertedValue

public Object getConvertedValue(Object component,
                                Object submittedValue)

akin to javax.faces.render.Renderer.getConvertedValue() can return undefined if converter was not successful

Parameters:
component  
submittedValue  
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 - says whether or not to always return the display value, or whether null can be returned if certain conditions are not met
Return:
Object

getFormatHint

public Object getFormatHint(Object component)

Returns the format hint for the used converter of a peer

Parameters:
component - the underlying component for the peer, to access the converter, if present.
Return:
Object - the format hint (see TrConverter.getFormatHint()) or null, if no converter is present.

GetFormattedDisplayValue

protected String GetFormattedDisplayValue(AdfUIComponent component,
                                          HTMLElement domElement,
                                          TrClientConverter clientConverter)

Returns a client formatted value. This is invoked only on component load. On value change however, the getConvertedObject call will perform the client formatting.

Parameters:
component - instance
domElement - The root element of the component
clientConverter - associated with the component
Return:
String - The formatted value

GetNullDefault

protected Object GetNullDefault()

Return:
Object

GetSubIdDomElement

protected HTMLElement GetSubIdDomElement(Object subElementId)

Returns the dom element for a given subId for the input* or select* component.

Parameters:
subElementId  
Return:
HTMLElement - the DOM within the component related to scopedId
Overrides:
AdfRichUIPeer.getSubIdDomElement(Object, 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)

InitSubclass

protected static Object InitSubclass()

Return:
Object

isEmpty

public Object isEmpty(Object submittedValue)

This is needed in the case where the client converter return undefined. Required validation works on the converted value. When the converter can't convert this will be called to determine if the field is empty. If this isn't doing the correct thing then a client converter is required.

Parameters:
submittedValue - the submitted value
Return:
Object - does the peer think it's empty

setDisplayValue

public Object setDisplayValue(Object component,
                              Object newValue)

start: The public ver which calls the protected one , also binds the component to the peer before calling the protected version, which is smart.

Parameters:
component  
newValue  
Return:
Object

SetDisplayValue

protected Object SetDisplayValue(Object component,
                                 Object domElement,
                                 Object newValue)

set the display string

Parameters:
component  
domElement  
newValue - new string to be displayed
Return:
Object

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

 

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