OracleJavaScript API Reference for Oracle ADF Faces

 

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

oracle.adfinternal.view.js.laf.dhtml.datepicker
Class AdfDhtmlChooseDateWallCalendarGridPanel

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adfinternal.view.js.laf.dhtml.datepicker.AdfDhtmlChooseDateLayoutPanel
               |
               +--oracle.adfinternal.view.js.laf.dhtml.datepicker.AdfDhtmlChooseDateWallCalendarGridPanel
Direct Known Subclasses:
AdfDhtmlChooseDateCompactWallCalendarGridPanel

public class AdfDhtmlChooseDateWallCalendarGridPanel
extends AdfDhtmlChooseDateLayoutPanel
Renders and manages all the DOM and custom events within the wall calendar grid. The panel is identified by the key **date This panel queues the following custom events: #1 AdfChooseDateSelectionEvent This panel responds to the following custom events: #1 AdfChooseDateYearSelectingEvent #2 AdfChooseDateMonthSelectingEvent #3 AdfChooseDateYearSelectionEvent #4 AdfChooseDateMonthSelectionEvent #5 AdfChooseDateSelectionsEvent


Field Summary

private static Object
_DATE_CELL_NODE_TYPE
public Object
handleComponentMonthSelecting
Handles AdfChooseDateYearSelectingEvent and AdfChooseDateMonthSelectingEvent
public Object
handleComponentMonthSelection
Handles AdfChooseDateYearSelectionEvent and AdfChooseDateMonthSelectionEvent

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

constructor, superclass

Fields inherited from org.ecmascript.object.Object

prototype

Constructor Summary

public
AdfDhtmlChooseDateWallCalendarGridPanel()
Renders and manages all the DOM and custom events within the wall calendar grid.

Method Summary

