OracleJavaScript API Reference for Oracle ADF Faces

 

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

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

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

public class AdfDhtmlQueryPeer
extends AdfDhtmlPanelHeaderPeer



Field Summary

private static Object
_APPLY_BUTTON_SUBID
private static Object
_CONJUNCTION_SUBID
public static Object
CONTENT_SUBID
private static Object
_CRITERION_VALUE_SUBID
private static Object
_CSSDLG_SSEARCH_NAME_SUBID
private static Object
_CSSDLG_SUBID
private static Object
_CSSDLG_UIHINT_AUTOEXECUTE_SUBID
private static Object
_CSSDLG_UIHINT_DEFAULT_SUBID
private static Object
_CSSDLG_UIHINT_SAVERESULTLAYOUT_SUBID
private static Object
_CSSPOPUP_SUBID
private static Object
_DELETE_BUTTON_SUBID
private static Object
_DELETE_WARNING_DLG_SUBID
private static Object
_DELETE_WARNING_MSG_SUBID
private static Object
_DELETE_WARNING_POPUP_SUBID
private static Object
_DISCLOSE_SUBID
private static Object
_INDEXED_FIELD
private static Object
_MODE_BUTTON_SUBID
private static Object
_MSG_SAVED_SEARCH_DELETE_WARNING
private static Object
_NAMING_SEP
private static Object
_OPERATOR_DROPDOWN_SUBID
private static Object
_PERSONALIZE_SSEARCH_KEY
private static Object
_PSSDLG_SSEARCH_CHOICE_SUBID
private static Object
_PSSDLG_SSEARCH_NAME_SUBID
private static Object
_PSSDLG_SUBID
private static Object
_PSSDLG_UIHINT_AUTOEXECUTE_SUBID
private static Object
_PSSDLG_UIHINT_DEFAULT_SUBID
private static Object
_PSSDLG_UIHINT_SHOWINLIST_SUBID
private static Object
_PSSPOPUP_SUBID
private static Object
_RESET_BUTTON_SUBID
private static Object
_SAVE_BUTTON_SUBID
private static Object
_SEARCH_BUTTON_SUBID
private static Object
_SEPARATOR_KEY
private static Object
_SSEARCH_CHOICE_SUBID
private static Object
_UIHINT_AUTOEXECUTE
private static Object
_UIHINT_DEFAULT
private static Object
_UIHINT_NAME
private static Object
_UIHINT_SAVE_RESULTS_LAYOUT
private static Object
_UIHINT_SHOW_IN_LIST


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
AdfDhtmlQueryPeer()


Method Summary

