Class DateSettings
- java.lang.Object
-
- com.jalios.jcms.taglib.settings.BasicSettings<T>
-
- com.jalios.jcms.taglib.settings.AbstractTextSettings<DateSettings>
-
- com.jalios.jcms.taglib.settings.impl.DateSettings
-
- All Implemented Interfaces:
ControlSettings<DateSettings>
,java.lang.Cloneable
public class DateSettings extends AbstractTextSettings<DateSettings>
Date Settings- Author:
- Nicolas Dos Santos
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DISPLAY_TIME
-
Fields inherited from class com.jalios.jcms.taglib.settings.BasicSettings
APPEND, ARIA_ATTR_PREFIX, ARIA_ATTRIBUTES, AUTOFOCUS, CLEAR_BUTTON, CSS, DATA_ATTR_PREFIX, DATA_ATTRIBUTES, DISABLED, HIDE_CLEAR_BUTTON, HTML_ATTRIBUTES, ID, LANGUAGE_CHOOSER, MAX_LENGTH, NAME, PLACEHOLDER, PREPEND, READONLY, REQUIRED, TITLE, TRIGGER_ACTION, TRIGGER_EVENT, VALUE
-
-
Constructor Summary
Constructors Constructor Description DateSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DateSettings
displayDateOnly()
Specify whether the control displays only the date (not the time) and allows only the date (not the time) to be selected in the datepicker.DateSettings
displayTime()
Specify whether the control display the time and allows the time to be selected in the datepicker.protected DateSettings
getThis()
Returns the exact type of the this reference.
It's a way to recover the type of thethis
object in a class hierarchy (cf.ControlType
getType()
Returns theControlType
related to the currentControlSettings
implementation.DateSettings
onChange(java.lang.String action)
Bind the "change" event to the given databroker action.
Example:void
resolveOptions(TypeFieldEntry tfe)
Set options from the specifiedTypeFieldEntry
.-
Methods inherited from class com.jalios.jcms.taglib.settings.BasicSettings
addOption, append, aria, aria, autofocus, clearOption, clone, css, dataAttribute, dataAttributes, disable, getOption, getOptionNames, htmlAttributes, htmlAttributes, id, isChannelReady, maxLength, merge, name, onFocusOut, placeholder, prepend, readonly, removeOption, require, showLanguageChooser, sortSet, title, toStringArray, toStringArray, toStringArray, toStringArray, toStringArray, trigger, value
-
-
-
-
Field Detail
-
DISPLAY_TIME
public static final java.lang.String DISPLAY_TIME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
public ControlType getType()
Description copied from interface:ControlSettings
Returns theControlType
related to the currentControlSettings
implementation.- Returns:
ControlType
-
getThis
protected DateSettings getThis()
Description copied from class:BasicSettings
Returns the exact type of the this reference.
It's a way to recover the type of thethis
object in a class hierarchy (cf. getThis "trick").- Specified by:
getThis
in classBasicSettings<DateSettings>
- Returns:
- The exact type of the this reference
-
resolveOptions
public void resolveOptions(TypeFieldEntry tfe)
Description copied from interface:ControlSettings
Set options from the specifiedTypeFieldEntry
.- Specified by:
resolveOptions
in interfaceControlSettings<DateSettings>
- Overrides:
resolveOptions
in classBasicSettings<DateSettings>
- Parameters:
tfe
-TypeFieldEntry
-
onChange
public DateSettings onChange(java.lang.String action)
Description copied from class:BasicSettings
Bind the "change" event to the given databroker action.
Example:<jalios:field name="mytextfield" label="My Textfield" description="<span class='label label-info'>Reversed string: <em class='reverse-string'></em></span>"> <jalios:control settings='<%= new TextFieldSettings().onChange("reverse") %>' /> </jalios:field> <jalios:javascript> !function ($) { // Action regexp var pattern = /reverse/i; var callback = function(event) { var broker = $.jalios.Event.match(event, 'broker', pattern, true); if (!broker){ return; } // Element var elm = broker.source.currentTarget; broker.options._broked = true; var reverseString = $(elm).val().split('').reverse().join(''); $(elm).closest('.widget-content').find('.help-block .reverse-string').html(reverseString); } var register = function() { // Register to broker $(document).on("jalios:broker", callback); } // Initialization on DOM ready $(document).ready(function($) { register(); }); }(window.jQuery); </jalios:javascript>
- Overrides:
onChange
in classAbstractTextSettings<DateSettings>
- Parameters:
action
- databroker action- Returns:
- a reference to this object - used to chain calls
-
displayTime
public DateSettings displayTime()
Specify whether the control display the time and allows the time to be selected in the datepicker.- Returns:
- a reference to this object - used to chain calls
-
displayDateOnly
public DateSettings displayDateOnly()
Specify whether the control displays only the date (not the time) and allows only the date (not the time) to be selected in the datepicker.- Returns:
-
-