org.wicketstuff.jwicket.ui.datepicker
Class DatePicker

java.lang.Object
  extended by org.apache.wicket.behavior.Behavior
      extended by org.apache.wicket.behavior.AbstractAjaxBehavior
          extended by org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
              extended by org.wicketstuff.jwicket.JQueryAjaxBehavior
                  extended by org.wicketstuff.jwicket.JQueryDurableAjaxBehavior
                      extended by org.wicketstuff.jwicket.ui.datepicker.DatePicker
All Implemented Interfaces:
Serializable, org.apache.wicket.behavior.IBehaviorListener, org.apache.wicket.IComponentAwareEventSink, org.apache.wicket.IRequestListener, org.apache.wicket.markup.html.IComponentAwareHeaderContributor, org.apache.wicket.util.io.IClusterable, org.wicketstuff.jwicket.IStyleResolver

public class DatePicker
extends org.wicketstuff.jwicket.JQueryDurableAjaxBehavior
implements org.wicketstuff.jwicket.IStyleResolver

You can add an instance of this class to a Wicket Component to make it a resizable Component. An instance of this class can be added to one and only one Component. Another Component that should have exactly the same behavior needs it's own instance.

See Also:
Serialized Form

Nested Class Summary
protected static class DatePicker.AjaxCall
           
static class DatePicker.ShowAnim
           
static class DatePicker.ShowDay
          This Class controls the visibility of a single day rectangle in the DatePicker popup and the ability to select this day and an optional text popup for a single day.
static class DatePicker.ShowOnTrigger
           
 
Nested classes/interfaces inherited from class org.wicketstuff.jwicket.JQueryAjaxBehavior
org.wicketstuff.jwicket.JQueryAjaxBehavior.JsAjaxCallbackFunction, org.wicketstuff.jwicket.JQueryAjaxBehavior.JsBuilder, org.wicketstuff.jwicket.JQueryAjaxBehavior.JsFunction
 
Field Summary
static org.wicketstuff.jwicket.JQueryResourceReference datePickerDefaultShowDayState
           
protected  org.wicketstuff.jwicket.JsMap options
           
static org.wicketstuff.jwicket.JQueryResourceReference uiDatepickerJs
           
static org.wicketstuff.jwicket.JQueryResourceReference uiDatepickerJs_de
           
 
Fields inherited from class org.wicketstuff.jwicket.JQueryDurableAjaxBehavior
rendered
 
Fields inherited from class org.wicketstuff.jwicket.JQueryAjaxBehavior
rawOptions
 
Fields inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
INDICATOR
 
Fields inherited from interface org.apache.wicket.behavior.IBehaviorListener
INTERFACE
 
Constructor Summary
DatePicker()
           
DatePicker(CharSequence icon)
           
DatePicker(org.apache.wicket.request.resource.ResourceReference icon)
           
 
Method Summary
 void addShowDayState(DatePicker.ShowDay state)
          Add one more special treatment for a day.
protected  String configureOnSelectGetOrPost()
           
 void disable(org.apache.wicket.ajax.AjaxRequestTarget target)
          Disable the datepicker
 void enable(org.apache.wicket.ajax.AjaxRequestTarget target)
          Enable the datepicker
 org.wicketstuff.jwicket.JQueryCssResourceReference[] getCssResources()
           
protected  String getJQueryObjectOfComponent(org.apache.wicket.Component component)
           
protected  org.wicketstuff.jwicket.JQueryAjaxBehavior.JsBuilder getJsBuilder()
           
protected  StringBuilder getJsShowDatesVariable()
           
protected  boolean hasToAddBeforeShowDayToOptions()
           
protected  void onBeforeShow(org.apache.wicket.ajax.AjaxRequestTarget target)
           
protected  org.wicketstuff.jwicket.JQueryAjaxBehavior.JsFunction onChangeMonthJsFunction()
           
