Class DatePickerBehavior

java.lang.Object
org.apache.wicket.behavior.Behavior
com.googlecode.wicket.jquery.core.JQueryAbstractBehavior
com.googlecode.wicket.jquery.core.JQueryBehavior
com.googlecode.wicket.jquery.ui.JQueryUIBehavior
com.googlecode.wicket.jquery.ui.form.datepicker.DatePickerBehavior
All Implemented Interfaces:
com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware, JQueryDestroyListener.IDestroyable, Serializable, org.apache.wicket.IComponentAwareEventSink, org.apache.wicket.markup.html.IComponentAwareHeaderContributor, org.apache.wicket.util.io.IClusterable

public abstract class DatePickerBehavior extends JQueryUIBehavior implements com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware
Provides a jQuery datepicker behavior
Author:
Sebastien Briquet - sebfz1
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static class 
    Provides a JQueryAjaxPostBehavior that aims to be wired to the 'onSelect' event
    protected static class 
    Provides an event object that will be broadcasted by the DatePickerBehavior.OnSelectAjaxBehavior callback
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class com.googlecode.wicket.jquery.core.JQueryBehavior

    method, options, selector
  • Constructor Summary

    Constructors
    Constructor
    Description
    DatePickerBehavior(String selector, com.googlecode.wicket.jquery.core.Options options, IDatePickerListener listener)
    Constructor
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    bind(org.apache.wicket.Component component)
     
    void
    destroy(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
    Removes the widget functionality completely.
    protected abstract com.googlecode.wicket.jquery.core.ajax.JQueryAjaxPostBehavior
    newOnSelectAjaxBehavior(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source)
    Gets a new JQueryAjaxPostBehavior that will be wired to the 'onSelect' event
    void
    onAjax(org.apache.wicket.ajax.AjaxRequestTarget target, com.googlecode.wicket.jquery.core.JQueryEvent event)
     
    void
    onConfigure(org.apache.wicket.Component component)
     

    Methods inherited from class com.googlecode.wicket.jquery.ui.JQueryUIBehavior

    onDestroy, widget, widget, widget, widget

    Methods inherited from class com.googlecode.wicket.jquery.core.JQueryBehavior

    $, $, $, $, beforeRender, detach, getMethod, getOption, getOptions, getSelector, off, on, on, register, remove, renderHead, setOption, setOption, setOption, setOptions, setSelector

    Methods inherited from class com.googlecode.wicket.jquery.core.JQueryAbstractBehavior

    add, getJQueryLibrarySettings, renderOnDomReadyScript, renderPriorityHeaderItem, toString

    Methods inherited from class org.apache.wicket.behavior.Behavior

    afterRender, canCallListener, detach, getStatelessHint, isEnabled, isTemporary, onAttribute, onComponentTag, onEvent, onException, onRemove, onTag, unbind

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • DatePickerBehavior

      public DatePickerBehavior(String selector, IDatePickerListener listener)
      Constructor
      Parameters:
      selector - the html selector (ie: "#myId")
      listener - the IDatePickerListener
    • DatePickerBehavior

      public DatePickerBehavior(String selector, com.googlecode.wicket.jquery.core.Options options, IDatePickerListener listener)
      Constructor
      Parameters:
      selector - the html selector (ie: "#myId")
      options - the Options
      listener - the IDatePickerListener
  • Method Details

    • bind

      public void bind(org.apache.wicket.Component component)
      Overrides:
      bind in class org.apache.wicket.behavior.Behavior
    • destroy

      public void destroy(org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
      Description copied from interface: JQueryDestroyListener.IDestroyable
      Removes the widget functionality completely. This will return the element back to its pre-init state.
      This method is automatically called on ajax request. In case of web socket requests, this may be called manually.
      Specified by:
      destroy in interface JQueryDestroyListener.IDestroyable
      Overrides:
      destroy in class JQueryUIBehavior
      Parameters:
      handler - the IPartialPageRequestHandler
    • onConfigure

      public void onConfigure(org.apache.wicket.Component component)
      Overrides:
      onConfigure in class JQueryUIBehavior
    • onAjax

      public void onAjax(org.apache.wicket.ajax.AjaxRequestTarget target, com.googlecode.wicket.jquery.core.JQueryEvent event)
      Specified by:
      onAjax in interface com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware
    • newOnSelectAjaxBehavior

      protected abstract com.googlecode.wicket.jquery.core.ajax.JQueryAjaxPostBehavior newOnSelectAjaxBehavior(com.googlecode.wicket.jquery.core.ajax.IJQueryAjaxAware source)
      Gets a new JQueryAjaxPostBehavior that will be wired to the 'onSelect' event
      Parameters:
      source - the IJQueryAjaxAware
      Returns:
      a new OnSelectAjaxBehavior by default