OracleJavaScript API Reference for Oracle ADF Faces

 

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

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

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.laf.rich.AdfUIPeer
         |
         +--oracle.adf.view.js.laf.rich.AdfRichUIPeer
               |
               +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlValuePeer
                     |
                     +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlEditableValuePeer
                           |
                           +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlInputBasePeer
                                 |
                                 +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlInputTextPeer
                                       |
                                       +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlInputFilePeer

public class AdfDhtmlInputFilePeer
extends AdfDhtmlInputTextPeer
Renders an input file field for DHTML



Field Summary

private static Object
_clone
private static Object
_SUB_ID_MAP
inputFile component publishes the following sub ids [External Subid --> Internal Client SubId]:- 1.
private static Object
_UPDATE_BUTTON_ID
private static Object
_UPDATE_DLG_CONTAINER_ID
private static Object
_UPDATE_DLG_CONTENT_ID
private static Object
_UPDATE_VALUE_ID


Fields inherited from oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlEditableValuePeer

ComponentLabelChanged


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

addComponentPropertyChanges, addComponentPropertyGetters, BUSY_STYLECLASS, DISABLED_STYLECLASS, DRAG_READY_STYLECLASS, DRAG_SOURCE_STYLECLASS, DROP_TARGET_STYLECLASS, FOCUS_TARGET_STYLECLASS, HOVER_TARGET_STYLECLASS, READONLY_STYLECLASS


Fields inherited from org.ecmascript.object.Object

constructor, prototype


Constructor Summary

public
AdfDhtmlInputFilePeer()
Renders an input file field for DHTML


Method Summary

protected Object
ComponentValueChanged(Object component, Object domElement, Object newValue, Object oldValue)
public Object
getConvertedValue(Object component, Object submittedValue)
akin to javax.faces.render.Renderer.getConvertedValue() can return undefined if converter was not successful
protected Object
GetNoteWindowAlignmentNode(Object component, Object rootNode)
Returns the node for which to align the note help window
private Object
_getUpdateButton()
protected Object
HandleComponentClick(Object componentEvent)
Handle the update button click
protected Object
HandleComponentDialog(Object componentEvent)
Handles the upload dialog This happens even before PopupClosed and is to set component value and hide custom popup and then set the focus to input field if exist.
protected Object
HandleComponentKeyPress(Object componentEvent)
Handles component-level key-press events.
protected Object
HandleDomChange(Object component, Object domEvent)
DOM change event event handler.
private Object
_handleFileChange(Object component, Object file)
protected static Object
InitSubclass()
public Object
isEmpty(Object submittedValue)
This is needed in the case where the client converter return undefined.
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
PopupClosed(Object component, Object contentDom, Object popupId)
Hook for notifying a peer that a popup of its was just closed.
protected Object
VetoBlurValidation()
For input file peers, we want to use onchange for validation, instead of the focus/blur combi.
protected Object
VetoShowNoteWindow(Object component)


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

AutoTab, GetInlineEditor, HandleComponentKeyUp, IsSecret, needsResizeNotify, replaceTextSelection, resizeNotify, SetDisplayValue


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

GetSubmittedValue, HandleComponentBlur, HandleComponentFocus, needsFocusTargetStyleClass, RunValidation, ShouldShowHint, __simulateBlur


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

autoSubmit, BindToComponent, ComponentChanged, __componentLabelChanged, ComponentSubmittedValueChanged, disableBrowserAutoComplete, Focus, GetComponentLabel, GetComponentSubmittedValue, GetComponentValue, GetContentNode, GetContentNodeId, GetDisplayValue, GetNoteWindowAlignmentHint, GetValidatorHints, HideNoteWindow, InitDomElement, IsInitialized, IsNoteWindowVisible, MessageNotify, MessageShow, ShowNoteWindow, ShowNoteWindowMouseOver, StashOldValue, Validate, ValidateAndStashNewValue, ValidateIfStashedOldValue, WasSubmitted


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

getConvertedObject, getFormatHint, GetNullDefault, GetSubIdDomElement


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

addComponentEventHandlers, addComponentPropertyChanges, addComponentPropertyGetters, addDomEventHandlers, addEventHandlerToDomInstance, addSuppressedPPRAttributes, applyDragReadyState, ApplyDragReadyState, applyDragSourceState, bind, cancelAllPopups, cancelPopup, ChildVisibilityChanged, clearDragReadyState, ClearDragReadyState, clearDragSourceState, 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, getInlineStyleProperty, getLocatorByDomElement, getPagePosition, getPopupWindow, getReadyState, GetReadyState, GetRichResourceURL, getSubIdDomElement, hideAllPopups, hidePopup, Init, InitClass, initialize, isActive, isInActiveHeirarchy, isPopupVisible, messageNotify, messageShow, needsChildVisibilityChanges, processPushData, ProcessPushData, registerKeyStroke, replaceDomElement, ReplaceDomElement, ResizeNotify, scrollIntoView, ScrollIntoView, setBusy, SetBusy, setInlineStyleProperty, showContextMenu, showPopup, TruncateClientId, TruncateClientIdOnceImpl, UnbindFromComponent, unregisterKeyStroke, visitChildren


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

