public class DateSettings extends AbstractTextSettings<DateSettings>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DISPLAY_TIME |
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, TRIGGER_ACTION, TRIGGER_EVENT, VALUE
Constructor and Description |
---|
DateSettings() |
Modifier and Type | Method and 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 the this object in a class hierarchy (cf. |
ControlType |
getType()
Returns the
ControlType related to the current ControlSettings 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 specified
TypeFieldEntry . |
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, toStringArray, toStringArray, toStringArray, toStringArray, toStringArray, trigger, value
public static final java.lang.String DISPLAY_TIME
public ControlType getType()
ControlSettings
ControlType
related to the current ControlSettings
implementation.ControlType
protected DateSettings getThis()
BasicSettings
this
object in a class hierarchy (cf. getThis "trick").getThis
in class BasicSettings<DateSettings>
public void resolveOptions(TypeFieldEntry tfe)
ControlSettings
TypeFieldEntry
.resolveOptions
in interface ControlSettings<DateSettings>
resolveOptions
in class BasicSettings<DateSettings>
tfe
- TypeFieldEntry
public DateSettings onChange(java.lang.String action)
BasicSettings
<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>
onChange
in class AbstractTextSettings<DateSettings>
action
- databroker actionpublic DateSettings displayTime()
public DateSettings displayDateOnly()
Copyright © 2001-2022 Jalios SA. All Rights Reserved.