OracleJavaScript API Reference for Oracle ADF Faces

 

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

oracle.adfinternal.view.js.behavior
Class AdfAutoSuggestBehavior

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adf.view.js.base.AdfClientBehavior
               |
               +--oracle.adfinternal.view.js.behavior.AdfAutoSuggestBehavior

public class AdfAutoSuggestBehavior
extends AdfClientBehavior
Client behavior implementation to show the suggestedItems in a dropdown for editable input components.



Field Summary

private static Object
_clicked_in_suggestitems
private static Object
_ITEM_VALUE_ATTR
private static Object
_itemsCache
private static Object
_POPUP_CONTAINER_DIV_ID
private static Object
_POPUP_CONTAINER_STYLE
private static Object
_POPUP_PANEL_ID
private static Object
_SELECTED_ITEM_INDEX
private static Object
_SELECTED_STYLE_CLASS
private static Object
_SUGGEST_ITEMS_ID
private static Object
_SUGGESTED_ITEM_STYLE


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

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfAutoSuggestBehavior()
Client behavior implementation to show the suggestedItems in a dropdown for editable input components.


Method Summary

private Object
_autoSuggest(Object component)
private static Object
_cacheSuggestedItems(Object submittedValue, Object suggestedItems)
public static Object
clearBusyStatus(Object clientId)
The function gets called from server in response to customEvent of type _autoSuggest when the suggestedItems size is 0 to clear the busy status
private Object
_clearBusyStatus(Object clientId)
In a case when there is a runtime exception on server while executing the suggestedItems method, the busy icon stays in the input field after notifying the exception until the page is refreshed again Check the request status every half second until the busy state is removed
private static Object
_clearCache()
private static Object
_clearSuggestedItemsCache()
private Object
_fireBlur(Object componentEvent)
Handler for the blur event.
private Object
_fireClick(Object componentEvent)
Handles the click event inside autoSuggest popup.
private Object
_fireFocus(Object componentEvent)
private Object
_fireKeyPress(Object event)
Handles the keyPress event.
private Object
_fireKeyUp(Object componentEvent)
Handler for the keyUp event.
private Object
_fireMouseIn(Object componentEvent)
Handles the mouse over on autoSuggest popup.
private Object
_fireMouseOut(Object componentEvent)
Handles the mouse out inside autoSuggest popup.
private Object
_getCurrentSelectedItem(Object popupContent, Object selectedIndex)
Gets the current highlighted item.
private static Object
_getSuggestedItemsFromCache(Object submittedValue)
protected Object
Init()
Initializes the instance.
protected static Object
InitClass()
public Object
initialize(Object component)
The initialize method is called back to notify the AdfClientBehavior that it is time to perform any required initialization work on the component.
public static Object
showAutoSuggestPopup(Object clientId, Object submittedValue, Object suggestedItems)
The function gets called from server in response to customEvent of type _autoSuggest finds the AutoSuggestBehavior instance from the component and shows the dropdown popup with the suggestedItems suggestedItems will be cached against the submittedValue
private static Object
_showPopup(Object component, Object clientId, Object suggestedItems)
Constructs the popup content dom from the suggestedItems and calls the AdfRichUIPeer.showPopup() api to show the popup


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

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


Field Detail


_clicked_in_suggestitems

private static Object _clicked_in_suggestitems

_ITEM_VALUE_ATTR

private static Object _ITEM_VALUE_ATTR

_itemsCache

private static Object _itemsCache

_POPUP_CONTAINER_DIV_ID

private static Object _POPUP_CONTAINER_DIV_ID

_POPUP_CONTAINER_STYLE

private static Object _POPUP_CONTAINER_STYLE

_POPUP_PANEL_ID

private static Object _POPUP_PANEL_ID

_SELECTED_ITEM_INDEX

private static Object _SELECTED_ITEM_INDEX

_SELECTED_STYLE_CLASS

private static Object _SELECTED_STYLE_CLASS

_SUGGEST_ITEMS_ID

private static Object _SUGGEST_ITEMS_ID

_SUGGESTED_ITEM_STYLE

private static Object _SUGGESTED_ITEM_STYLE

Constructor Detail


AdfAutoSuggestBehavior

public AdfAutoSuggestBehavior()

Client behavior implementation to show the suggestedItems in a dropdown for editable input components.