protected  void onChangeMonthYear(org.apache.wicket.ajax.AjaxRequestTarget target, String year, String month, org.wicketstuff.jwicket.SpecialKeys specialKeys)
          If you have set setWantOnChangeMonthYearNotification(boolean) to true this method is called after another moth or year is displayed, regardless of picking a date.
protected  void onClose(org.apache.wicket.ajax.AjaxRequestTarget target, String pickedDate, org.wicketstuff.jwicket.SpecialKeys specialKeys)
          If you have set setWantOnCloseNotification(boolean) to true this method is called after the datepicker was closed, regardless of picking a date.
protected  void onSelect(org.apache.wicket.ajax.AjaxRequestTarget target, Date pickedDate, org.wicketstuff.jwicket.SpecialKeys specialKeys)
          If you have set setWantOnSelectNotification(boolean) to true this method is called after the user picked a date in the datepicker.
protected  void onSelect(org.apache.wicket.ajax.AjaxRequestTarget target, Date pickedDate, org.wicketstuff.jwicket.SpecialKeys specialKeys)
          If you have set setWantOnSelectNotification(boolean) to true this method is called after the user picked a date in the datepicker.
protected  void onSelect(org.apache.wicket.ajax.AjaxRequestTarget target, String pickedDate, org.wicketstuff.jwicket.SpecialKeys specialKeys)
          If you have set setWantOnSelectNotification(boolean) to true this method is called after the user picked a date in the datepicker.
 void refresh(org.apache.wicket.ajax.AjaxRequestTarget target)
           
 void renderHead(org.apache.wicket.Component component, org.apache.wicket.markup.head.IHeaderResponse response)
           
