OracleJavaScript API Reference for Oracle ADF Faces

 

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

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

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
                                 |
                                 +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlInputBasePeer
                                       |
                                       +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfDhtmlCodeEditorPeer

public class AdfDhtmlCodeEditorPeer
extends AdfDhtmlInputBasePeer
Peer for the codeEditor component.



Field Summary

public Object
addBinding
private Object
_addContextChangeListeners
private Object
_addCSSResource
protected static Object
InitConstants
private Object
_loaded
private Object
_markerInfoArray


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

ComponentLabelChanged, ComponentShowRequiredChanged


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
AdfDhtmlCodeEditorPeer()
Peer for the codeEditor component.


Method Summary

public Object
addBinding(String componentClientId, String command, String commandParameter)
Adds the binding for command.
private Object
_addCommandBinding(Object componentId, String command, String commandParameter)
Binds the the command to the component.
private Object
_addContextChangeListeners(Object component)
Adds the listeners for context changes.
private Object
_addCSSResource(Object source, Object refresh)
private static Object
_addCSSStyle(Object component, Object selector, Object cssText)
private Object
_addMarker(Object marker, Object moveCursor)
private static Object
_checkCSSResourceLoaded(Object component, Object source)
private Object
_createIframe(Object component)
Creates an IFRAME by replacing a placeholder DIV with an IFRAME
private Object
_editorBlur(Object editor)
private Object
_editorChange(Object editor)
private Object
_execCommand(String command, Object parameter)
Executes a command on the document, selection, or the given range.
public Object
executeBinding(String command, String componentClientId)
Executes the previously bound command for command.
protected Object
Focus()
Ask the peer to move focus to this component
private static Object
_getCodeEditorContentNode(Object component)
private static Object
_getCSS(Object regex)
private static Object
_getCSSSelector(Object css)
private static Object
_getCSSText(Object css)
public Object
getEditorInstance(Object component)
private static Object
_getHiddenCursorPosition(Object component)
private Object
_getMarked()
private Object
_getMarkerDom(Object markerInfo)
private Object
_getMarkerImgDom(Object markerInfo)
private Object
_getMarkersLabelSubId()
private Object
_getMarkersSubId()
private Object
_getMarkerString(Object marker)
private Object
_getMaxMsgHeight(Object component)
public Object
getReadyState()
Returns whether the content of the component is available are:
private Object
_getSearchCursor(Object text, Object caseSensitive, Object wholeWords)
protected Object
GetSubmittedValue(Object component, Object domElement)
Returns the submittedValue by getting the value of the input dom node.
protected Object
HandleComponentAction(Object componentEvent)
Handles ActionEvents by children of this component.
protected Object
HandleComponentBlur(Object componentEvent)
protected Object
HandleComponentFocus(Object componentEvent)
protected Object
HandleComponentKeyDown(Object componentEvent)
private Object
_handleContextChanged()
Handles the changing of context.
private Object
_handleLoad(Object nativeEvent)
Called when the IFRAME has finished loading.
private static Object
_handleLoad(Object component)
private static Object
_initCodeMirror(Object component, Object domElement)
protected static Object
InitConstants()
protected Object
InitDomElement(Object component, Object domElement)
Initialize the associated domElement when the peer is created.
protected static Object
InitSubclass()
private static Object
_isInCodeContainer(Object component, Object componentEvent)
private Object
_jump(Object line)
private Object
_jumpToMarker(Object event)
private Object
_markLine(Object line)
private static Object
_markText(Object component, Object marker, Object markerInfo)
protected Object
MessageNotify(Object maxType, Object messages)
Called to notify the peer that its messages have changed.
public Object
needsResizeNotify(Object component)
Tests whether the peer requires resize notification.
private Object
_onBlurTimeout(Object state)
private Object
_redo()
private Object
_removeCommandBindings(AdfUIComponent component)
Removes all the bindings of components to a command.
private static Object
_removeCSSStyle(Object selector)
private Object
_replaceAll(Object parameter)
private static Object
_replaceCSS(Object component, Object regex, Object cssText)
private Object
_replaceNext(Object parameter)
private Object
_resizeEditor(Object component)
public Object
resizeNotify(Object component, Object oldWidth, Object oldHeight, Object newWidth, Object newHeight)
Called to notify the peer of resize activity.
private static Object
_restoreCursorPosition(Object component, Object hiddenCursorPosition)
private static Object
_retrieveCssContent(Object css, Object disabled)
protected Object
RunValidation(Object component, Object targetNode, Object isChangeRequired)
Don't call this code unless the input element is the content node
private static Object
_saveHiddenCursorPosition(Object component, Object editor)
private Object
_searchNext(Object parameter)
private Object
_searchPrevious(Object parameter)
private Object
_setCursor(Object line, Object column)
private static Object
_setCursor(Object component, Object line, Object column)
protected Object
SetDisplayValue(Object component, Object domElement, Object newValue)
start:
private static Object
_setLoaded(Object component, Object refresh)
private static Object
_showPopup(Object component, Object popupId)
private Object
_undo()
private Object
_unmark()
private Object
_unmarkLine()
protected Object
VetoShowNoteWindow(Object component)
private static Object
_waitForCSSResourcesLoad(Object component, Object domElement)


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

