Package com.jalios.jcms.taglib.settings
Class AbstractAreaSettings<T extends AbstractAreaSettings<T>>
- java.lang.Object
-
- com.jalios.jcms.taglib.settings.BasicSettings<T>
-
- com.jalios.jcms.taglib.settings.AbstractAreaSettings<T>
-
- Type Parameters:
T
- Type ofAbstractAreaSettings
- All Implemented Interfaces:
ControlSettings<T>
,java.lang.Cloneable
- Direct Known Subclasses:
RichTextAreaSettings
,TextAreaSettings
,WikiAreaSettings
,WysiwygSettings
public abstract class AbstractAreaSettings<T extends AbstractAreaSettings<T>> extends BasicSettings<T>
Abstract class to be implemented by eachControlSettings
that supports a text field on several rows.- Author:
- ndossantos
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ROWS
-
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 AbstractAreaSettings()
-
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:void
resolveOptions(TypeFieldEntry tfe)
Set options from the specifiedTypeFieldEntry
.T
rows(int rows)
Set the height of the control, in lines.-
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, 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
-
-
-
-
Field Detail
-
ROWS
public static final java.lang.String ROWS
- See Also:
- Constant Field Values
-
-
Method Detail
-
resolveOptions
public void resolveOptions(TypeFieldEntry tfe)
Description copied from interface:ControlSettings
Set options from the specifiedTypeFieldEntry
.- Specified by:
resolveOptions
in interfaceControlSettings<T extends AbstractAreaSettings<T>>
- Overrides:
resolveOptions
in classBasicSettings<T extends AbstractAreaSettings<T>>
- Parameters:
tfe
-TypeFieldEntry
-
rows
public T rows(int rows)
Set the height of the control, in lines.- Parameters:
rows
- number of lines- Returns:
- a reference to this object - used to chain calls
-
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 AbstractAreaSettings<T>>
- Parameters:
action
- databroker action- Returns:
- a reference to this object - used to chain calls
-
-