private static HTMLElement
_buildCalendarGridDateCell(Object component, Object laf, Object cdRootElem, Object printDate, Object displayMonthAndYear, Object tabIndex0Date, Object tabIndex0Month, Object dateToBeSelected)
Builds a table cell representing the date containing 'printDate'.
private static HTMLElement
_buildCalendarGridRow(Object component, Object laf, Object cdRootElem, Object rowStyleClass, Object printDate, Object displayMonthAndYear, Object tabIndex0Date, Object tabIndex0Month, Object dateToBeSelected)
Builds a table row representing the week containing 'printDate'.
private Object
_buildCalendarGrids(Object component, Object laf, Object gridsContainer, Object animate)
Constructs the DOM structure housing all the calendar months
private static HTMLElement
_buildWallCalendarDateGrid(Object component, Object tBody, Number month, Number year)
Builds the wall calendar matrix rows with date cells with appropriate today/prev month/next month/regular styling
private HTMLElement
_buildWallCalendarForMonth(Object component, Number month, Number year, Object monthGridSubId)
Constructs the DOM structure for a single month
private static HTMLElement
_buildWallCalendarGridHeader(Object component, Object locSymbols, Object weekDayTypeProperty)
Inserts the calendar week header into the passed in DOM node
private static HTMLElement
_buildWeekLabelCell(Number day, Object laf, Object localeSymbols, Object weekDayTypeProperty)
Creates a table header for the specified day index
public Boolean
canProcessComponentEvent(Object component, Object componentEvent)
Whether the panel can process the component event
public Boolean
canProcessDomUIInputEvent(Object component, Object componentEvent)
Whether the panel can process the input event
private static Object
_clearCurrentSelections(Object component, Object panelRoot)
Clears the selected dare style marker from all the selected date cells in the wall calendar grid
private static Object
_convertDateListToDateMap(Object selectedDatesList)
Converts a flat array into a date lookup by resetting the time part of each date in the list
private static Boolean
_dateCellMatcher(Object elemToMatch, Object matchSelectedDate)
Matcher function that tests the passed in element to check if it represents a date cell within the wall calendar grid
private static Boolean
_dateCellSelector(Object tdCell, Object context)
Visitation callback function that performs date selections on the calendar grid.
private static Object
_fillWallCalendarGridWeekLabels(Object component, Object calendarGridHeaderRow, Object locSymbols, Object weekDayTypeProperty)
Injects 7 table columns each containing the respective week labels into the passed in node
private static Object
_focusDateCell(Object dateCellWithFocus, Object dateCellToFocus, Object panelRoot)
Transfers focus from the old cell to the new cell, if the new cell is within the current panel
public String
getBestMatchSubId(Object component, Object domElement)
Returns the best match subId for the given domElement.
private Object
_getCurrentSelection(Object component)
Gets the
element representing the current selection
private static Date
_getDateFromEventTarget(Object eventTarget, Object component)
Gets the Date object by sniffing the target cell and the month grid it is house in
private HTMLElement
_getDayCell(Object component, Object dateToBeSelected)
Gets the
representing day the current calendar month In case of multiple months, the method returns the 1st of the central month.
private static String
_getDayCellStyling(Object component, Object laf, Object printDate, Object displayMonthAndYear, Object today, Object selectedDate, Object isDateDisabled)
Gets the style class to be rendered on the date cell on basis of the passed in parameters
private HTMLElement
_getFirstDayOfMonth(Object component)
Gets the
representing first day (1) of the current calendar month In case of multiple months, the method returns the 1st of the central month.
public HTMLElement
getSubIdDomElement(Object component, string subElementId)
Gets the element representing the subElementId or null
protected String
GetWeekDayTypeProperty()
Gets the week day accessor off LocaleSymbols to use for stamping the week day names.
private static Object
_getYearMonthDateOfCell(Object dateCell, Object component)
Extracts the year, month and date from the cell.
private static Object
_handleArrowKeyNavigation(Object componentEvent, Object panelRoot)
Handles keyboard arrow navigation across date cells
public Boolean
handleComponentClick(Object component, Object componentEvent)
public Boolean
handleComponentDateSelections(Object component, Object componentEvent)
Handles AdfChooseDateSelectionsEvent
public Boolean
handleComponentKeyDown(Object component, Object componentEvent)
private static HTMLElement
_handleLeftNavigation(Object eventTarget, Object component)
Performs navigation along the row towards the left of the active cell.
private static HTMLElement
_handleRightNavigation(Object eventTarget, Object component)
Performs navigation along the row towards the right of the active cell.
private static HTMLElement
_handleVerticalNavigation(Object keyCode, Object eventTarget)
Performs navigation along the column
public Boolean
isVisible(Object component, Object rootDOMElement)
Checks if this panel is visible in the UI.
public Array
render(Object component, Object panelRootElement)
Generates the complete HTML DOM for the panel
private static Object
_selectDateInGrid(Object eventTarget, Object component, Object panelRoot, Object dateSelectionModifiers)
Selects the date in the grid if the event target is a date cell.
public static Object
updatePanelVisibility(Object component, Object panel)
Updates the visibility of the date grid depending on whether we are in regular mode or in month/year selection mode.

Methods inherited from oracle.adfinternal.view.js.laf.dhtml.datepicker.AdfDhtmlChooseDateLayoutPanel

getPanelId, getPanelRootElement, isEnabled, isTogglePanel, registerLayoutPanel

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

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

Field Detail


_DATE_CELL_NODE_TYPE

private static Object _DATE_CELL_NODE_TYPE

handleComponentMonthSelecting

public Object handleComponentMonthSelecting

Handles AdfChooseDateYearSelectingEvent and AdfChooseDateMonthSelectingEvent

handleComponentMonthSelection

public Object handleComponentMonthSelection

Handles AdfChooseDateYearSelectionEvent and AdfChooseDateMonthSelectionEvent

Constructor Detail


AdfDhtmlChooseDateWallCalendarGridPanel

public AdfDhtmlChooseDateWallCalendarGridPanel()

Renders and manages all the DOM and custom events within the wall calendar grid. The panel is identified by the key **date This panel queues the following custom events: #1 AdfChooseDateSelectionEvent This panel responds to the following custom events: #1 AdfChooseDateYearSelectingEvent #2 AdfChooseDateMonthSelectingEvent #3 AdfChooseDateYearSelectionEvent #4 AdfChooseDateMonthSelectionEvent #5 AdfChooseDateSelectionsEvent

