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 enumDefines the style of a buttonstatic interfaceDrop typestatic enumPredefined drop typesstatic classDrop typestatic classDrop typestatic final classList of drop typesstatic final classList of GOM parametersstatic classThrown 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 TypeMethodDescriptionbooleanConvenience API forgetAlwaysEnabled()returning a boolean valuebooleanbreaks()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 ExecutablegetClickExecutable(@NotNull SpecialistsBroker broker) The executable used on click eventsprotected StringReturn the default tag for a gom element.@Nullable ExecutablegetDropExecutable(@NotNull SpecialistsBroker broker) The executable used on drop events@NotNull GomButton.GomDropTypesAllowed drop types@Nullable StringgetIcon()Icon, either 'info', 'question', or 'media:[uid]'@Nullable GomButtonScriptReference@Nullable GomButtonScriptReference@NotNull GomButton.GomParamsParameters for the executable@Nullable GomButton.ButtonStylegetStyle()Button style, default is 'button'@NotNull GomButton.ButtonStyleConvenience API forgetStyle()returning a non-null valueReturns aTransferConstraintobject for this element, which describes the store element based transfer restrictions.List<TransferType<?>>getTransferTypes(SpecialistsBroker broker) Returns a list of supportedTransferType's, ornullif 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 idvoidsetAllowEmpty(YesNo allowEmpty) Deprecated.voidsetAlwaysEnabled(YesNo value) Sets if the button is always enabled or is the form enabled state usedvoidSets the icon, either 'info', 'question', or 'media:[uid]'voidSetter for OnClick attribute used byGomHandler.voidSetter for OnDrop attribute used byGomHandler.voidsetStyle(GomButton.ButtonStyle value) Sets the button stylevoidvalidate(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, verifyMethods inherited from class de.espirit.firstspirit.access.store.templatestore.gom.AbstractGomElement
getGomElementTag, getIncludeConfiguration, hasRepresentation, setGomElementTag, setIncludeConfigurationMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:AbstractGomElementReturn the default tag for a gom element.- Specified by:
getDefaultTagin 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:AbstractGomFormElementIndicates, whether the form element allows to stay empty.- Specified by:
getAllowEmptyin interfaceGomFormElement- Overrides:
getAllowEmptyin classAbstractGomFormElement- Returns:
YES, if empty is allowed. Defaults toYesNo.YES.
-
setAllowEmpty
Deprecated.Description copied from class:AbstractGomFormElementSets whether empty is allowed for this form element.- Specified by:
setAllowEmptyin interfaceGomFormElement- Overrides:
setAllowEmptyin classAbstractGomFormElement- Parameters:
allowEmpty-YES, if empty shall be allowed.
-
validate
Description copied from class:AbstractGomFormElementValidates the form element's state with respect to the given context. This generic stub does not check anything.- Specified by:
validatein interfaceGomCheckable- Overrides:
validatein classAbstractGomFormElement- Parameters:
context- The context to validate for, must not benull.- Throws:
GomValidationError- if any requirement is violated.
-
getTransferConstraints
Description copied from interface:GomTransferReceiverReturns aTransferConstraintobject for this element, which describes the store element based transfer restrictions.- Specified by:
getTransferConstraintsin interfaceGomTransferReceiver- Parameters:
broker- Broker for requesting services or providers.- Returns:
- transfer constraint
-
getTransferTypes
Description copied from interface:GomTransferHandlingReturns a list of supportedTransferType's, ornullif transfer is not supported.- Specified by:
getTransferTypesin 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 aFormDatainstance 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:
breaksin interfaceGomFormElement- Specified by:
breaksin interfaceLineBreakable- Overrides:
breaksin 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.BUTTONif unset - Since:
- 5.0
-