Class DefaultSettings
- java.lang.Object
-
- com.jalios.jcms.taglib.settings.BasicSettings<T>
-
- com.jalios.jcms.taglib.settings.SelectorSettings<DefaultSettings>
-
- com.jalios.jcms.taglib.settings.impl.DefaultSettings
-
- All Implemented Interfaces:
ControlSettings<DefaultSettings>
,java.lang.Cloneable
public class DefaultSettings extends SelectorSettings<DefaultSettings>
Default Settings.This class can be used with generated type. It can be useful when we want to keep the field configuration but add or override a specific option without change the Settings type.
Example:
Suppose we have the following generated type:<?xml version="1.0" encoding="UTF-8"?> <type name="TestType" ... > <title ml="true" searchable="true" /> <fields> <field name="textfield" editor="textfield" required="true" compactDisplay="false" type="String" searchable="true" size="80" ml="false" descriptionType="tooltip" abstract="true" truncate="400" html="false" checkHtml="true" /> </fields> </type>
We want to display the field "textfield" with a placeholder when we edit the type in BO. To do this, we update the JSP "/types/TestType/doEditTestType.jsp".
We replace:<jalios:field name="textfield" formHandler="<%= formHandler %>"> <jalios:control /> </jalios:field>
By<jalios:field name="textfield" formHandler="<%= formHandler %>"> <jalios:control settings='<%= new DefaultSettings().placeholder("Please enter your text...") %>' /> </jalios:field>
The text field will be displayed in the same way but a placeholder will be added in addition.- Author:
- ndossantos
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.jalios.jcms.taglib.settings.SelectorSettings
SelectorSettings.SelectMode, SelectorSettings.SelectorType
-
-
Field Summary
-
Fields inherited from class com.jalios.jcms.taglib.settings.SelectorSettings
ENABLE_SEARCH, ENUM_DATA_ATTRIBUTES, ENUM_LABEL_APPENDS, ENUM_LABEL_PREPENDS, ENUM_LABELS, ENUM_VALUES, INLINE, MULTIPLE, REQUIRED, SELECT_ITEM_EMPTY_VALUE, SELECT_ITEM_EMPTY_VALUE_LABEL, SELECTOR_TYPE
-
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, TITLE, TRIGGER_ACTION, TRIGGER_EVENT, VALUE
-
-
Constructor Summary
Constructors Constructor Description DefaultSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DefaultSettings
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.-
Methods inherited from class com.jalios.jcms.taglib.settings.SelectorSettings
checkbox, chooser, disableInline, emptyValueLabel, enumDataAttribute, enumLabelAppends, enumLabelAppends, enumLabelAppends, enumLabelPreprends, enumLabelPreprends, enumLabelPreprends, enumLabels, enumLabels, enumLabels, enumValues, enumValues, enumValues, inline, multiple, radio, required, resolveOptions, select, select, selectorType, single
-
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, onChange, onFocusOut, placeholder, prepend, readonly, removeOption, require, showLanguageChooser, sortSet, title, toStringArray, toStringArray, toStringArray, toStringArray, toStringArray, trigger, value
-
-
-
-
Method Detail
-
getType
public ControlType getType()
Description copied from interface:ControlSettings
Returns theControlType
related to the currentControlSettings
implementation.- Returns:
ControlType
-
getThis
protected DefaultSettings 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<DefaultSettings>
- Returns:
- The exact type of the this reference
-
-