private Object
_getCreateOrUpdateValue(Object component, Object dlgId)
Creates a Map of return values that reflects the selecions/changes made to the content in the Saved Search dialogs.
private Object
_getDeleteWarningPopupComponent()
Returns the delete warning popup component.
private Object
_getPopupComponent(Object clientId, Object isPersonalize)
Returns the popup component for the personalize popup if isPersonalize is true, else the component for the create popup.
public static Object
getSavedSearchNames()
Returns the stored saved search names.
private Object
_getSelectedSearchName(Object component, Object isPersonalize)
Returns the value of the saved search that is currently selected, either in the Personalize Saved Search dialog or in the search panel.
private static Object
_getSSNameComponent(Object clientId, Object isPsz)
Helper function that returns the Saved search name component in either dialog.
private Object
_handleCheckboxClick(Object componentEvent, Object eventTargetId)
Handles checkbox selections in both the dialogs.
protected Object
HandleComponentClick(Object componentEvent)
Handler for the component mouse click events.
private Object
_handleComponentClickInDialog(Object componentEvent)
Handles component click events generated from components within the dialog.
protected Object
HandleComponentDialog(Object componentEvent)
Takes the appropriate action when the dialog buttons OK and Cancel are clicked in the Saved Search dialogs or YES/NO are clicked in the delete warning dialog.
protected Object
HandleComponentKeyDown(Object componentEvent)
When query component is used inside a dialog and the Enter key pressed, keydown event is not bubbles up to the dialog potentially causing it to close, especially if the dialog has an OK outcome.
protected Object
HandleComponentKeyPress(Object componentEvent)
When query component is used inside a dialog and the Enter key pressed, keydown event is not bubbles up to the dialog potentially causing it to close, especially if the dialog has an OK outcome.
protected Object
HandleComponentKeyUp(Object componentEvent)
The query component has a built-in notion of a defaultCommand that should execute a search when user hits the Enter key.
private Object
_handleComponentOperation(Object componentEvent)
protected Object
HandleComponentValueChange(Object componentEvent)
Handles any value change event that happens within the query component.
private Object
_handleConjunctionSelection(Object query, Object componentEvent)
Queues a QueryInternalEvent when a conjunction is selected.
protected Object
HidePopupDialog(Object clientId, Object isPersonalize)
Hides the popup dialog when OK or Cancel is pressed on either dialog.
protected static Object
InitSubclass(Object nativeEvent, Object newDisclosureState)
Initializes variables and adds component event handlers.
private Object
_isCheckboxClicked(Object elem, Object rootId, Object subId)
Determines if the checkbox was clicked.
private Object
_isClickInClientComponent(Object node, Object id)
private Object
_isClickInSubComponent(Object elem, Object subId)
private Boolean
_isEnterKeyNotConsumed(Object componentEvent)
Return true if Enter key is pressed on a component that does not consume it else return false.
private Object
_isEventTargetInChoiceComponent(Object componentEvent)
Returns true if the event source is one of the select subcomponent in Query.
private Object
_passSavedSearchNameCheck(Object component, Object isPsz)
Validates the entered name by performing the following checks 1.
protected Object
PopupClosed(Object component, Object contentDom)
Callback method called when the popup is closed.
private Object
_queueResultComponentEvent(Object component)
private Object
_setComponentError(Object component, Object summaryKey, Object detailKey, Object trResourceKey)
Adds the error message to the component if the component passed in is valid, otherwise it displays a page level error.
public static Object
setSavedSearchNames(Object names)
This method is used to store the saved search names.
private Object
_showDeleteWarningPopup()
Shows the warning dialog popup when delete button is clicked.
protected Object
ShowPopupDialog(Object clientId, Object isPersonalize)
Shows the query popup when the Personalize..
private Boolean
_validateCriterionFields()
Returns false if any of the required criterion value field is null (or empty) and show the value component in error else true or none of the selectively required fields provided with a non null value.


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

ComponentRemoved, Init, needsResizeNotify, ResizeNotify


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

addComponentEventHandlers, addComponentPropertyChanges, addComponentPropertyGetters, addDomEventHandlers, addEventHandlerToDomInstance, addSuppressedPPRAttributes, bind, BindToComponent, cancelAllPopups, cancelPopup, ChildVisibilityChanged, ComponentInlineStyleChanged, ComponentPropertyChanged, componentRemoved, ComponentStyleClassChanged, ComponentVisibleChanged, ConvertClientIdToLocator, convertLocatorToClientId, CreateDraggableNode, createPeerClass, createSubId, CreateSubId, DefaultInitClass, DispatchComponentEvent, 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, getDragOverFeedback, GetDragOverFeedback, getDragTransferable, GetDragTransferable, getFirstAncestorComponent, getInlineEditor, GetInlineEditor, getInlineStyleProperty, getLocatorByDomElement, getPagePosition, getPopupWindow, GetRichResourceURL, getSubIdDomElement, GetSubIdDomElement, hideAllPopups, hidePopup, InitClass, InitDomElement, initialize, isActive, isInActiveHeirarchy, isPopupVisible, messageNotify, MessageNotify, messageShow, 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.base.AdfUIPeer

getDefaultDragRecognizer, getParentPeer, initiateDrag, isVisible


Methods inherited from oracle.adf.view.js.base.AdfObject

adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString


Field Detail


_APPLY_BUTTON_SUBID

private static Object _APPLY_BUTTON_SUBID

_CONJUNCTION_SUBID

private static Object _CONJUNCTION_SUBID

CONTENT_SUBID

public static Object CONTENT_SUBID

_CRITERION_VALUE_SUBID

private static Object _CRITERION_VALUE_SUBID

_CSSDLG_SSEARCH_NAME_SUBID

private static Object _CSSDLG_SSEARCH_NAME_SUBID

_CSSDLG_SUBID

private static Object _CSSDLG_SUBID

_CSSDLG_UIHINT_AUTOEXECUTE_SUBID

private static Object _CSSDLG_UIHINT_AUTOEXECUTE_SUBID

_CSSDLG_UIHINT_DEFAULT_SUBID

private static Object _CSSDLG_UIHINT_DEFAULT_SUBID

_CSSDLG_UIHINT_SAVERESULTLAYOUT_SUBID

private static Object _CSSDLG_UIHINT_SAVERESULTLAYOUT_SUBID

_CSSPOPUP_SUBID

private static Object _CSSPOPUP_SUBID

