Interface SelectField<F extends SelectField<F>>
-
- All Superinterfaces:
Comparable<F>,Component<F>,Copyable<F>,Field<F>,FormComponent<F>,Serializable
- All Known Subinterfaces:
DerivedSelectField<F>
- All Known Implementing Classes:
DefaultDerivedSelectField,DefaultSelectField
public interface SelectField<F extends SelectField<F>> extends Field<F>
Represents the metadata for a select field within a form.- Author:
- Nick Crum (ncrum)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSelectField.Attributes
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default FclearOptions()Removes all the options from the select field.default List<SelectOption>getOptions()default FlabelKey(String labelKey)The key used to retrieve the labels of items in the select field.default Fmulti()Shorthand to setmulti(boolean multi)to true.default Fmulti(boolean multi)Determines if the field is able to have multiple values.default FnotMulti()Shorthand to setmulti(boolean multi)to false.default FnotSearchable()Shorthand to setsearchable(boolean searchable)to false.default Foption(SelectOption... options)Provides options which can be selected by a select field.default Foption(String value, String label)Provides an option which can be selected by a select field.default Foptions(Collection<SelectOption> optionsToAdd)Provides options which can be selected by a select field using a collection ofSelectOptions.default Fsearchable()Shorthand to setsearchable(boolean searchable)to true.default Fsearchable(boolean searchable)Determines if the field is searchable.default FvalueKey(String valueKey)The key used to retrieve the values of items in the select field.-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.Component
addAction, addAction, addComponent, addEndpoint, addEndpoint, apply, attribute, augmentationKey, classifier, clearConditionals, clearEndpoints, conditional, conditionals, description, description, findAction, findAction, findActions, findAttribute, findComponent, findComponent, findComponents, findEndpoint, findEndpoint, findEndpoints, get, get, getAction, getAction, getActions, getActionsList, getAttribute, getAttribute, getAttributes, getAugmentationKey, getClassifier, getComponent, getComponent, getComponents, getComponentsList, getConditionals, getDescription, getEndpoint, getEndpoint, getEndpoints, getEndpointsList, getId, getLabel, getOrder, getScope, getType, hasAction, hasAttribute, hasComponent, hasEndpoint, id, isAugmentable, isTranslatable, label, label, notTranslatable, order, removeAction, removeAttribute, removeComponent, removeEndpoint, scope, self, setActions, setAttributes, setAugmentationKey, setClassifier, setComponents, setConditionals, setDescription, setEndpoints, setId, setLabel, setOrder, setScope, setTranslatable, setType, translatable, translatable, type
-
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.Field
clearReadOnlyConditionals, decorated, defaultValue, getDefaultValue, getName, getPlaceholder, getReadOnlyConditionals, getRequiredMessage, getValidationSchema, isReadOnly, isRequired, isShowInQueryBuilder, isTargetCollection, name, notReadOnly, notRequired, placeholder, placeholder, readOnly, readOnly, readOnlyConditional, readOnlyConditionals, required, required, required, required, requiredMessage, requiredMessage, setDefaultValue, setName, setPlaceholder, setReadOnly, setReadOnlyConditionals, setRequired, setRequiredMessage, setShowInQueryBuilder, setValidationSchema, targetIsCollection, targetIsNotCollection, validationMethod, validationSchema, validationSchema
-
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.FormComponent
getHelpText, getHint, getTooltip, helpText, helpText, hidden, hidden, hint, hint, isHidden, notHidden, setHelpText, setHidden, setHint, setTooltip, tooltip, tooltip
-
-
-
-
Method Detail
-
multi
default F multi()
Shorthand to setmulti(boolean multi)to true.- Returns:
- this
-
notMulti
default F notMulti()
Shorthand to setmulti(boolean multi)to false.- Returns:
- this
-
multi
default F multi(boolean multi)
Determines if the field is able to have multiple values. Set to true if it is able to contain multiple, otherwise false.- Parameters:
multi- the multi property- Returns:
- this
-
searchable
default F searchable()
Shorthand to setsearchable(boolean searchable)to true.- Returns:
- this
-
notSearchable
default F notSearchable()
Shorthand to setsearchable(boolean searchable)to false.- Returns:
- this
-
searchable
default F searchable(boolean searchable)
Determines if the field is searchable. Set to true if it is searchable, otherwise false.- Parameters:
searchable- the searchable property- Returns:
- this
-
labelKey
default F labelKey(String labelKey)
The key used to retrieve the labels of items in the select field.- Parameters:
labelKey- the label key property- Returns:
- this
-
valueKey
default F valueKey(String valueKey)
The key used to retrieve the values of items in the select field.- Parameters:
valueKey- the value key property- Returns:
- this
-
option
default F option(String value, String label)
Provides an option which can be selected by a select field.- Parameters:
value- the value of the optionlabel- the label of the option- Returns:
- this
-
option
default F option(SelectOption... options)
Provides options which can be selected by a select field.- Parameters:
options-SelectOptionsto be set as options- Returns:
- this
-
options
default F options(Collection<SelectOption> optionsToAdd)
Provides options which can be selected by a select field using a collection ofSelectOptions.- Parameters:
optionsToAdd- A collection ofSelectOptions- Returns:
- this
-
clearOptions
default F clearOptions()
Removes all the options from the select field.- Returns:
- this
-
getOptions
default List<SelectOption> getOptions()
-
-