Project Wonder 5.0

er.modern.components
Class ERMDatePicker

java.lang.Object
  extended by com.webobjects.appserver.WOElement
      extended by com.webobjects.appserver.WOComponent
          extended by er.extensions.components.ERXComponent
              extended by er.extensions.components.ERXNonSynchronizingComponent
                  extended by er.extensions.components.ERXStatelessComponent
                      extended by er.modern.components.ERMDatePicker
All Implemented Interfaces:
com.webobjects.appserver.WOActionResults, com.webobjects.foundation.NSKeyValueCoding, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCodingAdditions, com.webobjects.foundation.NSValidation, java.io.Serializable, java.lang.Cloneable

public class ERMDatePicker
extends ERXStatelessComponent

Wrapper around http://www.frequency-decoder.com/2009/09/09/unobtrusive-date-picker-widget-v5/ Because many options take a date with the format of YYYYMMDD there is a utility method: ERMDatePicker.optionsStringForTimestamp(NSTimestamp ts) that will return a correctly formatted string for a given NSTimestamp.

See Also:
Serialized Form
Author:
davidleber
Bindings
dateIn an NSTimestamp supplying the value for the field (required)
           
cssFile name of the css file (defaults to datepicker.css)
           
cssFramework name of the framework containing the css file (defaults to ERModernDirectToWeb)
           
dateformat string containing the date format for the field
           
injectStylesheet choose whether to dynamically inject the datepicker.css at component load. if used in a ajax loaded component, it may be safer to load this manually. See date-picker documentation for following optional values:
           
hightlightDays string - identifies days to highlight on the calendar (format: [0,0,0,0,0,1,1])
           
rangeLow string - date in format YYYYMMDD defining the lowest selectable date
           
rangeHigh string - date in format YYYYMMDD defining the highest selectable date
           
disabledDays string - identifies days on calendar that are disabled (format: [1,0,1,0,1,0,1])
           
disabledDates string - date range of disabled dates (format: YYYYMMDD:YYYYMMDD or YYYYMMDD if single date)
           
enabledDates string - date range of enabled dates (format: YYYYMMDD:YYYYMMDD or YYYYMMDD if single date)
           
noFadeEffect boolean - disables fade in/out effect
           
finalOpacity number - sets final opacity (20 - 100)
           
showWeeks boolean - show week numbers
           
noTodayButton boolean - hide the "Today" button
           
cursorDate string - date in format YYYYMMDD that sets the default cursor date
           
dragDisabled boolean - disable dragging of calendar
           
fillGrid boolean - fill all dates, not just those in current month
           
constrainSelection boolean - if fillGrid is yes, constrain selection to current month (defaults to true)
           