_DELETE_BUTTON_SUBID

private static Object _DELETE_BUTTON_SUBID

_DELETE_WARNING_DLG_SUBID

private static Object _DELETE_WARNING_DLG_SUBID

_DELETE_WARNING_MSG_SUBID

private static Object _DELETE_WARNING_MSG_SUBID

_DELETE_WARNING_POPUP_SUBID

private static Object _DELETE_WARNING_POPUP_SUBID

_DISCLOSE_SUBID

private static Object _DISCLOSE_SUBID

_INDEXED_FIELD

private static Object _INDEXED_FIELD

_MODE_BUTTON_SUBID

private static Object _MODE_BUTTON_SUBID

_MSG_SAVED_SEARCH_DELETE_WARNING

private static Object _MSG_SAVED_SEARCH_DELETE_WARNING

_NAMING_SEP

private static Object _NAMING_SEP

_OPERATOR_DROPDOWN_SUBID

private static Object _OPERATOR_DROPDOWN_SUBID

_PERSONALIZE_SSEARCH_KEY

private static Object _PERSONALIZE_SSEARCH_KEY

_PSSDLG_SSEARCH_CHOICE_SUBID

private static Object _PSSDLG_SSEARCH_CHOICE_SUBID

_PSSDLG_SSEARCH_NAME_SUBID

private static Object _PSSDLG_SSEARCH_NAME_SUBID

_PSSDLG_SUBID

private static Object _PSSDLG_SUBID

_PSSDLG_UIHINT_AUTOEXECUTE_SUBID

private static Object _PSSDLG_UIHINT_AUTOEXECUTE_SUBID

_PSSDLG_UIHINT_DEFAULT_SUBID

private static Object _PSSDLG_UIHINT_DEFAULT_SUBID

_PSSDLG_UIHINT_SHOWINLIST_SUBID

private static Object _PSSDLG_UIHINT_SHOWINLIST_SUBID

_PSSPOPUP_SUBID

private static Object _PSSPOPUP_SUBID

_RESET_BUTTON_SUBID

private static Object _RESET_BUTTON_SUBID

_SAVE_BUTTON_SUBID

private static Object _SAVE_BUTTON_SUBID

_SEARCH_BUTTON_SUBID

private static Object _SEARCH_BUTTON_SUBID

_SEPARATOR_KEY

private static Object _SEPARATOR_KEY

_SSEARCH_CHOICE_SUBID

private static Object _SSEARCH_CHOICE_SUBID

_UIHINT_AUTOEXECUTE

private static Object _UIHINT_AUTOEXECUTE

_UIHINT_DEFAULT

private static Object _UIHINT_DEFAULT

_UIHINT_NAME

private static Object _UIHINT_NAME

_UIHINT_SAVE_RESULTS_LAYOUT

private static Object _UIHINT_SAVE_RESULTS_LAYOUT

_UIHINT_SHOW_IN_LIST

private static Object _UIHINT_SHOW_IN_LIST

Constructor Detail


AdfDhtmlQueryPeer

public AdfDhtmlQueryPeer()

Method Detail


_getCreateOrUpdateValue

private Object _getCreateOrUpdateValue(Object component,
                                       Object dlgId)

Creates a Map of return values that reflects the selecions/changes made to the content in the Saved Search dialogs.

Parameters:
component  -  the component that this peer will be associated with
dlgId  -  the id of the dialog whose content is packaged.
Return:
Object - a Map of values.

_getDeleteWarningPopupComponent

private Object _getDeleteWarningPopupComponent()

Returns the delete warning popup component.

Return:
Object - the AdfRichPopup component instance or null.

_getPopupComponent

private Object _getPopupComponent(Object clientId,
                                  Object isPersonalize)

Returns the popup component for the personalize popup if isPersonalize is true, else the component for the create popup.

Parameters:
clientId    
isPersonalize    
Return:
Object - the AdfRichPopup component instance or null.

getSavedSearchNames

public static Object getSavedSearchNames()

Returns the stored saved search names. If _existingSearchNames is null or undefined it returns a blank array object.

Return:
Object - array of saved search names

_getSelectedSearchName

private Object _getSelectedSearchName(Object component,
                                      Object isPersonalize)

Returns the value of the saved search that is currently selected, either in the Personalize Saved Search dialog or in the search panel.

Parameters:
component  -  the component that this peer is associated with.
isPersonalize  -  whether we are in personalize dialog or not.
Return:
Object - the saved search that is currently selected or null.

_getSSNameComponent

