OracleJavaScript API Reference for Oracle ADF Faces

 

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

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

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.AdfDhtmlChooseDatePeer

public class AdfDhtmlChooseDatePeer
extends AdfRichUIPeer



Field Summary

private static Object
_AMPM_ID
private static Object
_CAL_GRID_ID
private static Object
_CHOOSE_MONTH_ID
private static Object
_CHOOSE_MONTH_ID_ATTR_NAME
private static Object
_CHOOSE_YEAR_ID_ATTR_NAME
private static Object
_CURRDAY_ID_ATTR_NAME
private static Object
_CURRMONTH_ID_ATTR_NAME
private static Object
_CURRYEAR_ID_ATTR_NAME
private static Object
_DAY_ID_ATTR_NAME
private static Object
_DISABLED_STYLE_CLASS
private static Object
_HOUR_SPIN_ID
private static Object
_LEAD_ZERO
private static Object
_MIN_SPIN_ID
private static Object
_NEXT_MONTH_ID
private static Object
_PARENT_ID
private static Object
_PREV_MONTH_ID
private static Object
_SEC_SPIN_ID
private static Object
_SEL_DAY_CLASS
public static Object
SELECTED_DATE
private static Object
_TIMEZONE_ID
public static Object
TIMEZONE_SEL_DISPLAY
public static Object
TIMEZONE_SEL_ID
private static Object
_YEAR_SPIN_ID
private static Object
_YEAR_SPIN_ID_ATTR_NAME


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


Method Summary

private Object
_getCurrentSelection(Object clearStyle)
private Object
_getGridElement()
private Object
_getSelectedDateTime(Object dayNode)
private Object
_handleArrowKeys(Object keyCode, Object tdcell)
protected Object
HandleComponentClick(Object componentEvent)
protected Object
HandleComponentKeyDown(Object componentEvent)
protected Object
HandleComponentKeyUp(Object componentEvent)
protected Object
HandleComponentValueChange(Object componentEvent)
private Object
_handleMonthChange(Object componentEvent)
User selects different month through select choice
public Object
handleUpdateFromInputComponent(Object chooseComponent, Object propertyName, Object newValue)
Call back method called by input component (directly called by AdfDhtmlInputChooseBindingUtils).
private Object
_handleYearChange(Object componentEvent)
User selects different year through spinbox
protected Object
InitDomElement(Object component, Object domElement)
Initialize the associated domElement when the peer is created.
protected static Object
InitSubclass()
private Object
_isInCalendarGrid(Object node)
private Object
_isInDialog()
private Object
_manipulateMonthValue(Object component, Object increment)
private Object
_queueEvent(Object component, Object month, Object year)
private Object
_selectDateInGrid(Object tdcell, Object component, Object updateInput)
public Object
submitValueToInput(Object dayNode, Object chooseDateComp)


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

addComponentEventHandlers, addComponentPropertyChanges, addComponentPropertyGetters, addDomEventHandlers, addEventHandlerToDomInstance, addSuppressedPPRAttributes, bind, BindToComponent, cancelAllPopups, cancelPopup, ChildVisibilityChanged, ComponentInlineStyleChanged, ComponentPropertyChanged, componentRemoved, 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, Init, InitClass, initialize, isActive, isInActiveHeirarchy, isPopupVisible, messageNotify, MessageNotify, messageShow, MessageShow, needsChildVisibilityChanges, PopupClosed, processPushData, ProcessPushData, registerKeyStroke, replaceDomElement, ReplaceDomElement, resizeNotify, 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, needsResizeNotify


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

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


Field Detail


_AMPM_ID

private static Object _AMPM_ID

_CAL_GRID_ID

private static Object _CAL_GRID_ID

_CHOOSE_MONTH_ID

private static Object _CHOOSE_MONTH_ID

_CHOOSE_MONTH_ID_ATTR_NAME

private static Object _CHOOSE_MONTH_ID_ATTR_NAME

_CHOOSE_YEAR_ID_ATTR_NAME

private static Object _CHOOSE_YEAR_ID_ATTR_NAME

_CURRDAY_ID_ATTR_NAME

private static Object _CURRDAY_ID_ATTR_NAME

_CURRMONTH_ID_ATTR_NAME

private static Object _CURRMONTH_ID_ATTR_NAME

_CURRYEAR_ID_ATTR_NAME

private static Object _CURRYEAR_ID_ATTR_NAME

_DAY_ID_ATTR_NAME

private static Object _DAY_ID_ATTR_NAME

_DISABLED_STYLE_CLASS

private static Object _DISABLED_STYLE_CLASS

_HOUR_SPIN_ID

private static Object _HOUR_SPIN_ID

_LEAD_ZERO

private static Object _LEAD_ZERO

_MIN_SPIN_ID

private static Object _MIN_SPIN_ID

_NEXT_MONTH_ID

private static Object _NEXT_MONTH_ID

_PARENT_ID

private static Object _PARENT_ID

_PREV_MONTH_ID

private static Object _PREV_MONTH_ID

_SEC_SPIN_ID

private static Object _SEC_SPIN_ID

_SEL_DAY_CLASS

private static Object _SEL_DAY_CLASS

SELECTED_DATE

public static Object SELECTED_DATE

_TIMEZONE_ID

private static Object _TIMEZONE_ID

TIMEZONE_SEL_DISPLAY

public static Object TIMEZONE_SEL_DISPLAY

TIMEZONE_SEL_ID

public static Object TIMEZONE_SEL_ID

_YEAR_SPIN_ID

private static Object _YEAR_SPIN_ID

_YEAR_SPIN_ID_ATTR_NAME

private static Object _YEAR_SPIN_ID_ATTR_NAME

Constructor Detail


AdfDhtmlChooseDatePeer