needsFocusTargetStyleClass, NeedsSpuriousDirtyValueTracking, ShouldShowHint, __simulateBlur, UpdateLastValue, VetoBlurValidation


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

autoSubmit, BindToComponent, ComponentChanged, __componentLabelChanged, ComponentSubmittedValueChanged, disableBrowserAutoComplete, GetComponentLabel, GetComponentSubmittedValue, GetComponentValue, GetContentNode, GetContentNodeId, GetDisplayValue, GetNoteWindowAlignmentHint, GetNoteWindowAlignmentNode, GetValidatorHints, HandleComponentClick, HandleComponentKeyUp, HideNoteWindow, IsInitialized, IsNoteWindowVisible, __isSpuriousDirtyValue, LazyInitialize, MessageShow, __resetSpuriousDirtyValue, ShowNoteWindow, ShowNoteWindowMouseOver, StashOldValue, Validate, ValidateAndStashNewValue, ValidateIfStashedOldValue, WasSubmitted


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

ComponentValueChanged, getConvertedObject, getConvertedValue, getFormatHint, GetNullDefault, GetSubIdDomElement, isEmpty, setDisplayValue


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, 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, GetReadyState, GetRichResourceURL, getSubIdDomElement, hideAllPopups, hidePopup, InitClass, initialize, isActive, isBusy, isInActiveHeirarchy, isPopupVisible, messageNotify, messageShow, needsChildVisibilityChanges, PopupClosed, 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.base.AdfUIPeer

getDefaultDragRecognizer, getParentPeer, Init, initiateDrag, isVisible


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


addBinding

public Object addBinding

_addContextChangeListeners

private Object _addContextChangeListeners

_addCSSResource

private Object _addCSSResource

InitConstants

protected static Object InitConstants

_loaded

private Object _loaded

_markerInfoArray

private Object _markerInfoArray

Constructor Detail


AdfDhtmlCodeEditorPeer

public AdfDhtmlCodeEditorPeer()

Peer for the codeEditor component.

Method Detail


addBinding

public Object addBinding(String componentClientId,
                         String command,
                         String commandParameter)

Adds the binding for command.

Parameters:
componentClientId  -  The component to bind to the codeEditor
command  -  The command to use for the binding.
commandParameter  -  Null or the optional parameter for the command.
Default value = null
Return:
Object
See also:
_addCommandBinding(Object, String, String)

_addCommandBinding

private Object _addCommandBinding(Object componentId,
                                  String command,
                                  String commandParameter)

Binds the the command to the component. If the command is not applicable on the current selection, the component will be disabled. This also adds a clientListener to the component that applies the command to the current selection.

Parameters:
componentId    
command  -  The command to bind to.
commandParameter  -  Null or the optional parameter for the command.
Default value = null
Return:
Object

_addContextChangeListeners

private Object _addContextChangeListeners(Object component)

Adds the listeners for context changes.

Parameters:
component    
Return:
Object

_addCSSResource

private Object _addCSSResource(Object source,
                               Object refresh)

Parameters:
source    
refresh    
Return:
Object

_addCSSStyle

private static Object _addCSSStyle(Object component,
                                   Object selector,
                                   Object cssText)

Parameters:
component    
selector    
cssText    
Return:
Object

_addMarker

private Object _addMarker(Object marker,
                          Object moveCursor)

Parameters:
marker    
moveCursor    
Return:
Object

_checkCSSResourceLoaded

private static Object _checkCSSResourceLoaded(Object component,
                                              Object source)

Parameters:
component    
source    
Return:
Object

_createIframe

private Object _createIframe(Object component)

Creates an IFRAME by replacing a placeholder DIV with an IFRAME

Parameters:
component    
Return:
Object

_editorBlur

private Object _editorBlur(Object editor)

Parameters:
editor    
Return:
Object

_editorChange

private Object _editorChange(Object editor)

Parameters:
editor    
Return:
Object