private static Object _getSSNameComponent(Object clientId,
                                          Object isPsz)

Helper function that returns the Saved search name component in either dialog.

Parameters:
clientId  -  a String that is the clientId for the savedSearch component
isPsz  -  a boolean indicating whether the personalize dialog is open.
Return:
Object

_handleCheckboxClick

private Object _handleCheckboxClick(Object componentEvent,
                                    Object eventTargetId)

Handles checkbox selections in both the dialogs.

Parameters:
componentEvent  -  componentEvent generated by the checkbox click
eventTargetId  -  the id associated with the node (usually a checkbox) that generated the event
Return:
Object

HandleComponentClick

protected Object HandleComponentClick(Object componentEvent)

Handler for the component mouse click events. Handles click events generated by the buttons ( Search, Reset, Save, Cancel, Ok, Disclose and Delete) and the UIHint check boxes in both the dialogs.

Parameters:
componentEvent  -  the component event generated by mouse click.
Return:
Object
Overrides:
AdfDhtmlPanelHeaderPeer.HandleComponentClick(Object)

_handleComponentClickInDialog

private Object _handleComponentClickInDialog(Object componentEvent)

Handles component click events generated from components within the dialog.

Parameters:
componentEvent  -  the component event generated by mouse click.
Return:
Object

HandleComponentDialog

protected Object HandleComponentDialog(Object componentEvent)

Takes the appropriate action when the dialog buttons OK and Cancel are clicked in the Saved Search dialogs or YES/NO are clicked in the delete warning dialog. All of these actions additionally close the dialog.

Parameters:
componentEvent  -  the component event generated from a button click.
Return:
Object
Overrides:
AdfDhtmlPanelHeaderPeer.HandleComponentDialog(Object)

HandleComponentKeyDown

protected Object HandleComponentKeyDown(Object componentEvent)

When query component is used inside a dialog and the Enter key pressed, keydown event is not bubbles up to the dialog potentially causing it to close, especially if the dialog has an OK outcome. Canceling the keydown event, when it is not consumed by any of the subcomponents of the query does, is therefore required.

Parameters:
componentEvent  -  the component event generated by enter key down.
Return:
Object
See also:
AdfDhtmlDialogPeer.HandleComponentKeyDown(AdfUIInputEvent)

HandleComponentKeyPress

protected Object HandleComponentKeyPress(Object componentEvent)

When query component is used inside a dialog and the Enter key pressed, keydown event is not bubbles up to the dialog potentially causing it to close, especially if the dialog has an OK outcome. Canceling the keydown event, when it is not consumed by any of the subcomponents of the query does, is therefore required.

Parameters:
componentEvent  -  the component event generated by enter key press.
Return:
Object
See also:
AdfDhtmlDialogPeer.HandleComponentKeyPress(AdfUIInputEvent)

HandleComponentKeyUp

protected Object HandleComponentKeyUp(Object componentEvent)

