Class GomButton
java.lang.Object
de.espirit.firstspirit.access.store.templatestore.gom.AbstractGomElement
de.espirit.firstspirit.access.store.templatestore.gom.AbstractGomFormElement
de.espirit.firstspirit.access.store.templatestore.gom.GomButton
- All Implemented Interfaces:
GomCheckable
,GomElement
,GomFormElement
,GomHideable
,GomLangInfoProvider
,GomSearchRelevancy
,GomTransferHandling
,GomTransferReceiver
,LineBreakable
,Serializable
public class GomButton
extends AbstractGomFormElement
implements GomTransferReceiver, GomTransferHandling
GOM representation of a button
- Since:
- 4.2.426
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Defines the style of a buttonstatic interface
Drop typestatic enum
Predefined drop typesstatic class
Drop typestatic class
Drop typestatic final class
List of drop typesstatic final class
List of GOM parametersstatic class
Thrown if a class could not be resolvedNested classes/interfaces inherited from interface de.espirit.firstspirit.access.store.templatestore.gom.GomCheckable
GomCheckable.Context
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Convenience API forgetAlwaysEnabled()
returning a boolean valueboolean
breaks()
Convenience API forAbstractGomFormElement.getNoBreak()
returning a boolean valueConvenience API forgetParams()
returning a map from the parameter name to the text valueDeprecated.Indicates if the button is always enabled or is the form enabled state used@Nullable Executable
getClickExecutable
(@NotNull SpecialistsBroker broker) The executable used on click eventsprotected String
Return the default tag for a gom element.@Nullable Executable
getDropExecutable
(@NotNull SpecialistsBroker broker) The executable used on drop events@NotNull GomButton.GomDropTypes
Allowed drop types@Nullable String
getIcon()
Icon, either 'info', 'question', or 'media:[uid]'@Nullable GomButtonScriptReference
@Nullable GomButtonScriptReference
@NotNull GomButton.GomParams
Parameters for the executable@Nullable GomButton.ButtonStyle
getStyle()
Button style, default is 'button'@NotNull GomButton.ButtonStyle
Convenience API forgetStyle()
returning a non-null valueReturns aTransferConstraint
object for this element, which describes the store element based transfer restrictions.List<TransferType<?>>
getTransferTypes
(SpecialistsBroker broker) Returns a list of supportedTransferType
's, ornull
if transfer is not supported.Convenience API forgetParams()
returning a map from parameter name to the text value.Convenience API forgetParams()
returning a map from the field parameter name to the idvoid
setAllowEmpty
(YesNo allowEmpty) Deprecated.void
setAlwaysEnabled
(YesNo value) Sets if the button is always enabled or is the form enabled state usedvoid
Sets the icon, either 'info', 'question', or 'media:[uid]'void
Setter for OnClick attribute used byGomHandler
.void
Setter for OnDrop attribute used byGomHandler
.void
setStyle
(GomButton.ButtonStyle value) Sets the button stylevoid
validate
(GomCheckable.Context context) Validates the form element's state with respect to the given context.Methods inherited from class de.espirit.firstspirit.access.store.templatestore.gom.AbstractGomFormElement
allowsEmpty, clone, convertEntities, description, fillsHorizontally, getConvertEntities, getDefaultValue, getHFill, getHidden, getLabel, getLangInfos, getName, getNoBreak, getPreset, getSearchRelevancy, getUseLanguages, isHidden, label, name, preset, setConvertEntities, setDefaultValue, setHFill, setHidden, setLabel, setLabelAndDescription, setName, setNoBreak, setPreset, setSearchRelevancy, setUseLanguages, usesLanguages, verify
Methods inherited from class de.espirit.firstspirit.access.store.templatestore.gom.AbstractGomElement
getGomElementTag, getIncludeConfiguration, hasRepresentation, setGomElementTag, setIncludeConfiguration
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.espirit.firstspirit.access.store.templatestore.gom.GomElement
getGomElementTag, getIncludeConfiguration, hasRepresentation, setGomElementTag, setIncludeConfiguration
-
Field Details
-
PREFIX_SCRIPT
Script prefix- Since:
- 4.2.426
- See Also:
-
PREFIX_CLASS
Class prefix- Since:
- 4.2.426
- See Also:
-
FIELD_PARAM
Field parameter- Since:
- 4.2.426
- See Also:
-
PREFIX_MEDIA
Media prefix- Since:
- 4.2.426
- See Also:
-
PREFIX_FS
FirstSpirit resource prefix- Since:
- 4.2.426
- See Also:
-
TAG
The tag of this component- Since:
- 4.2.426
- See Also:
-
-
Constructor Details
-
GomButton
public GomButton()
-
-
Method Details
-
getDefaultTag
Description copied from class:AbstractGomElement
Return the default tag for a gom element.- Specified by:
getDefaultTag
in classAbstractGomElement
- Returns:
- The elements default tag.
-
getOnClick
- Returns:
- executable reference string, or
null
. - Since:
- 4.2.426
-
setOnClick
Setter for OnClick attribute used byGomHandler
.- Parameters:
value
- Reference holder- Since:
- 4.2.426
-
getOnDrop
- Returns:
- executable reference string, or
null
. - Since:
- 4.2.426
-
setOnDrop
Setter for OnDrop attribute used byGomHandler
.- Parameters:
value
- Reference holder- Since:
- 4.2.426
-
getIcon
Icon, either 'info', 'question', or 'media:[uid]'- Since:
- 4.2.426
-
setIcon
Sets the icon, either 'info', 'question', or 'media:[uid]'- Since:
- 4.2.426
-
getStyle
Button style, default is 'button'- Since:
- 4.2.426
-
setStyle
Sets the button style- Since:
- 4.2.426
-
getAlwaysEnabled
Indicates if the button is always enabled or is the form enabled state used- Since:
- 4.2.426
-
setAlwaysEnabled
Sets if the button is always enabled or is the form enabled state used- Since:
- 4.2.426
-
getParams
Parameters for the executable- Since:
- 4.2.426
-
getDropTypes
Allowed drop types- Since:
- 4.2.426
-
getAllowEmpty
Deprecated.Description copied from class:AbstractGomFormElement
Indicates, whether the form element allows to stay empty.- Specified by:
getAllowEmpty
in interfaceGomFormElement
- Overrides:
getAllowEmpty
in classAbstractGomFormElement
- Returns:
YES
, if empty is allowed. Defaults toYesNo.YES
.
-
setAllowEmpty
Deprecated.Description copied from class:AbstractGomFormElement
Sets whether empty is allowed for this form element.- Specified by:
setAllowEmpty
in interfaceGomFormElement
- Overrides:
setAllowEmpty
in classAbstractGomFormElement
- Parameters:
allowEmpty
-YES
, if empty shall be allowed.
-
validate
Description copied from class:AbstractGomFormElement
Validates the form element's state with respect to the given context. This generic stub does not check anything.- Specified by:
validate
in interfaceGomCheckable
- Overrides:
validate
in classAbstractGomFormElement
- Parameters:
context
- The context to validate for, must not benull
.- Throws:
GomValidationError
- if any requirement is violated.
-
getTransferConstraints
Description copied from interface:GomTransferReceiver
Returns aTransferConstraint
object for this element, which describes the store element based transfer restrictions.- Specified by:
getTransferConstraints
in interfaceGomTransferReceiver
- Parameters:
broker
- Broker for requesting services or providers.- Returns:
- transfer constraint
-
getTransferTypes
Description copied from interface:GomTransferHandling
Returns a list of supportedTransferType
's, ornull
if transfer is not supported.- Specified by:
getTransferTypes
in interfaceGomTransferHandling
- Parameters:
broker
- Broker for requesting services or providers.- Returns:
- supported transfer types, or
null
.
-
alwaysEnabled
public boolean alwaysEnabled()Convenience API forgetAlwaysEnabled()
returning a boolean value- Since:
- 5.0
-
referencedFields
Convenience API forgetParams()
returning a map from the field parameter name to the id- Since:
- 5.0
-
fixedParameters
Convenience API forgetParams()
returning a map from the parameter name to the text value- Since:
- 5.1
-
params
@NotNull public @NotNull Map<String,Object> params(@Nullable @Nullable FormData formData, @NotNull @NotNull Language language) Convenience API forgetParams()
returning a map from parameter name to the text value. If aFormData
instance is provided, its form fields will be used instead of the text value.- Since:
- 4.2.426
-
breaks
public boolean breaks()Convenience API forAbstractGomFormElement.getNoBreak()
returning a boolean value- Specified by:
breaks
in interfaceGomFormElement
- Specified by:
breaks
in interfaceLineBreakable
- Overrides:
breaks
in classAbstractGomFormElement
- Returns:
true
, if the next form element should follow in the next line.- Since:
- 5.0
-
getClickExecutable
@Nullable public @Nullable Executable getClickExecutable(@NotNull @NotNull SpecialistsBroker broker) The executable used on click events- Since:
- 4.2.426
-
getDropExecutable
The executable used on drop events- Since:
- 4.2.426
-
getStyleNotNull
Convenience API forgetStyle()
returning a non-null value- Returns:
- the value of
getStyle()
orGomButton.ButtonStyle.BUTTON
if unset - Since:
- 5.0
-