Method Detail


_buildCalendarGridDateCell

private static HTMLElement _buildCalendarGridDateCell(Object component,
                                                      Object laf,
                                                      Object cdRootElem,
                                                      Object printDate,
                                                      Object displayMonthAndYear,
                                                      Object tabIndex0Date,
                                                      Object tabIndex0Month,
                                                      Object dateToBeSelected)

Builds a table cell representing the date containing 'printDate'. The method stamps out a new table cell DOM with the following structure: 1

Parameters:
component  
laf  
cdRootElem  
printDate  
displayMonthAndYear  
tabIndex0Date  
tabIndex0Month  
dateToBeSelected  
Return:
HTMLElement - table column element of the newly constructed cell

_buildCalendarGridRow

private static HTMLElement _buildCalendarGridRow(Object component,
                                                 Object laf,
                                                 Object cdRootElem,
                                                 Object rowStyleClass,
                                                 Object printDate,
                                                 Object displayMonthAndYear,
                                                 Object tabIndex0Date,
                                                 Object tabIndex0Month,
                                                 Object dateToBeSelected)

Builds a table row representing the week containing 'printDate'. The method stamps out a new table row DOM with the following structure: 1 2 ...

Parameters:
component  
laf  
cdRootElem  
rowStyleClass  
printDate  
displayMonthAndYear  
tabIndex0Date  
tabIndex0Month  
dateToBeSelected  
Return:
HTMLElement - table row element of the newly constructed week

_buildCalendarGrids

private Object _buildCalendarGrids(Object component,
                                   Object laf,
                                   Object gridsContainer,
                                   Object animate)

Constructs the DOM structure housing all the calendar months

Parameters:
component  
laf  
gridsContainer  
animate  
Return:
Object

_buildWallCalendarDateGrid

private static HTMLElement _buildWallCalendarDateGrid(Object component,
                                                      Object tBody,
                                                      Number month,
                                                      Number year)

Builds the wall calendar matrix rows with date cells with appropriate today/prev month/next month/regular styling

Parameters:
component  
tBody  
month - to be rendered
year - to be rendered
Return:
HTMLElement - table tbody into which week rows have to be generated

_buildWallCalendarForMonth

private HTMLElement _buildWallCalendarForMonth(Object component,
                                               Number month,
                                               Number year,
                                               Object monthGridSubId)

Constructs the DOM structure for a single month

Parameters:
component  
month - to be rendered
year - to be rendered
monthGridSubId  
Return:
HTMLElement - Complete wall calendar DOM for the specified month and year

_buildWallCalendarGridHeader

private static HTMLElement _buildWallCalendarGridHeader(Object component,
                                                        Object locSymbols,
                                                        Object weekDayTypeProperty)

Inserts the calendar week header into the passed in DOM node

Parameters:
component  
locSymbols  
weekDayTypeProperty  
Return:
HTMLElement - node comprising 7 table columns each containing the respective week labels

_buildWeekLabelCell

private static HTMLElement _buildWeekLabelCell(Number day,
                                               Object laf,
                                               Object localeSymbols,
                                               Object weekDayTypeProperty)

Creates a table header for the specified day index

Parameters:
day - of the week [0..6]
laf  
localeSymbols  
weekDayTypeProperty  
Return:
HTMLElement - table header cell with the translated week label

canProcessComponentEvent

public Boolean canProcessComponentEvent(Object component,
                                        Object componentEvent)

Whether the panel can process the component event

Parameters:
component  
componentEvent  
Return:
Boolean - whether the panel will process the AdfComponentEvent
Overrides:
AdfDhtmlChooseDateLayoutPanel.canProcessComponentEvent(Object, Object)

canProcessDomUIInputEvent

public Boolean canProcessDomUIInputEvent(Object component,
                                         Object componentEvent)

Whether the panel can process the input event