_execCommand

private Object _execCommand(String command,
                            Object parameter)

Executes a command on the document, selection, or the given range.

Parameters:
command  -  The command to execute
parameter    
Return:
Object - Any return value the command may have

executeBinding

public Object executeBinding(String command,
                             String componentClientId)

Executes the previously bound command for command.

Parameters:
command  -  The command to execute
componentClientId  -  Optional parameter used when there are multiple components bound to a command.
Return:
Object - Any return value the command may have

Focus

protected Object Focus()

Ask the peer to move focus to this component

Return:
Object
Overrides:
AdfUIPeer.focus(Object)

_getCodeEditorContentNode

private static Object _getCodeEditorContentNode(Object component)

Parameters:
component    
Return:
Object

_getCSS

private static Object _getCSS(Object regex)

Parameters:
regex    
Return:
Object

_getCSSSelector

private static Object _getCSSSelector(Object css)

Parameters:
css    
Return:
Object

_getCSSText

private static Object _getCSSText(Object css)

Parameters:
css    
Return:
Object

getEditorInstance

public Object getEditorInstance(Object component)

Parameters:
component    
Return:
Object

_getHiddenCursorPosition

private static Object _getHiddenCursorPosition(Object component)

Parameters:
component    
Return:
Object

_getMarked

private Object _getMarked()

Return:
Object

_getMarkerDom

private Object _getMarkerDom(Object markerInfo)

Parameters:
markerInfo    
Return:
Object

_getMarkerImgDom

private Object _getMarkerImgDom(Object markerInfo)

Parameters:
markerInfo    
Return:
Object

_getMarkersLabelSubId

private Object _getMarkersLabelSubId()

Return:
Object

_getMarkersSubId

private Object _getMarkersSubId()

Return:
Object

_getMarkerString

private Object _getMarkerString(Object marker)

Parameters:
marker    
Return:
Object

_getMaxMsgHeight

private Object _getMaxMsgHeight(Object component)

Parameters:
component    
Return:
Object

getReadyState

public Object getReadyState()

Returns whether the content of the component is available are:
  • AdfUIComponent.STATE_LOADING The UIComponent is still loading state or content
  • AdfUIComponent.STATE_COMPLETE The UIComponent is fully loaded

Return:
Object
Overrides:
AdfUIPeer.getReadyState(Object)

_getSearchCursor

private Object _getSearchCursor(Object text,
                                Object caseSensitive,
                                Object wholeWords)

Parameters:
text    
caseSensitive    
wholeWords    
Return:
Object

GetSubmittedValue

protected Object GetSubmittedValue(Object component,
                                   Object domElement)

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

Parameters:
component    
domElement    
Return:
Object
Overrides:
AdfDhtmlEditableValuePeer.GetSubmittedValue(Object, Object)

HandleComponentAction

protected Object HandleComponentAction(Object componentEvent)

Handles ActionEvents by children of this component.

Parameters:
componentEvent    
Return:
Object

HandleComponentBlur

protected Object HandleComponentBlur(Object componentEvent)

Parameters:
componentEvent    
Return:
Object
Overrides:
AdfDhtmlInputBasePeer.HandleComponentBlur(Object)

HandleComponentFocus

protected Object HandleComponentFocus(Object componentEvent)

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

HandleComponentKeyDown

protected Object HandleComponentKeyDown(Object componentEvent)

Parameters:
componentEvent    
Return:
Object

_handleContextChanged

private Object _handleContextChanged()

Handles the changing of context. All listeners will be updated.

Return:
Object

_handleLoad

private Object _handleLoad(Object nativeEvent)

Called when the IFRAME has finished loading.

Parameters:
nativeEvent    
Return:
Object

_handleLoad

private static Object _handleLoad(Object component)

Parameters:
component    
Return:
Object

_initCodeMirror

private static Object _initCodeMirror(Object component,
                                      Object domElement)

Parameters:
component    
domElement    
Return:
Object

InitConstants

protected static Object InitConstants()

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    
domElement    
Return:
Object
Overrides:
AdfRichUIPeer.InitDomElement(AdfUIComponent, Object)

InitSubclass

protected static Object InitSubclass()

Return:
Object
Overrides:
AdfDhtmlValuePeer.InitSubclass()

_isInCodeContainer

private static Object _isInCodeContainer(Object component,
                                         Object componentEvent)

Parameters:
component    
componentEvent    
Return:
Object

_jump

private Object _jump(Object line)

Parameters:
line    
Return:
Object

_jumpToMarker

private Object _jumpToMarker(Object event)

Parameters:
event    
Return:
Object