ApplyDragSourceState, ClearDragSourceState


Field Detail


_clone

private static Object _clone

_SUB_ID_MAP

private static Object _SUB_ID_MAP

inputFile component publishes the following sub ids [External Subid --> Internal Client SubId]:- 1. [label --> label] - inputFile label 2. [content --> content] - inputFile content 3. [upVal --> upVal] - inputFile update value (name of file selected) 4. [upBtn --> upBtn] - inputFile update button (pops up update dialog) 5. [dlg --> dlg] - inputFile update dialog If a subId is not contained in the map below, it's corresponding DOM is located programmatically in AdfDhtmlInputFilePeer.GetSubIdDomElement().

Overrides:
AdfDhtmlInputTextPeer._SUB_ID_MAP

_UPDATE_BUTTON_ID

private static Object _UPDATE_BUTTON_ID

_UPDATE_DLG_CONTAINER_ID

private static Object _UPDATE_DLG_CONTAINER_ID

_UPDATE_DLG_CONTENT_ID

private static Object _UPDATE_DLG_CONTENT_ID

_UPDATE_VALUE_ID

private static Object _UPDATE_VALUE_ID

Constructor Detail


AdfDhtmlInputFilePeer

public AdfDhtmlInputFilePeer()

Renders an input file field for DHTML

Method Detail


ComponentValueChanged

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

Parameters:
component    
domElement    
newValue    
oldValue    
Return:
Object
Overrides:
AdfDhtmlValuePeer.ComponentValueChanged(Object, Object, Object, 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
Overrides:
AdfDhtmlValuePeer.getConvertedValue(Object, 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
Overrides:
AdfDhtmlEditableValuePeer.GetNoteWindowAlignmentNode(Object, Object)

_getUpdateButton

private Object _getUpdateButton()

Return:
Object

HandleComponentClick

protected Object HandleComponentClick(Object componentEvent)

Handle the update button click

Parameters:
componentEvent    
Return:
Object
Overrides:
AdfDhtmlEditableValuePeer.HandleComponentClick(Object)

HandleComponentDialog

protected Object HandleComponentDialog(Object componentEvent)

Handles the upload dialog This happens even before PopupClosed and is to set component value and hide custom popup and then set the focus to input field if exist.

Parameters:
componentEvent  -  the component event invoked as users close upload popup.
Return:
Object

HandleComponentKeyPress

protected Object HandleComponentKeyPress(Object componentEvent)

Handles component-level key-press events. We check for this when inputText's rows > 1 and we need to check the maximumLength. Also used for doing autoTab.

Parameters:
componentEvent    
Return:
Object
Overrides:
AdfDhtmlInputTextPeer.HandleComponentKeyPress(Object)

HandleDomChange

protected Object HandleDomChange(Object component,
                                 Object domEvent)

DOM change event event handler. This gets called when the file is changed. and it will validate the value.

Parameters:
component  -  Component that this peer will be associated with
domEvent  -  event on the dom
Return:
Object

_handleFileChange

private Object _handleFileChange(Object component,
                                 Object file)

Parameters:
component    
file    
Return:
Object

InitSubclass

protected static Object InitSubclass()

Return:
Object
Overrides:
AdfDhtmlValuePeer.InitSubclass()

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    
Return:
Object
Overrides:
AdfDhtmlValuePeer.isEmpty(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
Overrides:
AdfDhtmlEditableValuePeer.LazyInitialize(Object, 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)

VetoBlurValidation

protected Object VetoBlurValidation()

For input file peers, we want to use onchange for validation, instead of the focus/blur combi. There are two main reasons for this: - There is no browser built-in autocomplete for input file elements. - Safari does not trigger focus/blur on input file elements.

Return:
Object
Overrides:
AdfDhtmlInputBasePeer.VetoBlurValidation()

VetoShowNoteWindow

protected Object VetoShowNoteWindow(Object component)

Parameters:
component    
Return:
Object
Overrides:
AdfDhtmlEditableValuePeer.VetoShowNoteWindow(Object)

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

 

Generated on 2011.10.24 21:45 UTC
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.