The query component has a built-in notion of a defaultCommand that should execute a search when user hits the Enter key. But we need to exclude the cases where Enter key actually means something to the native target: a. when focus is in a textarea (inserts a new line) b. when focus is on an anchor (executes a command or is a GET) c. when focus is on a button (input type=button, input type=submit, input type=reset, or plain button) d. when the key event has been canceled specifically by another component/peer (e.g. there may be other input components that want to cancel this key and prevent executing a search. - Enter on operator dropdown autoSubmits to refresh the value fields - Enter on saved search dropdown handles ValueChange and queues an QueryInternalEvent Outside of the above special cases is the Enter key is pressed on a component that does not consume it , then queue a QueryEvent.

Parameters:
componentEvent  -  the component event generated by enter key up.
Return:
Object

_handleComponentOperation

private Object _handleComponentOperation(Object componentEvent)

Parameters:
componentEvent    
Return:
Object

HandleComponentValueChange

protected Object HandleComponentValueChange(Object componentEvent)

Handles any value change event that happens within the query component. Specifically when the source of the ValueChange event was the saved search dropdwon in the Personalize Saved Search dialog or the main search panel.

Parameters:
componentEvent  -  event through which selection was made, e.g. mouse click
Return:
Object

_handleConjunctionSelection

private Object _handleConjunctionSelection(Object query,
                                           Object componentEvent)

Queues a QueryInternalEvent when a conjunction is selected.

Parameters:
query    
componentEvent    
Return:
Object

HidePopupDialog

protected Object HidePopupDialog(Object clientId,
                                 Object isPersonalize)

Hides the popup dialog when OK or Cancel is pressed on either dialog.

Parameters:
clientId  -  of the query component
isPersonalize    
Return:
Object

InitSubclass

protected static Object InitSubclass(Object nativeEvent,
                                     Object newDisclosureState)

Initializes variables and adds component event handlers.

Parameters:
nativeEvent    
newDisclosureState    
Return:
Object
Overrides:
AdfDhtmlPanelHeaderPeer.InitSubclass()

_isCheckboxClicked

private Object _isCheckboxClicked(Object elem,
                                  Object rootId,
                                  Object subId)

Determines if the checkbox was clicked.

Parameters:
elem    
rootId    
subId    
Return:
Object

_isClickInClientComponent

private Object _isClickInClientComponent(Object node,
                                         Object id)

Parameters:
node    
id    
Return:
Object

_isClickInSubComponent

private Object _isClickInSubComponent(Object elem,
                                      Object subId)

Parameters:
elem    
subId    
Return:
Object

_isEnterKeyNotConsumed

private Boolean _isEnterKeyNotConsumed(Object componentEvent)

Return true if Enter key is pressed on a component that does not consume it else return false. We need to track the cases where Enter key actually means something to the native target: a. when focus is in a textarea (inserts a new line) b. when focus is on an anchor (executes a command or is a GET) c. when focus is on a button (input type=button, input type=submit, input type=reset, or plain button) d. when the key event has been canceled specifically by another component/peer (e.g. there may be other input components that want to cancel this key and prevent executing a search. Outside of the above special cases is the Enter key is pressed on a component that does not consume it , then return false.

Parameters:
componentEvent  -  the component event
Return:
Boolean - true if Enter key is pressed on a component that does not consume it

_isEventTargetInChoiceComponent

private Object _isEventTargetInChoiceComponent(Object componentEvent)

Returns true if the event source is one of the select subcomponent in Query.

Parameters:
componentEvent  -  the component event - Enter on operator dropdown autoSubmits to refresh the value fields - Enter on saved search dropdown handles ValueChange and queues an QueryInternalEvent
Return:
Object

_passSavedSearchNameCheck

private Object _passSavedSearchNameCheck(Object component,
                                         Object isPsz)

Validates the entered name by performing the following checks 1. if the input node is disabled returns true. 2. if the name is empty adds a NOTNULL error message 3. if there are saved searches with the same name as entered adds a DUPLICATE_NAME error message. The new name is always checked against the full list of saved search names.

Parameters:
component  -  the component that this peer binds to
isPsz  -  a boolean whose true value indicates that we are in the personalize saved search dialog and a false value indicates the Create Saved Search dialog
Return:
Object - false if there is an existing saved search with the same name. true otherwise.

PopupClosed

protected Object PopupClosed(Object component,
                             Object contentDom)

Callback method called when the popup is closed. This is used to do clean up after close.

Parameters:
component    
contentDom    
Return:
Object
Overrides:
AdfRichUIPeer.PopupClosed(AdfUIComponent, HTMLElement, String)

_queueResultComponentEvent

private Object _queueResultComponentEvent(Object component)

Parameters:
component    
Return:
Object

_setComponentError

private Object _setComponentError(Object component,
                                  Object summaryKey,
                                  Object detailKey,
                                  Object trResourceKey)

Adds the error message to the component if the component passed in is valid, otherwise it displays a page level error.

Parameters:
component  -  the component instance to which the error needs to be added.
summaryKey  -  the key to use retrieve the translated message summary.
detailKey  -  the key to use to retrieve the translated message detail
trResourceKey    
Return:
Object

setSavedSearchNames

public static Object setSavedSearchNames(Object names)

This method is used to store the saved search names. This function is referenced from the method _renderSavedSearchListScript() of QueryRenderer class to pass the saved search names.

Parameters:
names  -  array of saved search names
Return:
Object

_showDeleteWarningPopup

private Object _showDeleteWarningPopup()

Shows the warning dialog popup when delete button is clicked.

Return:
Object

ShowPopupDialog

protected Object ShowPopupDialog(Object clientId,
                                 Object isPersonalize)

Shows the query popup when the Personalize.. entry or the Save... button is clicked.

Parameters:
clientId  -  of the query component
isPersonalize  -  whether the Personalize dialog or the Create Saved Search dialog will be shown
Return:
Object

_validateCriterionFields

private Boolean _validateCriterionFields()

Returns false if any of the required criterion value field is null (or empty) and show the value component in error else true or none of the selectively required fields provided with a non null value.

Return:
Boolean - false if validation fails else true

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.