Method Detail


_autoSuggest

private Object _autoSuggest(Object component)

Parameters:
component    
Return:
Object

_cacheSuggestedItems

private static Object _cacheSuggestedItems(Object submittedValue,
                                           Object suggestedItems)

Parameters:
submittedValue    
suggestedItems    
Return:
Object

clearBusyStatus

public static Object clearBusyStatus(Object clientId)

The function gets called from server in response to customEvent of type _autoSuggest when the suggestedItems size is 0 to clear the busy status

Parameters:
clientId    
Return:
Object

_clearBusyStatus

private Object _clearBusyStatus(Object clientId)

In a case when there is a runtime exception on server while executing the suggestedItems method, the busy icon stays in the input field after notifying the exception until the page is refreshed again Check the request status every half second until the busy state is removed

Parameters:
clientId    
Return:
Object

_clearCache

private static Object _clearCache()

Return:
Object

_clearSuggestedItemsCache

private static Object _clearSuggestedItemsCache()

Return:
Object

_fireBlur

private Object _fireBlur(Object componentEvent)

Handler for the blur event. Clear the cache when the input field loses focus When the user clicks inside the autoSuggest popup, cache will not be cleared

Parameters:
componentEvent    
Return:
Object

_fireClick

private Object _fireClick(Object componentEvent)

Handles the click event inside autoSuggest popup. sets the value selected as display value of the component

Parameters:
componentEvent    
Return:
Object

_fireFocus

private Object _fireFocus(Object componentEvent)

Parameters:
componentEvent    
Return:
Object

_fireKeyPress

private Object _fireKeyPress(Object event)

Handles the keyPress event. records node value length such that _fireKeyUp will queue the _autoSuggest event only when a valid key is entered in the input field.

Parameters:
event    
Return:
Object

_fireKeyUp

private Object _fireKeyUp(Object componentEvent)

Handler for the keyUp event. When there is a value change in the inputfield, schedules the timer to queue the customEvent to the server to get the suggestedItems. Also handles the up and down arrow keys to navigate between the items in the popup when enter key is pressed on an item, sets the value of the item as the display value of the input component.

Parameters:
componentEvent    
Return:
Object

_fireMouseIn

private Object _fireMouseIn(Object componentEvent)

Handles the mouse over on autoSuggest popup. Highlights the item on which the mouse is hover

Parameters:
componentEvent    
Return:
Object

_fireMouseOut

private Object _fireMouseOut(Object componentEvent)

Handles the mouse out inside autoSuggest popup. Removes the highlighted styleclass from the item.

Parameters:
componentEvent    
Return:
Object

_getCurrentSelectedItem

private Object _getCurrentSelectedItem(Object popupContent,
                                       Object selectedIndex)

Gets the current highlighted item.

Parameters:
popupContent    
selectedIndex    
Return:
Object

_getSuggestedItemsFromCache

private static Object _getSuggestedItemsFromCache(Object submittedValue)

Parameters:
submittedValue    
Return:
Object

Init

protected Object Init()

Initializes the instance. Subclasses of AdfObject must call their superclass' Init

Return:
Object
Overrides:
AdfObject.Init()

InitClass

protected static Object InitClass()

Return:
Object

initialize

public Object initialize(Object component)

The initialize method is called back to notify the AdfClientBehavior that it is time to perform any required initialization work on the component. Typically this means registering event handlers.

Parameters:
component    
Return:
Object
Overrides:
AdfClientBehavior.initialize(Object)

showAutoSuggestPopup

public static Object showAutoSuggestPopup(Object clientId,
                                          Object submittedValue,
                                          Object suggestedItems)

The function gets called from server in response to customEvent of type _autoSuggest finds the AutoSuggestBehavior instance from the component and shows the dropdown popup with the suggestedItems suggestedItems will be cached against the submittedValue

Parameters:
clientId    
submittedValue    
suggestedItems    
Return:
Object

_showPopup

private static Object _showPopup(Object component,
                                 Object clientId,
                                 Object suggestedItems)

Constructs the popup content dom from the suggestedItems and calls the AdfRichUIPeer.showPopup() api to show the popup

Parameters:
component    
clientId    
suggestedItems    
Return:
Object

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

 

Generated on 2009.09.25 03:44 UTC
Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.