public abstract class AbstractGomFormElement extends AbstractGomElement implements GomFormElement, GomCheckable, de.espirit.firstspirit.access.store.templatestore.gom.LineBreakable, GomSearchRelevancy
For using an extended language information container when subclassing, the extended container must subclass DefaultGomLangInfos
andoverride getLangInfos()
!
GomCheckable.Context
Constructor and Description |
---|
AbstractGomFormElement() |
Modifier and Type | Method and Description |
---|---|
boolean |
allowsEmpty()
Indicates, whether empty values are allowed.
|
boolean |
breaks()
Indicates, whether to break after this form element.
|
protected AbstractGomFormElement |
clone()
Creates a clone of this form element.
|
ConvertEntity |
convertEntities()
Provides a non-null setting for entity conversion.
|
String |
description(String lang)
Provides the description for this form element in the requested language.
|
boolean |
fillsHorizontally()
Indicates whether to fill the form horizontally with this form element.
|
YesNo |
getAllowEmpty()
Indicates, whether the form element allows to stay empty.
|
ConvertEntity |
getConvertEntities()
Provides the mode for entity conversions.
|
EditorValue<?> |
getDefaultValue()
Provides the editor containing the default value for this form element.
|
YesNo |
getHFill()
Indicates, whether to horizontally fill a form by this form element.
|
YesNo |
getHidden()
Indicates, whether this form element is visible in the form.
|
String |
getLabel()
Deprecated.
since 4.0.17 originally replaced by LangInfos-Tag, now for hiding in GOM and enable attribute to tag conversion.
|
DefaultGomLangInfos |
getLangInfos()
Provides language dependent information on this form element, like a label and description for multiple languages.
|
Designator |
getName()
Provide the form element name following specific rules.
|
YesNo |
getNoBreak()
Indicates, whether the next form element should follow in the same line as this one.
|
Preset |
getPreset()
Provides the mode for handling preset value for this form element.
|
Relevancy |
getSearchRelevancy()
Provides the relevancy level of this GOM element's value wrt. indexing.
|
YesNo |
getUseLanguages()
Indicates, whether to have separate values in different languages.
|
boolean |
isHidden()
Indicates, whether to hide this component from the form.
|
String |
label(String lang)
Returns the forms name instead of a
null label. |
String |
name()
Provides the textual name of this form element.
|
Preset |
preset()
Provides the preset mode for this form element.
|
void |
setAllowEmpty(YesNo allowEmpty)
Sets whether empty is allowed for this form element.
|
void |
setConvertEntities(ConvertEntity convertEntities)
Sets the mode for entity conversions.
|
void |
setDefaultValue(EditorValue<?> editorValue)
Sets the editor providing the default value for this form element.
|
void |
setHFill(YesNo hfill)
Sets, whether to horizontally fill a form by this form element.
|
void |
setHidden(YesNo hidden)
Sets the form element to be hidden or not.
|
void |
setLabel(String label)
Deprecated.
since 4.0.17 originally replaced by LangInfos-Tag, now for hiding in GOM and enable attribute to tag conversion.
|
void |
setLabelAndDescription(String lang,
String label,
String description)
Sets the label and description for a specific language.
|
void |
setName(Designator name)
Sets the form element name.
|
void |
setNoBreak(YesNo noBreak)
Set whether the next form element should follow immediately in the same line as this one.
|
void |
setPreset(Preset preset)
Sets the preset mode to be used for default values.
|
void |
setSearchRelevancy(Relevancy relevancy)
Sets the relevancy level for this GOM element.
|
void |
setUseLanguages(YesNo useLanguages)
Sets whether to use different values in each language or not.
|
boolean |
usesLanguages()
Indicates whether to use separate values in each language or not.
|
void |
validate(GomCheckable.Context context)
Validates the form element's state with respect to the given context.
|
void |
verify()
Verifies the form element's state.
|
getDefaultTag, getGomElementTag, getIncludeConfiguration, hasRepresentation, setGomElementTag, setIncludeConfiguration
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getGomElementTag, getIncludeConfiguration, hasRepresentation, setGomElementTag, setIncludeConfiguration
public Designator getName()
getName
in interface GomFormElement
public void setName(Designator name)
setName
in interface GomFormElement
name
- The name designator.public ConvertEntity getConvertEntities()
none
.public void setConvertEntities(ConvertEntity convertEntities)
convertEntities
- The conversion mode.public YesNo getHFill()
YES
, if set to fill horizontally. Default is no
.public void setHFill(YesNo hfill)
hfill
- YES
, if order to fill horizontally.public YesNo getUseLanguages()
YES
, if it has separate values. Default is YesNo.YES
.public void setUseLanguages(YesNo useLanguages)
useLanguages
- YES
, to allow for separate values.public YesNo getNoBreak()
YES
, to make the next form element follow. Defaults to YesNo.NO
.public void setNoBreak(YesNo noBreak)
noBreak
- YES
, to make the next element follow in line.public YesNo getAllowEmpty()
getAllowEmpty
in interface GomFormElement
YesNo.YES
.since 4.0.17public void setAllowEmpty(YesNo allowEmpty)
setAllowEmpty
in interface GomFormElement
allowEmpty
- YES
, if empty shall be allowed.public YesNo getHidden()
getHidden
in interface GomFormElement
YES
, if hidden. Defaults to no
.public void setHidden(YesNo hidden)
setHidden
in interface GomFormElement
hidden
- YES
, to hide the form element.public Preset getPreset()
getPreset
in interface GomFormElement
default
.public void setPreset(Preset preset)
setPreset
in interface GomFormElement
preset
- The preset mode.public DefaultGomLangInfos getLangInfos()
getLangInfos
in interface GomLangInfoProvider
public Relevancy getSearchRelevancy()
getSearchRelevancy
in interface GomSearchRelevancy
public void setSearchRelevancy(@Nullable Relevancy relevancy)
setSearchRelevancy
in interface GomSearchRelevancy
relevancy
- The relevancy level.public void verify() throws IllegalStateException
verify
in interface GomCheckable
IllegalStateException
- if any requirement is violated.public void validate(GomCheckable.Context context) throws GomValidationError
validate
in interface GomCheckable
context
- The context to validate for.GomValidationError
- if any requirement is violated.protected AbstractGomFormElement clone()
public EditorValue<?> getDefaultValue()
getDefaultValue
in interface GomFormElement
public void setDefaultValue(EditorValue<?> editorValue)
setDefaultValue
in interface GomFormElement
editorValue
- The default value provding container.@NotNull public String name()
name
in interface GomFormElement
public ConvertEntity convertEntities()
convertEntities
in interface GomFormElement
public boolean fillsHorizontally()
fillsHorizontally
in interface GomFormElement
true
, if to fill horizontally.public boolean usesLanguages()
usesLanguages
in interface GomFormElement
true
, if separate values are supported.public boolean breaks()
breaks
in interface GomFormElement
breaks
in interface de.espirit.firstspirit.access.store.templatestore.gom.LineBreakable
true
, if the next form element should follow in the next line.public boolean allowsEmpty()
allowsEmpty
in interface GomFormElement
true
, if empty values are allowed.public boolean isHidden()
isHidden
in interface GomHideable
true
, if hiding is requested.public Preset preset()
preset
in interface GomFormElement
public String label(String lang)
null
label.label
in interface GomLangInfoProvider
lang
- The language abbreviation.GomLangInfoProvider.label(String)
public String description(String lang)
description
in interface GomLangInfoProvider
lang
- The language abbreviation.public final void setLabelAndDescription(@NotNull String lang, @Nullable String label, @Nullable String description)
lang
- The language abbreviation.label
- The label.description
- The description.@Deprecated public String getLabel()
@Deprecated public void setLabel(String label)
Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210