
Public Member Functions | |
| AjaxDatePicker (WOContext context) | |
| void | appendToResponse (WOResponse res, WOContext ctx) |
| void | awake () |
| String | format () |
| Format | formatter () |
| WOActionResults | handleRequest (WORequest request, WOContext context) |
| boolean | isStateless () |
| String | onClickScript () |
| String | onFocusScript () |
| NSMutableDictionary | options () |
| void | reset () |
| String | showCalendarScript () |
| String | translateSimpleDateFormatSymbols (String symbols) |
| void | validationFailedWithException (Throwable t, Object value, String keyPath) |
Protected Member Functions | |
| void | addRequiredWebResources (WOResponse response) |
| String | cssFileFrameworkName () |
| String | cssFileName () |
Private Member Functions | |
| void | replace (StringBuilder builder, String original, String replacement) |
Private Attributes | |
| String | format |
| Format | formatter |
| NSMutableDictionary< String, String > | options |
Static Private Attributes | |
| static String | defaultImagesDir |
Only one of format or formatter may be bound, if both are unbound the default of m d Y is used. If format is bound, the pattern is used to create an internal formatter for validation. If formatter is bound, its pattern is extracted and used in place of format. The format/formatter is used to control the initial display in the input, the format of the value that the date picker places into the input, and validation of the input contents on form submission. The use of formatter over format is preferred for reasons of efficiency and localization.
NOTE: the AjaxDatePicker does NOT play nice with the AjaxModalDialogOpener. There is some sort of initialization conflict (I think) with Prototype that leaves you with a blank page and the browser waiting forever for something (and I have not been able to determine what it is) as soon as calendar.js loads and initialized. It will work if the page the AMD appears on explicitly loads the calendar.js in it's HEAD:
public void appendToResponse(WOResponse response, WOContext context) { super.appendToResponse(response, context); ERXResponseRewriter.addScriptResourceInHead(response, context(), "Ajax", "calendar.js"); }
value the value that will be shown in the input field and set by the date picker (required) format the format to use in the input field (only one of format or formatter may be bound) formatter the formatter to use with the input field (only one of format or formatter may be bound)
id HTML ID passed to the input field class CSS class passed to the input field style CSS style passed to the input field size size attribute passed to the input field maxlength maxlength attribute passed to the input field name name attribute passed to the input field disabled passed to the input field onDateSelect JavaScript to execute when a date is selected from the calendar fireEvent false if the onChange event for the input should NOT be fired when a date is selected in the calendar, defaults to true
dayNames list of day names (Sunday to Saturday) for localization, English is the default monthNames list of month names for localization, English is the default imagesDir directory to take images from, takes them from Ajax.framework by default
calendarCSS name of CSS resource with classed for calendar, defaults to "calendar.css" calendarCSSFramework name of framework (null for application) containing calendarCSS resource, defaults to "Ajax"
com.webobjects.foundation.NSTimestampFormatter
| AjaxDatePicker | ( | WOContext | context | ) |
| void addRequiredWebResources | ( | WOResponse | response | ) | [protected, virtual] |
Includes calendar.css and calendar.js.
Implements AjaxComponent.
| void appendToResponse | ( | WOResponse | res, | |
| WOContext | ctx | |||
| ) |
Sets up AjaxOptions prior to rendering.
Reimplemented from AjaxComponent.
| void awake | ( | ) |
Sets up format / formatter values.
| String cssFileFrameworkName | ( | ) | [protected] |
| String cssFileName | ( | ) | [protected] |
| Format formatter | ( | ) |
| WOActionResults handleRequest | ( | WORequest | request, | |
| WOContext | context | |||
| ) | [virtual] |
No action so nothing for us to handle.
Implements AjaxComponent.
| boolean isStateless | ( | ) |
true | String onClickScript | ( | ) |
| String onFocusScript | ( | ) |
Helper method for translateSimpleDateFormatSymbols.
| void reset | ( | ) |
Clear cached values.
Quick and rude translation of formatting symbols from SimpleDateFormat to the symbols that this component uses.
| symbols | the date format symbols to translate |
| void validationFailedWithException | ( | Throwable | t, | |
| Object | value, | |||
| String | keyPath | |||
| ) |
Overridden so that parent will handle in the same manner as if this were a dynamic element.
String defaultImagesDir [static, private] |
Format formatter [private] |
NSMutableDictionary<String, String> options [private] |
1.5.8