protected  void respond(org.apache.wicket.ajax.AjaxRequestTarget target)
          Handles the event processing during resizing.
 DatePicker setAutoSize(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
           
 DatePicker setAutoSize(boolean value)
          Sets the 'autoSize' property for this DatePicker.
 DatePicker setButtonImage(org.apache.wicket.ajax.AjaxRequestTarget target, org.apache.wicket.request.resource.ResourceReference value)
           
 DatePicker setButtonImage(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
           
 DatePicker setButtonImage(org.apache.wicket.request.resource.ResourceReference value)
          Sets a button image that is displayed near the TextField for the visual date representation.
 DatePicker setButtonImage(String value)
          Sets a button image that is displayed near the TextField for the visual date representation.
 DatePicker setButtonImageOnly(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
           
 DatePicker setButtonImageOnly(boolean value)
          Sets the 'buttonImageOnly' property for this DatePicker.
 DatePicker setButtonText(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
           
 DatePicker setButtonText(String value)
          Sets the 'buttonText' property for this DatePicker.
 DatePicker setChangeMonth(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
           
 DatePicker setChangeMonth(boolean value)
          Sets the 'changeMonth' property for this DatePicker.
 DatePicker setChangeYear(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
           
 DatePicker setChangeYear(boolean value)
          Sets the 'changeYear' property for this DatePicker.
 DatePicker setCloseText(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
           
 DatePicker setCloseText(String value)
          Sets the 'closeText' property for this DatePicker.
 DatePicker setConstraintInput(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
           
 DatePicker setConstraintInput(boolean value)
          Sets the 'constraintInput' property for this DatePicker.
 void setCssClass(String cssClass)
          If you want en individual style for a DatePicker you may set this style with this method.
 DatePicker setCurrentText(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
           
 DatePicker setCurrentText(String value)
          Sets the 'currentText' property for this DatePicker.
 DatePicker setDate(org.apache.wicket.ajax.AjaxRequestTarget target, Date date)
           
 DatePicker setDateFormat(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
           
 DatePicker setDateFormat(String value)
          Sets the 'dateFormat' property for this DatePicker.
 DatePicker setDefaultDate(Date date)
           
 DatePicker setDuration(org.apache.wicket.ajax.AjaxRequestTarget target, int value)
           
 DatePicker setDuration(org.apache.wicket.ajax.AjaxRequestTarget target, org.wicketstuff.jwicket.JQuerySpeed value)
           
 DatePicker setDuration(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
           
 DatePicker setDuration(int value)
           
 DatePicker setDuration(org.wicketstuff.jwicket.JQuerySpeed value)
          Sets the 'duration' property for this DatePicker.
 DatePicker setDuration(String value)
          Sets the 'duration' property for this DatePicker.
 DatePicker setMaxDate(org.apache.wicket.ajax.AjaxRequestTarget target, Date value)
           
 DatePicker setMaxDate(org.apache.wicket.ajax.AjaxRequestTarget target, Date value)
           
 DatePicker setMaxDate(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
           
 DatePicker setMaxDate(Date value)
          Sets the 'maxDate' property for this DatePicker.
 DatePicker setMaxDate(Date value)
           
 DatePicker setMaxDate(String value)
          Sets the 'maxDate' property for this DatePicker.
 DatePicker setMinDate(org.apache.wicket.ajax.AjaxRequestTarget target, Date value)
           
 DatePicker setMinDate(org.apache.wicket.ajax.AjaxRequestTarget target, Date value)
           
 DatePicker setMinDate(org.apache.wicket.ajax.AjaxRequestTarget target, String value)
           
 DatePicker setMinDate(Date value)
          Sets the 'minDate' property for this DatePicker.
 DatePicker setMinDate(Date value)
           
 DatePicker setMinDate(String value)
          Sets the 'minDate' property for this DatePicker.
 DatePicker setMonthNamesShort(String[] monthNamesShort)
          Sets the 'monthNamesShort' property for this DatePicker.
 DatePicker setNumberOfMonths(org.apache.wicket.ajax.AjaxRequestTarget target, int value)
           
 DatePicker setNumberOfMonths(org.apache.wicket.ajax.AjaxRequestTarget target, int rows, int columns)
           
 DatePicker setNumberOfMonths(int value)
          Sets the 'numberOfMonths' property for this DatePicker.
 DatePicker setNumberOfMonths(int rows, int columns)
          Sets the 'numberOfMonths' property for this DatePicker.
 DatePicker setSelectOtherMonths(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
           
 DatePicker setSelectOtherMonths(boolean value)
          Sets the 'selectOtherMonths' property for this DatePicker.
 DatePicker setShowAnim(org.apache.wicket.ajax.AjaxRequestTarget target, DatePicker.ShowAnim value)
           
 DatePicker setShowAnim(DatePicker.ShowAnim value)
          Sets the 'showAnim' property for this DatePicker.
 DatePicker setShowButtonPanel(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
           
 DatePicker setShowButtonPanel(boolean value)
          Sets the 'showButtonPanel' property for this DatePicker.
 DatePicker setShowCurrentAtPos(org.apache.wicket.ajax.AjaxRequestTarget target, int value)
           
 DatePicker setShowCurrentAtPos(int value)
          Sets the 'showCurrentAtPos' property for this DatePicker.
 void setShowDayStates(Collection<DatePicker.ShowDay> states)
          Set the special treatments for multiple days at one.
 DatePicker setShowMonthAfterYear(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
           
 DatePicker setShowMonthAfterYear(boolean value)
          Sets the 'showMonthAfterYear' property for this DatePicker.
 DatePicker setShowOn(org.apache.wicket.ajax.AjaxRequestTarget target, DatePicker.ShowOnTrigger value)
           
 DatePicker setShowOn(DatePicker.ShowOnTrigger value)
          Sets the 'showOn' property for this DatePicker.
 DatePicker setShowOtherMonths(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
           
 DatePicker setShowOtherMonths(boolean value)
          Sets the 'showOtherMonths' property for this DatePicker.
 DatePicker setShowWeek(org.apache.wicket.ajax.AjaxRequestTarget target, boolean value)
           
 DatePicker setShowWeek(boolean value)
          Sets the 'showWeek' property for this DatePicker.
 DatePicker setStepMonths(org.apache.wicket.ajax.AjaxRequestTarget target, int value)
           
 DatePicker setStepMonths(int value)
          Sets the 'stepMonths' property for this DatePicker.
 DatePicker setWantOnBeforeShowNotificationWanted(boolean value)
          If set to true, the callback-Method onBeforeShow(org.apache.wicket.ajax.AjaxRequestTarget) is called before the DatePicker gets displayed.
 DatePicker setWantOnChangeMonthYearNotification(boolean value)
          If set to true, the callback-Method onChangeMonthYear(AjaxRequestTarget, String, String, SpecialKeys) is called when a date was picked.
 DatePicker setWantOnCloseNotification(boolean value)
          If set to true, the callback-Method onClose(AjaxRequestTarget, String, SpecialKeys) is called when a date was picked.
 DatePicker setWantOnSelectNotification(boolean value)
          If set to true, the callback-Method onSelect(AjaxRequestTarget, String, SpecialKeys) is called when a date was picked.
 DatePicker setYearRange(String value)
          The range of years displayed in the year drop-down: either relative to today's year ("-nn:+nn"), relative to the currently selected year ("c-nn:c+nn"), absolute ("nnnn:nnnn"), or combinations of these formats ("nnnn:-nn").
protected  void updateAjaxAttributes(org.apache.wicket.ajax.attributes.AjaxRequestAttributes attributes)
           
 
Methods inherited from class org.wicketstuff.jwicket.JQueryDurableAjaxBehavior
isAlreadyRendered, setRestoreAfterRedraw, updateBehavior
 
Methods inherited from class org.wicketstuff.jwicket.JQueryAjaxBehavior
addCssResources, addUserProvidedResourceReferences, addUserProvidedResourceReferences, getUserProvidedResourceReferences, printParameters, printParameters, setRawOptions
 
Methods inherited from class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior
findIndicatorId, getAttributes, getCallbackFunction, getCallbackFunctionBody, getCallbackScript, getCallbackScript, getChannel, getFailureScript, getPreconditionScript, getSuccessScript, onBind, onRequest, postprocessConfiguration, renderAjaxAttributes, renderAjaxAttributes
 
Methods inherited from class org.apache.wicket.behavior.AbstractAjaxBehavior
afterRender, bind, getCallbackUrl, getComponent, onComponentRendered, onComponentTag, onComponentTag, onUnbind, unbind
 
Methods inherited from class org.apache.wicket.behavior.Behavior
beforeRender, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onConfigure, onEvent, onException, onRemove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

uiDatepickerJs

public static final org.wicketstuff.jwicket.JQueryResourceReference uiDatepickerJs

uiDatepickerJs_de

public static final org.wicketstuff.jwicket.JQueryResourceReference uiDatepickerJs_de

datePickerDefaultShowDayState

public static final org.wicketstuff.jwicket.JQueryResourceReference datePickerDefaultShowDayState

options

protected org.wicketstuff.jwicket.JsMap options
Constructor Detail

DatePicker

public DatePicker()

DatePicker

public DatePicker(org.apache.wicket.request.resource.ResourceReference icon)

DatePicker

public DatePicker(CharSequence icon)
Method Detail

respond

protected void respond(org.apache.wicket.ajax.AjaxRequestTarget target)
Handles the event processing during resizing.

Overrides:
respond in class org.wicketstuff.jwicket.JQueryAjaxBehavior

setButtonImageOnly

public DatePicker setButtonImageOnly(boolean value)
Sets the 'buttonImageOnly' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - true or false.
Returns:
this object

setButtonImageOnly

public DatePicker setButtonImageOnly(org.apache.wicket.ajax.AjaxRequestTarget target,
                                     boolean value)

setAutoSize

public DatePicker setAutoSize(boolean value)
Sets the 'autoSize' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - true or false.
Returns:
this object

setAutoSize

public DatePicker setAutoSize(org.apache.wicket.ajax.AjaxRequestTarget target,
                              boolean value)

setButtonText

public DatePicker setButtonText(String value)
Sets the 'buttonText' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - The new buttonText or null to remove this option.
Returns:
this object

setButtonText

public DatePicker setButtonText(org.apache.wicket.ajax.AjaxRequestTarget target,
                                String value)

setButtonImage

public DatePicker setButtonImage(String value)
Sets a button image that is displayed near the TextField for the visual date representation.


setButtonImage

public DatePicker setButtonImage(org.apache.wicket.ajax.AjaxRequestTarget target,
                                 String value)

setButtonImage

public DatePicker setButtonImage(org.apache.wicket.request.resource.ResourceReference value)
Sets a button image that is displayed near the TextField for the visual date representation.


setButtonImage

public DatePicker setButtonImage(org.apache.wicket.ajax.AjaxRequestTarget target,
                                 org.apache.wicket.request.resource.ResourceReference value)

setChangeMonth

public DatePicker setChangeMonth(boolean value)
Sets the 'changeMonth' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - true or false.
Returns:
this object

setChangeMonth

public DatePicker setChangeMonth(org.apache.wicket.ajax.AjaxRequestTarget target,
                                 boolean value)

setChangeYear

public DatePicker setChangeYear(boolean value)
Sets the 'changeYear' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - true or false.
Returns:
this object

setChangeYear

public DatePicker setChangeYear(org.apache.wicket.ajax.AjaxRequestTarget target,
                                boolean value)

setCloseText

public DatePicker setCloseText(String value)
Sets the 'closeText' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - true or false.
Returns:
this object

setCloseText

public DatePicker setCloseText(org.apache.wicket.ajax.AjaxRequestTarget target,
                               String value)

setConstraintInput

public DatePicker setConstraintInput(boolean value)
Sets the 'constraintInput' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - true or false.
Returns:
this object

setConstraintInput

public DatePicker setConstraintInput(org.apache.wicket.ajax.AjaxRequestTarget target,
                                     boolean value)

setCurrentText

public DatePicker setCurrentText(String value)
Sets the 'currentText' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - Text to be dsiplayes on button
Returns:
this object

setCurrentText

public DatePicker setCurrentText(org.apache.wicket.ajax.AjaxRequestTarget target,
                                 String value)

setDateFormat

public DatePicker setDateFormat(String value)
Sets the 'dateFormat' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - the date format
Returns:
this object

setDateFormat

public DatePicker setDateFormat(org.apache.wicket.ajax.AjaxRequestTarget target,
                                String value)

setDate

public DatePicker setDate(org.apache.wicket.ajax.AjaxRequestTarget target,
                          Date date)

setDefaultDate

public DatePicker setDefaultDate(Date date)

setDuration

public DatePicker setDuration(String value)
Sets the 'duration' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - duration in ms
Returns:
this object

setDuration

public DatePicker setDuration(org.apache.wicket.ajax.AjaxRequestTarget target,
                              String value)

setDuration

public DatePicker setDuration(int value)

setDuration

public DatePicker setDuration(org.apache.wicket.ajax.AjaxRequestTarget target,
                              int value)

setDuration

public DatePicker setDuration(org.wicketstuff.jwicket.JQuerySpeed value)
Sets the 'duration' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - duration
Returns:
this object

setDuration

public DatePicker setDuration(org.apache.wicket.ajax.AjaxRequestTarget target,
                              org.wicketstuff.jwicket.JQuerySpeed value)

setYearRange

public DatePicker setYearRange(String value)
The range of years displayed in the year drop-down: either relative to today's year ("-nn:+nn"), relative to the currently selected year ("c-nn:c+nn"), absolute ("nnnn:nnnn"), or combinations of these formats ("nnnn:-nn"). Note that this option only affects what appears in the drop-down, to restrict which dates may be selected use the minDate and/or maxDate options.


setMaxDate

public DatePicker setMaxDate(String value)
Sets the 'maxDate' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - max date as String
Returns:
this object

setMaxDate

public DatePicker setMaxDate(org.apache.wicket.ajax.AjaxRequestTarget target,
                             String value)

setMaxDate

public DatePicker setMaxDate(Date value)
Sets the 'maxDate' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - max date as String
Returns:
this object

setMaxDate

public DatePicker setMaxDate(org.apache.wicket.ajax.AjaxRequestTarget target,
                             Date value)

setMaxDate

public DatePicker setMaxDate(Date value)

setMaxDate

public DatePicker setMaxDate(org.apache.wicket.ajax.AjaxRequestTarget target,
                             Date value)

setMinDate

public DatePicker setMinDate(String value)
Sets the 'minDate' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - min date as String
Returns:
this object

setMinDate

public DatePicker setMinDate(org.apache.wicket.ajax.AjaxRequestTarget target,
                             String value)

setMinDate

public DatePicker setMinDate(Date value)
Sets the 'minDate' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - min date as String
Returns:
this object

setMinDate

public DatePicker setMinDate(org.apache.wicket.ajax.AjaxRequestTarget target,
                             Date value)

setMinDate

public DatePicker setMinDate(Date value)

setMinDate

public DatePicker setMinDate(org.apache.wicket.ajax.AjaxRequestTarget target,
                             Date value)

setNumberOfMonths

public DatePicker setNumberOfMonths(int value)
Sets the 'numberOfMonths' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - the number of months to show at one
Returns:
this object

setNumberOfMonths

public DatePicker setNumberOfMonths(org.apache.wicket.ajax.AjaxRequestTarget target,
                                    int value)

setNumberOfMonths

public DatePicker setNumberOfMonths(int rows,
                                    int columns)
Sets the 'numberOfMonths' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.


setNumberOfMonths

public DatePicker setNumberOfMonths(org.apache.wicket.ajax.AjaxRequestTarget target,
                                    int rows,
                                    int columns)

setSelectOtherMonths

public DatePicker setSelectOtherMonths(boolean value)
Sets the 'selectOtherMonths' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - true or false.
Returns:
this object

setSelectOtherMonths

public DatePicker setSelectOtherMonths(org.apache.wicket.ajax.AjaxRequestTarget target,
                                       boolean value)

setShowAnim

public DatePicker setShowAnim(DatePicker.ShowAnim value)
Sets the 'showAnim' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - true or false.
Returns:
this object

setShowAnim

public DatePicker setShowAnim(org.apache.wicket.ajax.AjaxRequestTarget target,
                              DatePicker.ShowAnim value)

setShowButtonPanel

public DatePicker setShowButtonPanel(boolean value)
Sets the 'showButtonPanel' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - true or false.
Returns:
this object

setShowButtonPanel

public DatePicker setShowButtonPanel(org.apache.wicket.ajax.AjaxRequestTarget target,
                                     boolean value)

setShowCurrentAtPos

public DatePicker setShowCurrentAtPos(int value)
Sets the 'showCurrentAtPos' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - true or false.
Returns:
this object

setShowCurrentAtPos

public DatePicker setShowCurrentAtPos(org.apache.wicket.ajax.AjaxRequestTarget target,
                                      int value)

setShowMonthAfterYear

public DatePicker setShowMonthAfterYear(boolean value)
Sets the 'showMonthAfterYear' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - true or false.
Returns:
this object

setShowMonthAfterYear

public DatePicker setShowMonthAfterYear(org.apache.wicket.ajax.AjaxRequestTarget target,
                                        boolean value)

getJQueryObjectOfComponent

protected String getJQueryObjectOfComponent(org.apache.wicket.Component component)

setShowOn

public DatePicker setShowOn(DatePicker.ShowOnTrigger value)
Sets the 'showOn' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - true or false.
Returns:
this object

setShowOn

public DatePicker setShowOn(org.apache.wicket.ajax.AjaxRequestTarget target,
                            DatePicker.ShowOnTrigger value)

setShowOtherMonths

public DatePicker setShowOtherMonths(boolean value)
Sets the 'showOtherMonths' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - true or false.
Returns:
this object

setShowOtherMonths

public DatePicker setShowOtherMonths(org.apache.wicket.ajax.AjaxRequestTarget target,
                                     boolean value)

setShowWeek

public DatePicker setShowWeek(boolean value)
Sets the 'showWeek' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - true or false.
Returns:
this object

setShowWeek

public DatePicker setShowWeek(org.apache.wicket.ajax.AjaxRequestTarget target,
                              boolean value)

setStepMonths

public DatePicker setStepMonths(int value)
Sets the 'stepMonths' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
value - how many months to move in one step
Returns:
this object

setStepMonths

public DatePicker setStepMonths(org.apache.wicket.ajax.AjaxRequestTarget target,
                                int value)

setMonthNamesShort

public DatePicker setMonthNamesShort(String[] monthNamesShort)
Sets the 'monthNamesShort' property for this DatePicker. Please consult the jQuery documentation for a detailed description of this property.

Parameters:
monthNamesShort - The list of abbreviated month names, as used in the month header on each datepicker and as requested via the dateFormat option. Ex. new String[]{ "Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"}
Returns:
this object

setCssClass

public void setCssClass(String cssClass)
If you want en individual style for a DatePicker you may set this style with this method. The DatePicker the gets sourrounded with a <div class="...">. Normally a DatePicker element looks like
 <div id="ui-datepicker-div" class="ui-datepicker ui-widget ui-widget-content ....>...</div>
 
If you set a cssClass the DatePicket looks like
 <div class="cssClass"><div id="ui-datepicker-div" class="ui-datepicker ui-widget ui-widget-content ....>...</div></div>
 

Parameters:
cssClass - your custom css class

setWantOnSelectNotification

public DatePicker setWantOnSelectNotification(boolean value)
If set to true, the callback-Method onSelect(AjaxRequestTarget, String, SpecialKeys) is called when a date was picked. See the jquery-ui documentation for more information

Parameters:
value - true or false.
Returns:
this object

setWantOnCloseNotification

public DatePicker setWantOnCloseNotification(boolean value)
If set to true, the callback-Method onClose(AjaxRequestTarget, String, SpecialKeys) is called when a date was picked. See the jquery-ui documentation for more information

Parameters:
value - true or false.
Returns:
this object

setWantOnChangeMonthYearNotification

public DatePicker setWantOnChangeMonthYearNotification(boolean value)
If set to true, the callback-Method onChangeMonthYear(AjaxRequestTarget, String, String, SpecialKeys) is called when a date was picked. See the jquery-ui documentation for more information

Parameters:
value - true or false.
Returns:
this object

setWantOnBeforeShowNotificationWanted

public DatePicker setWantOnBeforeShowNotificationWanted(boolean value)
If set to true, the callback-Method onBeforeShow(org.apache.wicket.ajax.AjaxRequestTarget) is called before the DatePicker gets displayed.

See the jquery-ui documentation for detailed information

Returns:
this object

updateAjaxAttributes

protected void updateAjaxAttributes(org.apache.wicket.ajax.attributes.AjaxRequestAttributes attributes)
Overrides:
updateAjaxAttributes in class org.apache.wicket.ajax.AbstractDefaultAjaxBehavior

getJsBuilder

protected org.wicketstuff.jwicket.JQueryAjaxBehavior.JsBuilder getJsBuilder()
Specified by:
getJsBuilder in class org.wicketstuff.jwicket.JQueryDurableAjaxBehavior

onChangeMonthJsFunction

protected org.wicketstuff.jwicket.JQueryAjaxBehavior.JsFunction onChangeMonthJsFunction()

configureOnSelectGetOrPost

protected String configureOnSelectGetOrPost()

hasToAddBeforeShowDayToOptions

protected boolean hasToAddBeforeShowDayToOptions()

onBeforeShow

protected void onBeforeShow(org.apache.wicket.ajax.AjaxRequestTarget target)

onSelect

protected void onSelect(org.apache.wicket.ajax.AjaxRequestTarget target,
                        String pickedDate,
                        org.wicketstuff.jwicket.SpecialKeys specialKeys)
If you have set setWantOnSelectNotification(boolean) to true this method is called after the user picked a date in the datepicker.

Parameters:
target - the AjaxRequestTarget of the resize operation.
pickedDate - The selected date as String
specialKeys - the special keys that were pressed when the event occurs

onSelect

protected void onSelect(org.apache.wicket.ajax.AjaxRequestTarget target,
                        Date pickedDate,
                        org.wicketstuff.jwicket.SpecialKeys specialKeys)
If you have set setWantOnSelectNotification(boolean) to true this method is called after the user picked a date in the datepicker. This method is called after {@link #onSelect(AjaxRequestTarget, String, SpecialKeys) was called only if the picked date can be parsed into a Java Date object.

Parameters:
target - the AjaxRequestTarget of the resize operation.
pickedDate - The selected date as Date
specialKeys - the special keys that were pressed when the event occurs

onSelect

protected void onSelect(org.apache.wicket.ajax.AjaxRequestTarget target,
                        Date pickedDate,
                        org.wicketstuff.jwicket.SpecialKeys specialKeys)
If you have set setWantOnSelectNotification(boolean) to true this method is called after the user picked a date in the datepicker. This method is called after {@link #onSelect(AjaxRequestTarget, String, SpecialKeys) was called only if the picked date can be parsed into a Java Date object.

Parameters:
target - the AjaxRequestTarget of the resize operation.
pickedDate - The selected date as Date
specialKeys - the special keys that were pressed when the event occurs

onClose

protected void onClose(org.apache.wicket.ajax.AjaxRequestTarget target,
                       String pickedDate,
                       org.wicketstuff.jwicket.SpecialKeys specialKeys)
If you have set setWantOnCloseNotification(boolean) to true this method is called after the datepicker was closed, regardless of picking a date.

Parameters:
target - the AjaxRequestTarget of the resize operation.
specialKeys - the special keys that were pressed when the event occurs

onChangeMonthYear

protected void onChangeMonthYear(org.apache.wicket.ajax.AjaxRequestTarget target,
                                 String year,
                                 String month,
                                 org.wicketstuff.jwicket.SpecialKeys specialKeys)
If you have set setWantOnChangeMonthYearNotification(boolean) to true this method is called after another moth or year is displayed, regardless of picking a date.

Parameters:
target - the AjaxRequestTarget of the resize operation.
specialKeys - the special keys that were pressed when the event occurs

addShowDayState

public void addShowDayState(DatePicker.ShowDay state)
Add one more special treatment for a day. If you don't provide a DatePicker.ShowDay object for a day it is selectable by default. Use this method if you want a special treatment (selectable, CSS class oder tooltip text) for a day. You may call this method as often as you like. The state is added to the existing list of states. Do not provide different states for one day. The resulting behavior is not defined.

Parameters:
state - as specific treatment for one day.

setShowDayStates

public void setShowDayStates(Collection<DatePicker.ShowDay> states)
Set the special treatments for multiple days at one. This removes all former definitons and replaces them with the new states.

Parameters:
states - A Collection of states.

renderHead

public void renderHead(org.apache.wicket.Component component,
                       org.apache.wicket.markup.head.IHeaderResponse response)
Specified by:
renderHead in interface org.apache.wicket.markup.html.IComponentAwareHeaderContributor
Overrides:
renderHead in class org.wicketstuff.jwicket.JQueryDurableAjaxBehavior

getJsShowDatesVariable

protected StringBuilder getJsShowDatesVariable()

disable

public void disable(org.apache.wicket.ajax.AjaxRequestTarget target)
Disable the datepicker

Parameters:
target - An AjaxRequestTarget

refresh

public void refresh(org.apache.wicket.ajax.AjaxRequestTarget target)

enable

public void enable(org.apache.wicket.ajax.AjaxRequestTarget target)
Enable the datepicker

Parameters:
target - An AjaxRequestTarget

getCssResources

public org.wicketstuff.jwicket.JQueryCssResourceReference[] getCssResources()
Specified by:
getCssResources in interface org.wicketstuff.jwicket.IStyleResolver


Copyright © 2016. All rights reserved.