public AdfDhtmlChooseDatePeer()

Method Detail


_getCurrentSelection

private Object _getCurrentSelection(Object clearStyle)

Parameters:
clearStyle  -  Whether to clear out the style on the previous selection
Return:
Object - If there is a date selected in the grid, returns DOM node of its
Searches for the last date selected on the grid and returns its DOM node - If clearStyle is true, clears the style class which marks it as selected

_getGridElement

private Object _getGridElement()

Return:
Object

_getSelectedDateTime

private Object _getSelectedDateTime(Object dayNode)

Parameters:
dayNode  -  DOM element that user selected
Return:
Object - A Javascript Date object corresponding to the selections in the chooseDate, WITHOUT timezone offsets - Reads the various display components if present (year, month, day, hour, minute, second, am/pm, timezone) and constructs a Javascript Date object representing it - If the dayNode is passed in, e.g from onclick event, directly uses that node's value. Otherwise it will walk the grid looking for current selection (slower). If user has made no selection, use the selected date which calendar was rendered with. - Any unspecified date-time components will default to Javascript Date defaults, e.g. midnight for hour, minute, second

_handleArrowKeys

private Object _handleArrowKeys(Object keyCode,
                                Object tdcell)

Parameters:
keyCode  -  Virtual KeyCode, e.g. ARROWKEY_UP
tdcell    
Return:
Object - true if it successfully focused on a date in the calendar grid

HandleComponentClick

protected Object HandleComponentClick(Object componentEvent)

Parameters:
componentEvent  -  Click event Turns component-level clicks into Action events, e.g. - User clicks on date in grid - User clicks on previous/next month arrows
Return:
Object

HandleComponentKeyDown

protected Object HandleComponentKeyDown(Object componentEvent)

Parameters:
componentEvent  -  Key Up event - Implement arrow key support for ChooseDate. Need to cancel the event here, instead of keyUp, to avoid bonus scrolling (see 5926696)
Return:
Object

HandleComponentKeyUp

protected Object HandleComponentKeyUp(Object componentEvent)

Parameters:
componentEvent  -  Key Up event - Implement keyboard support for ChooseDate, e.g. Enter to select a date
Return:
Object

HandleComponentValueChange

protected Object HandleComponentValueChange(Object componentEvent)

Parameters:
componentEvent  -  ValueChangeEvent from a child within the chooseDate This occurs when a change has occured in a child component of the chooseDat.e Checks the source, and handles accordingly by calling the HandleMonthChange or HandleYearChange method.
Return:
Object

_handleMonthChange

private Object _handleMonthChange(Object componentEvent)

User selects different month through select choice

Parameters:
componentEvent  -  Event through which selection was made, e.g. click or key down - Use the component's client Id to find the parent chooseDate - Get the month dropdown value and queue event on chooseDate peer for PPR update
Return:
Object

handleUpdateFromInputComponent

public Object handleUpdateFromInputComponent(Object chooseComponent,
                                             Object propertyName,
                                             Object newValue)

Call back method called by input component (directly called by AdfDhtmlInputChooseBindingUtils).

Parameters:
chooseComponent  -  the choose component to updaadte
propertyName  -  the name of the property to update.
newValue  -  the new value of the property. Called when: - User clicks on an inputDate and then on its inline chooseDate (binding the chooseDate to that inputdate) - A chooseDate is bound, and the inputDate is updated
Return:
Object

_handleYearChange

private Object _handleYearChange(Object componentEvent)

User selects different year through spinbox

Parameters:
componentEvent  -  Event through which selection was made, e.g. mouse click - Use the component's client Id to find the parent chooseDate - Get the year spinbox value and queue event on chooseDate peer for PPR update
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  -  The ChooseDate component
domElement  -  The ChooseDate's domElement being initialized. - Stash attributes for chooseMonth select dropdown and chooseYear spinbox
Return:
Object
Overrides:
AdfRichUIPeer.InitDomElement(AdfUIComponent, Object)

InitSubclass

protected static Object InitSubclass()

Return:
Object

_isInCalendarGrid

private Object _isInCalendarGrid(Object node)

Parameters:
node  -  DOM node representing to test if it is a day in the calendar
Return:
Object - true if it is a day in the grid

_isInDialog

private Object _isInDialog()

Return:
Object

_manipulateMonthValue

private Object _manipulateMonthValue(Object component,
                                     Object increment)

Parameters:
component  -  ChooseDate client component being modified
increment  -  Whether to advance the month or decrement it. - Increases or decreases the month, depending on value of 'increment' argument - Sends PPR to server to update the chooseDate value
Return:
Object

_queueEvent

private Object _queueEvent(Object component,
                           Object month,
                           Object year)

Parameters:
component  -  ChooseDate component being updated
month  -  New month value to update chooseDate component with, ranges from 0 to 11
year  -  New year value to update chooseDate component with, should be the full year (javascript Date.getYear() returns partial year, see http://www.quirksmode.org/js/introdate.html#year Send the choosedate value to the server.
Return:
Object

_selectDateInGrid

private Object _selectDateInGrid(Object tdcell,
                                 Object component,
                                 Object updateInput)

Parameters:
tdcell  -  DOM element for the table cell representing a day in the chooseDate
component  -  ChooseDate component being updated
updateInput  -  Updates the parent inputDate if true - Takes a element and submits its date value to parent Input. If the cell is disabled, do nothing. If enabled, updates the style class for the selected cell and updates parent inputDate.
Return:
Object

submitValueToInput

public Object submitValueToInput(Object dayNode,
                                 Object chooseDateComp)

Parameters:
dayNode  -  DOM node representing a day in the calendar grid, whose value will be used to update the inputDate with
chooseDateComp  -  Choose Date component being updated
Return:
Object

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.