Project Wonder 5.0

er.coolcomponents
Class CCDatePicker

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.coolcomponents.CCDatePicker
All Implemented Interfaces:
WOActionResults, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, Cloneable

public class CCDatePicker
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
WOComponent._EventLoggingEnabler, WOComponent.Event
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessor
 
Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
Field Summary
static String CSS_FILENAME
           
static 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
CCDatePicker(WOContext context)
           
 
Method Summary
 void appendToResponse(WOResponse response, WOContext context)
          Adds date-picker.js to the header or includes it in an Ajax friendly manner.
 String dateformat()
           
 String dateFormatString()
           
 String datePickerCreateScript()
           
 String datePickerOpenScript()
           
 String elementID()
           
 String name()
           
static String optionsStringForTimestamp(NSTimestamp ts)
           
 void reset()
           
 void setDateformat(String value)
           
 void setValue(NSTimestamp newDateIn)
           
 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, arrayValueForBinding, arrayValueForBinding, booleanValueForBinding, booleanValueForBinding, booleanValueForBinding, checkAccess, clickToOpenEnabled, componentName, defaultCSSPath, defaultJavascriptPath, dynamicBindings, floatValueForBinding, intValueForBinding, isPageAccessAllowed, localizer, objectValueForBinding, objectValueForBinding, pageWithName, postAppendToResponse, preAppendToResponse, primaryCSSFile, primaryJavascriptFile, shouldCheckAccess, stringValueForBinding, stringValueForBinding, useDefaultComponentCSS, useDefaultComponentJavascript
 
Methods inherited from class com.webobjects.appserver.WOComponent
__valueForBinding, _associationWithName, _childTemplate, _cleanUpStatelessComponent, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, application, awake, 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, setVariableValueForName, sleep, takeValueForKey, takeValueForKeyPath, template, templateWithHTMLString, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding, variableValueForName, variableWithName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FRAMEWORK_NAME

public static final String FRAMEWORK_NAME
See Also:
Constant Field Values

CSS_FILENAME

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

CCDatePicker

public CCDatePicker(WOContext context)
Method Detail

reset

public void reset()
Overrides:
reset in class ERXStatelessComponent

value

public NSTimestamp value()

setValue

public void setValue(NSTimestamp newDateIn)

appendToResponse

public void appendToResponse(WOResponse response,
                             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 String dateformat()

name

public String name()
Overrides:
name in class WOComponent

setDateformat

public void setDateformat(String value)

dateFormatString

public String dateFormatString()

datePickerCreateScript

public String datePickerCreateScript()

datePickerOpenScript

public String datePickerOpenScript()

elementID

public String elementID()

optionsStringForTimestamp

public static String optionsStringForTimestamp(NSTimestamp ts)

Last updated: Wed, Feb 22, 2012 • 07:00 AM EST

Copyright © 2002 – 2011 Project Wonder.