hideInput boolean - hide the input field (don't use if hideControl is specified)
           
hideControl boolean - hide the calendar button (don't use if hideInput is specified)
           

Nested Class Summary
 
Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent
com.webobjects.appserver.WOComponent._EventLoggingEnabler, com.webobjects.appserver.WOComponent.Event
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
com.webobjects.foundation.NSKeyValueCodingAdditions.DefaultImplementation, com.webobjects.foundation.NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
com.webobjects.foundation.NSKeyValueCoding._BooleanFieldBinding, com.webobjects.foundation.NSKeyValueCoding._BooleanMethodBinding, com.webobjects.foundation.NSKeyValueCoding._FieldBinding, com.webobjects.foundation.NSKeyValueCoding._ForwardingBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBinding, com.webobjects.foundation.NSKeyValueCoding._KeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding._MethodBinding, com.webobjects.foundation.NSKeyValueCoding._NumberFieldBinding, com.webobjects.foundation.NSKeyValueCoding._NumberMethodBinding, com.webobjects.foundation.NSKeyValueCoding._ReflectionKeyBindingCreation, com.webobjects.foundation.NSKeyValueCoding.ErrorHandling, com.webobjects.foundation.NSKeyValueCoding.Null, com.webobjects.foundation.NSKeyValueCoding.UnknownKeyException, com.webobjects.foundation.NSKeyValueCoding.ValueAccessor
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
com.webobjects.foundation.NSValidation._MethodBinding, com.webobjects.foundation.NSValidation._ValidationBinding, com.webobjects.foundation.NSValidation.DefaultImplementation, com.webobjects.foundation.NSValidation.Utility, com.webobjects.foundation.NSValidation.ValidationException
 
Field Summary
static java.lang.String CSS_FILENAME
           
static java.lang.String FRAMEWORK_NAME
           
 
Fields inherited from class er.extensions.components.ERXComponent
_dynamicBindings
 
Fields inherited from class com.webobjects.appserver.WOComponent
_Extension, _IsEventLoggingEnabled, _keyAssociations
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Fields inherited from interface com.webobjects.foundation.NSValidation
_CLASS
 
Constructor Summary
ERMDatePicker(com.webobjects.appserver.WOContext context)
           
 
Method Summary
 void appendToResponse(com.webobjects.appserver.WOResponse response, com.webobjects.appserver.WOContext context)
          Adds date-picker.js to the header or includes it in an Ajax friendly manner.
 void awake()
           
 java.lang.String dateformat()
           
 java.lang.String dateFormatString()
           
 java.lang.String datePickerCreateScript()
           
 java.lang.String datePickerOpenScript()
           
 java.lang.String elementID()
           
 java.lang.String name()
           
static java.lang.String optionsStringForTimestamp(com.webobjects.foundation.NSTimestamp ts)
           
 void reset()
           
 void setDateformat(java.lang.String value)
           
 void setValue(com.webobjects.foundation.NSTimestamp newDateIn)
           
 com.webobjects.foundation.NSTimestamp value()
           
 
Methods inherited from class er.extensions.components.ERXStatelessComponent
isStateless, valueForBooleanBinding, valueForBooleanBinding, valueForBooleanBinding, valueForIntBinding, valueForObjectBinding, valueForObjectBinding
 
Methods inherited from class er.extensions.components.ERXNonSynchronizingComponent
invokeAction, resetCachedBindingsInStatefulComponent, synchronizesVariablesWithBindings, takeValuesFromRequest
 
Methods inherited from class er.extensions.components.ERXComponent
_awakeInContext, _checkAccess, _frameworkName, _includeCSSResources, _includeJavascriptResources, additionalCSSFiles, additionalJavascriptFiles, booleanValueForBinding, booleanValueForBinding, booleanValueForBinding, checkAccess, clickToOpenEnabled, componentName, defaultCSSPath, defaultJavascriptPath, dynamicBindings, floatValueForBinding, intValueForBinding, isPageAccessAllowed, localizer, objectValueForBinding, objectValueForBinding, pageWithName, postAppendToResponse, preAppendToResponse, primaryCSSFile, primaryJavascriptFile, stringValueForBinding, stringValueForBinding, useDefaultComponentCSS, useDefaultComponentJavascript
 
Methods inherited from class com.webobjects.appserver.WOComponent
_associationWithName, _childTemplate, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, application, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, isCachingEnabled, isEventLoggingEnabled, logString, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, sleep, takeValueForKey, takeValueForKeyPath, template, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FRAMEWORK_NAME

public static final java.lang.String FRAMEWORK_NAME
See Also:
Constant Field Values

CSS_FILENAME

public static final java.lang.String CSS_FILENAME
See Also:
Constant Field Values
Constructor Detail

ERMDatePicker

public ERMDatePicker(com.webobjects.appserver.WOContext context)
Method Detail

awake

public void awake()
Overrides:
awake in class com.webobjects.appserver.WOComponent

reset

public void reset()
Overrides:
reset in class ERXStatelessComponent

value

public com.webobjects.foundation.NSTimestamp value()

setValue

public void setValue(com.webobjects.foundation.NSTimestamp newDateIn)

appendToResponse

public void appendToResponse(com.webobjects.appserver.WOResponse response,
                             com.webobjects.appserver.WOContext context)
Adds date-picker.js to the header or includes it in an Ajax friendly manner.

Overrides:
appendToResponse in class ERXNonSynchronizingComponent
Parameters:
response - to which we are appending
context - context of the response
See Also:
ERXNonSynchronizingComponent.appendToResponse(com.webobjects.appserver.WOResponse, com.webobjects.appserver.WOContext), ERXResponseRewriter#addScriptResourceInHead(WOResponse, WOContext, String, String)

dateformat

public java.lang.String dateformat()

name

public java.lang.String name()
Overrides:
name in class com.webobjects.appserver.WOComponent

setDateformat

public void setDateformat(java.lang.String value)

dateFormatString

public java.lang.String dateFormatString()
Returns:

datePickerCreateScript

public java.lang.String datePickerCreateScript()

datePickerOpenScript

public java.lang.String datePickerOpenScript()

elementID

public java.lang.String elementID()

optionsStringForTimestamp

public static java.lang.String optionsStringForTimestamp(com.webobjects.foundation.NSTimestamp ts)

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.