public class SelectFormElementConfiguration extends TreeMap<String,Object>
SelectFormElement, in which case it will be converted to a
bootstrap-select if the BootstrapUiFormElementsWebResources are registered.
See bootstrap-select Options for the different properties that this class exposes.SelectFormElement,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
SelectFormElementConfiguration.LiveSearchStyle |
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
SelectFormElementConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
static SelectFormElementConfiguration |
liveSearch()
Creates a default bootstrap-select configuration with live search enabled.
|
SelectFormElementConfiguration |
localize(@NonNull Locale locale,
com.foreach.across.modules.web.support.LocalizedTextResolver localizedTextResolver)
Create a localized copy of the current configuration.
|
SelectFormElementConfiguration |
setActionsBox(boolean actionsBox)
When set to true, adds two buttons to the top of the dropdown menu (Select All & Deselect All).
|
SelectFormElementConfiguration |
setCountSelectedText(String countSelectedText)
Sets the format for the text displayed when selectedTextFormat is count or count > #.
|
SelectFormElementConfiguration |
setDeselectAllText(String deselectAllText)
The text on the button that deselects all options when actionsBox is enabled.
|
SelectFormElementConfiguration |
setDropupAuto(boolean dropupAuto)
Checks to see which has more room, above or below.
|
SelectFormElementConfiguration |
setHeader(String header)
Adds a header to the top of the menu; includes a close button by default.
|
SelectFormElementConfiguration |
setHideDisabled(boolean hideDisabled)
Removes disabled options and optgroups from the menu.
|
SelectFormElementConfiguration |
setIconBase(String iconBase)
Set the base to use a different icon font instead of Glyphicons.
|
SelectFormElementConfiguration |
setLiveSearch(boolean liveSearch)
When set to true, adds a search box to the top of the selectpicker dropdown.
|
SelectFormElementConfiguration |
setLiveSearchNormalize(boolean liveSearchNormalize)
Setting liveSearchNormalize to true allows for accent-insensitive searching.
|
SelectFormElementConfiguration |
setLiveSearchStyle(SelectFormElementConfiguration.LiveSearchStyle liveSearchStyle)
When set to 'contains', searching will reveal options that contain the searched text.
|
SelectFormElementConfiguration |
setMaxOptions(int maxOptions)
When set to an integer and in a multi-select, the number of selected options cannot exceed the given value.
|
SelectFormElementConfiguration |
setMaxOptionsText(String maxOptionsText)
The text that is displayed when maxOptions is enabled and the maximum number of options for the given scenario have been selected.
|
SelectFormElementConfiguration |
setMobile(boolean mobile)
When set to true, enables the device's native menu for select menus.
|
SelectFormElementConfiguration |
setMultipleSeparator(String separator)
Set the character displayed in the button that separates selected options.
|
SelectFormElementConfiguration |
setNoneSelectedText(String noneSelectedText)
The text that is displayed when a multiple select has no selected options.
|
SelectFormElementConfiguration |
setSelectAllText(String selectAllText)
The text on the button that selects all options when actionsBox is enabled.
|
SelectFormElementConfiguration |
setSelectedTextFormat(String selectedTextFormat)
Specifies how the selection is displayed with a multiple select.
|
SelectFormElementConfiguration |
setSelectOnTab(boolean selectOnTab)
When set to true, treats the tab character like the enter or space characters within the selectpicker dropdown.
|
SelectFormElementConfiguration |
setShowContent(boolean showContent)
When set to true, display custom HTML associated with selected option(s) in the button.
|
SelectFormElementConfiguration |
setShowIcon(boolean showIcon)
When set to true, display icon(s) associated with selected option(s) in the button.
|
SelectFormElementConfiguration |
setShowSubText(boolean showSubText)
When set to true, display subtext associated with a selected option in the button.
|
SelectFormElementConfiguration |
setShowTick(boolean showTick)
Show checkmark on selected option (for items without multiple attribute).
|
SelectFormElementConfiguration |
setSize(int size)
Set the items to show in the drop-down:
0: corresponds with 'auto'
x: number of items to show
-1: corresponds with
false
|
SelectFormElementConfiguration |
setStyle(String style)
When set to a string, add the value to the button's style.
|
SelectFormElementConfiguration |
setTickIcon(String tickIcon)
Set which icon to use to display as the "tick" next to selected options.
|
static SelectFormElementConfiguration |
simple()
Create a new simple bootstrap-select configuration.
|
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, valuesequals, hashCode, isEmpty, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, removepublic SelectFormElementConfiguration setActionsBox(boolean actionsBox)
public SelectFormElementConfiguration setDropupAuto(boolean dropupAuto)
public SelectFormElementConfiguration setHeader(String header)
public SelectFormElementConfiguration setHideDisabled(boolean hideDisabled)
public SelectFormElementConfiguration setIconBase(String iconBase)
public SelectFormElementConfiguration setLiveSearch(boolean liveSearch)
public SelectFormElementConfiguration setLiveSearchNormalize(boolean liveSearchNormalize)
public SelectFormElementConfiguration setLiveSearchStyle(SelectFormElementConfiguration.LiveSearchStyle liveSearchStyle)
public SelectFormElementConfiguration setMaxOptions(int maxOptions)
public SelectFormElementConfiguration setMaxOptionsText(String maxOptionsText)
public SelectFormElementConfiguration setMobile(boolean mobile)
public SelectFormElementConfiguration setMultipleSeparator(String separator)
public SelectFormElementConfiguration setSelectedTextFormat(String selectedTextFormat)
public SelectFormElementConfiguration setSelectOnTab(boolean selectOnTab)
public SelectFormElementConfiguration setShowContent(boolean showContent)
public SelectFormElementConfiguration setShowIcon(boolean showIcon)
public SelectFormElementConfiguration setShowSubText(boolean showSubText)
public SelectFormElementConfiguration setShowTick(boolean showTick)
public SelectFormElementConfiguration setSize(int size)
falsesize - numberpublic SelectFormElementConfiguration setStyle(String style)
public SelectFormElementConfiguration setTickIcon(String tickIcon)
public SelectFormElementConfiguration setCountSelectedText(String countSelectedText)
public SelectFormElementConfiguration setDeselectAllText(String deselectAllText)
public SelectFormElementConfiguration setNoneSelectedText(String noneSelectedText)
public SelectFormElementConfiguration setSelectAllText(String selectAllText)
public SelectFormElementConfiguration localize(@NonNull @NonNull Locale locale, com.foreach.across.modules.web.support.LocalizedTextResolver localizedTextResolver)
locale - for which to create a localized instancelocalizedTextResolver - to use for localizing the text variablespublic static SelectFormElementConfiguration liveSearch()
public static SelectFormElementConfiguration simple()
Copyright © 2020. All rights reserved.