Parameters:
component  
componentEvent  
Return:
Boolean - whether the panel will process the AdfDomUIInputEvent
Overrides:
AdfDhtmlChooseDateLayoutPanel.canProcessDomUIInputEvent(Object, Object)

_clearCurrentSelections

private static Object _clearCurrentSelections(Object component,
                                              Object panelRoot)

Clears the selected dare style marker from all the selected date cells in the wall calendar grid

Parameters:
component  
panelRoot  
Return:
Object

_convertDateListToDateMap

private static Object _convertDateListToDateMap(Object selectedDatesList)

Converts a flat array into a date lookup by resetting the time part of each date in the list

Parameters:
selectedDatesList  
Return:
Object - The same list as a time reset date lookup map

_dateCellMatcher

private static Boolean _dateCellMatcher(Object elemToMatch,
                                        Object matchSelectedDate)

Matcher function that tests the passed in element to check if it represents a date cell within the wall calendar grid

Parameters:
elemToMatch  
matchSelectedDate  
Return:
Boolean - True if the passed in element matches the selection criteria

_dateCellSelector

private static Boolean _dateCellSelector(Object tdCell,
                                         Object context)

Visitation callback function that performs date selections on the calendar grid. The method would mark the matching date cells with selected highlighting irrespective of its disabled status.

Parameters:
tdCell  
context  
Return:
Boolean - True if the cell was selected

_fillWallCalendarGridWeekLabels

private static Object _fillWallCalendarGridWeekLabels(Object component,
                                                      Object calendarGridHeaderRow,
                                                      Object locSymbols,
                                                      Object weekDayTypeProperty)

Injects 7 table columns each containing the respective week labels into the passed in node

Parameters:
component  
calendarGridHeaderRow  
locSymbols  
weekDayTypeProperty  
Return:
Object

_focusDateCell

private static Object _focusDateCell(Object dateCellWithFocus,
                                     Object dateCellToFocus,
                                     Object panelRoot)

Transfers focus from the old cell to the new cell, if the new cell is within the current panel

Parameters:
dateCellWithFocus  
dateCellToFocus  
panelRoot  
Return:
Object

getBestMatchSubId

public String getBestMatchSubId(Object component,
                                Object domElement)

Returns the best match subId for the given domElement.

Parameters:
component  
domElement  
Return:
String - the best match subId for the given domElement or null.
Overrides:
AdfDhtmlChooseDateLayoutPanel.getBestMatchSubId(Object, Object)

_getCurrentSelection

private Object _getCurrentSelection(Object component)

Gets the element representing the current selection

Parameters:
component  
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

_getDateFromEventTarget

private static Date _getDateFromEventTarget(Object eventTarget,
                                            Object component)

Gets the Date object by sniffing the target cell and the month grid it is house in

Parameters:
eventTarget  
component  
Return:
Date - Selected date with the old time selection intact

_getDayCell

private HTMLElement _getDayCell(Object component,
                                Object dateToBeSelected)

Gets the representing day the current calendar month In case of multiple months, the method returns the 1st of the central month.

Parameters:
component  
dateToBeSelected  
Return:
HTMLElement - TD element representing the 1st day of the month

_getDayCellStyling

private static String _getDayCellStyling(Object component,
                                         Object laf,
                                         Object printDate,
                                         Object displayMonthAndYear,
                                         Object today,
                                         Object selectedDate,
                                         Object isDateDisabled)

Gets the style class to be rendered on the date cell on basis of the passed in parameters

Parameters:
component  
laf  
printDate  
displayMonthAndYear  
today  
selectedDate  
isDateDisabled  
Return:
String - The style classes to be applied on the print date cell

_getFirstDayOfMonth

private HTMLElement _getFirstDayOfMonth(Object component)

Gets the representing first day (1) of the current calendar month In case of multiple months, the method returns the 1st of the central month.

Parameters:
component  
Return:
HTMLElement - TD element representing the 1st day of the month

getSubIdDomElement

public HTMLElement getSubIdDomElement(Object component,
                                      string subElementId)

Gets the element representing the subElementId or null