_markLine

private Object _markLine(Object line)

Parameters:
line    
Return:
Object

_markText

private static Object _markText(Object component,
                                Object marker,
                                Object markerInfo)

Parameters:
component    
marker    
markerInfo    
Return:
Object

MessageNotify

protected Object MessageNotify(Object maxType,
                               Object messages)

Called to notify the peer that its messages have changed. The messages provided will be an array of FacesMessage or AdfFacesMessage objects. If this array is null then all the messages have been cleared from this component.

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

needsResizeNotify

public Object needsResizeNotify(Object component)

Tests whether the peer requires resize notification. Peers which perform geometry management should override this to return true. When true, resizeNotify() will be called when browser window is resized.

Parameters:
component    
Return:
Object
Overrides:
AdfUIPeer.needsResizeNotify(Object)

_onBlurTimeout

private Object _onBlurTimeout(Object state)

Parameters:
state    
Return:
Object

_redo

private Object _redo()

Return:
Object

_removeCommandBindings

private Object _removeCommandBindings(AdfUIComponent component)

Removes all the bindings of components to a command.

Parameters:
component  -  The component
Return:
Object
See also:
_addCommandBinding(Object, String, String)

_removeCSSStyle

private static Object _removeCSSStyle(Object selector)

Parameters:
selector    
Return:
Object

_replaceAll

private Object _replaceAll(Object parameter)

Parameters:
parameter    
Return:
Object

_replaceCSS

private static Object _replaceCSS(Object component,
                                  Object regex,
                                  Object cssText)

Parameters:
component    
regex    
cssText    
Return:
Object

_replaceNext

private Object _replaceNext(Object parameter)

Parameters:
parameter    
Return:
Object

_resizeEditor

private Object _resizeEditor(Object component)

Parameters:
component    
Return:
Object

resizeNotify

public Object resizeNotify(Object component,
                           Object oldWidth,
                           Object oldHeight,
                           Object newWidth,
                           Object newHeight)

Called to notify the peer of resize activity. Only called if peer overrides needsResizeNotify() to return true.

Parameters:
component    
oldWidth    
oldHeight    
newWidth    
newHeight    
Return:
Object
Overrides:
AdfUIPeer.resizeNotify(Object, Object, Object, Object, Object)

_restoreCursorPosition

private static Object _restoreCursorPosition(Object component,
                                             Object hiddenCursorPosition)

Parameters:
component    
hiddenCursorPosition    
Return:
Object

_retrieveCssContent

private static Object _retrieveCssContent(Object css,
                                          Object disabled)

Parameters:
css    
disabled    
Return:
Object

RunValidation

protected Object RunValidation(Object component,
                               Object targetNode,
                               Object isChangeRequired)

Don't call this code unless the input element is the content node

Parameters:
component    
targetNode    
isChangeRequired    
Return:
Object
Overrides:
AdfDhtmlInputBasePeer.RunValidation(Object, Object, Object)

_saveHiddenCursorPosition

private static Object _saveHiddenCursorPosition(Object component,
                                                Object editor)

Parameters:
component    
editor    
Return:
Object

_searchNext

private Object _searchNext(Object parameter)

Parameters:
parameter    
Return:
Object

_searchPrevious

private Object _searchPrevious(Object parameter)

Parameters:
parameter    
Return:
Object

_setCursor

private Object _setCursor(Object line,
                          Object column)

Parameters:
line    
column    
Return:
Object

_setCursor

private static Object _setCursor(Object component,
                                 Object line,
                                 Object column)

Parameters:
component    
line    
column    
Return:
Object

SetDisplayValue

protected Object SetDisplayValue(Object component,
                                 Object domElement,
                                 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    
domElement    
newValue    
Return:
Object
Overrides:
AdfDhtmlValuePeer.setDisplayValue(Object, Object)

_setLoaded

private static Object _setLoaded(Object component,
                                 Object refresh)

Parameters:
component    
refresh    
Return:
Object

_showPopup

private static Object _showPopup(Object component,
                                 Object popupId)

Parameters:
component    
popupId    
Return:
Object

_undo

private Object _undo()

Return:
Object

_unmark

private Object _unmark()

Return:
Object

_unmarkLine

private Object _unmarkLine()

Return:
Object

VetoShowNoteWindow

protected Object VetoShowNoteWindow(Object component)

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

_waitForCSSResourcesLoad

private static Object _waitForCSSResourcesLoad(Object component,
                                               Object domElement)

Parameters:
component    
domElement    
Return:
Object

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

 

Generated on 2014.03.27 12:59 UTC
Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.