Package com.jalios.jcms.taglib.settings
Class AbstractTextSettings<T extends AbstractTextSettings<T>>
- java.lang.Object
-
- com.jalios.jcms.taglib.settings.BasicSettings<T>
-
- com.jalios.jcms.taglib.settings.AbstractTextSettings<T>
-
- Type Parameters:
T
- Type of AbstractTextSettings
- All Implemented Interfaces:
ControlSettings<T>
,java.lang.Cloneable
- Direct Known Subclasses:
AbstractTextChooserSettings
,ColorSettings
,DateSettings
,EmailSettings
,IconSettings
,NumberSettings
,SearchSettings
,TextFieldSettings
,UrlSettings
public abstract class AbstractTextSettings<T extends AbstractTextSettings<T>> extends BasicSettings<T>
Abstract class to be implemented by eachControlSettings
that supports text field.- Author:
- ndossantos
-
-
Field Summary
-
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 AbstractTextSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
onChange(java.lang.String action)
Bind the "change" event to the given databroker action.
Example:-
Methods inherited from class com.jalios.jcms.taglib.settings.BasicSettings
addOption, append, aria, aria, autofocus, clearOption, clone, css, dataAttribute, dataAttributes, disable, getOption, getOptionNames, getThis, htmlAttributes, htmlAttributes, id, isChannelReady, maxLength, merge, name, onFocusOut, placeholder, prepend, readonly, removeOption, require, resolveOptions, showLanguageChooser, sortSet, title, toStringArray, toStringArray, toStringArray, toStringArray, toStringArray, trigger, value
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.jalios.jcms.taglib.settings.ControlSettings
getType
-
-
-
-
Method Detail
-
onChange
public T 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 classBasicSettings<T extends AbstractTextSettings<T>>
- Parameters:
action
- databroker action- Returns:
- a reference to this object - used to chain calls
-
-