Parameters:
component  
subElementId  
Return:
HTMLElement - element representing the queried subElementId or null if not applicable to this panel
Overrides:
AdfDhtmlChooseDateLayoutPanel.getSubIdDomElement(Object, string)

GetWeekDayTypeProperty

protected String GetWeekDayTypeProperty()

Gets the week day accessor off LocaleSymbols to use for stamping the week day names.

Return:
String - Possible values are: "Weekdays", "ShortWeekdays", "NarrowWeekdays"

_getYearMonthDateOfCell

private static Object _getYearMonthDateOfCell(Object dateCell,
                                              Object component)

Extracts the year, month and date from the cell.

Parameters:
dateCell  
component  
Return:
Object - Object with keys yyyy, mm, dd representing extracted year, month and date or null if the element is not a date cell

_handleArrowKeyNavigation

private static Object _handleArrowKeyNavigation(Object componentEvent,
                                                Object panelRoot)

Handles keyboard arrow navigation across date cells

Parameters:
componentEvent  
panelRoot  
Return:
Object - true if the event was successfully handled

handleComponentClick

public Boolean handleComponentClick(Object component,
                                    Object componentEvent)

Parameters:
component  
componentEvent  
Return:
Boolean - true if the event was successfully handled

handleComponentDateSelections

public Boolean handleComponentDateSelections(Object component,
                                             Object componentEvent)

Handles AdfChooseDateSelectionsEvent

Parameters:
component  
componentEvent  
Return:
Boolean - True if the event was successfully handled

handleComponentKeyDown

public Boolean handleComponentKeyDown(Object component,
                                      Object componentEvent)

Parameters:
component  
componentEvent  
Return:
Boolean - true if the event was successfully handled

_handleLeftNavigation

private static HTMLElement _handleLeftNavigation(Object eventTarget,
                                                 Object component)

Performs navigation along the row towards the left of the active cell. In case no cell is available to the left on the current row, the last element of the previous row is returned. If the row happens to be the first and a month is rendered before the current month grid, then the last cell from the previous month is returned

Parameters:
eventTarget  
component  
Return:
HTMLElement - Next element to focus

_handleRightNavigation

private static HTMLElement _handleRightNavigation(Object eventTarget,
                                                  Object component)

Performs navigation along the row towards the right of the active cell. In case no cell is available to the right on the current row, the first element of the next row is returned. If the row happens to be the last and a month is rendered next to the current month grid, then the first cell from the next month is returned

Parameters:
eventTarget  
component  
Return:
HTMLElement - Next element to focus

_handleVerticalNavigation

private static HTMLElement _handleVerticalNavigation(Object keyCode,
                                                     Object eventTarget)

Performs navigation along the column

Parameters:
keyCode  
eventTarget  
Return:
HTMLElement - Next element to focus

isVisible

public Boolean isVisible(Object component,
                         Object rootDOMElement)

Checks if this panel is visible in the UI.

Parameters:
component  
rootDOMElement  
Return:
Boolean - whether the panel is visible
Overrides:
AdfDhtmlChooseDateLayoutPanel.isVisible(Object, Object)

render

public Array render(Object component,
                    Object panelRootElement)

Generates the complete HTML DOM for the panel

Parameters:
component  
panelRootElement  
Return:
Array - Collection of new AdfUIComponent instances created during DOM rendering
Overrides:
AdfDhtmlChooseDateLayoutPanel.render(Object, HTMLElement)

_selectDateInGrid

private static Object _selectDateInGrid(Object eventTarget,
                                        Object component,
                                        Object panelRoot,
                                        Object dateSelectionModifiers)

Selects the date in the grid if the event target is a date cell. This method will also queue a date selection event if the selection is successful

Parameters:
eventTarget  
component  
panelRoot  
dateSelectionModifiers  
Return:
Object

updatePanelVisibility

public static Object updatePanelVisibility(Object component,
                                           Object panel)

Updates the visibility of the date grid depending on whether we are in regular mode or in month/year selection mode.

Parameters:
component  
panel  
Return:
Object

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

 

Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.