Class AbstractAction
java.lang.Object
ch.tocco.nice2.model.form.impl.form2.components.AbstractComponent
ch.tocco.nice2.model.form.impl.form2.components.AbstractCompositeComponent
ch.tocco.nice2.model.form.impl.form2.components.AbstractAction
- All Implemented Interfaces:
BaseAction,Component,CompositeComponent,Cloneable
- Direct Known Subclasses:
ActionImpl,ReportImpl
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.model.form.api.form2.components.BaseAction
BaseAction.ActionType, BaseAction.ButtonStyle, BaseAction.ModalSizeNested classes/interfaces inherited from interface ch.tocco.nice2.model.form.api.form2.components.Component
Component.Configuration -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BaseAction.ActionTypeprotected booleanprotected Integerprotected booleanprotected Stringprotected Integerprotected Integerprotected BaseAction.ModalSizeprotected booleanprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the action type of the action.@Nullable IntegerThis property defines from which selection size the "selection is big it may take a while" warning / confirmation is displayed in the new client (if "showConfirmation" is `false` the value of this property is ignored).@Nullable StringgetIcon()The icon which should be displayed before the label.@Nullable IntegerMaximum number of entities that may be selected for this action.@Nullable IntegerMinimum number of entities that need to be selected for this action.booleanIf `true` the action will show the "selection is big it may take a while" warning / confirmation in the new client if the selection size is larger than the "confirmationThreshold".booleanReturns true if a confirmation should be shown if the action is canceledbooleanReturns true if the action is supposed to be run as "fullscreen" actionbooleanIf `true` the action will run as background task.voidsetActionType(BaseAction.ActionType actionType) voidsetCancelConfirmation(boolean cancelConfirmation) voidsetConfirmationThreshold(Integer confirmationThreshold) voidsetFullscreen(boolean fullscreen) voidvoidsetMaxSelection(Integer maxSelection) voidsetMinSelection(Integer minSelection) voidsetModalSize(BaseAction.ModalSize modalSize) voidsetRunInBackgroundTask(boolean runInBackgroundTask) voidsetShowConfirmation(boolean showConfirmation) voidsetUsesLabelAsTextResource(boolean usesLabelAsTextResource) booleanMethods inherited from class ch.tocco.nice2.model.form.impl.form2.components.AbstractCompositeComponent
accept, addComponent, addScope, addScopes, clone, findById, getChildren, getScopes, hasChildren, indexOf, insertComponent, parseScopes, removeComponent, removeScope, removeScopes, replaceComponent, validateMethods inherited from class ch.tocco.nice2.model.form.impl.form2.components.AbstractComponent
getDefaultFormLabel, getId, getLabel, getParent, getPosition, setId, setLabel, setParent, setPositionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.tocco.nice2.model.form.api.form2.components.Component
accept, getForm, getId, getLabel, getParent, getPosition, validateMethods inherited from interface ch.tocco.nice2.model.form.api.form2.components.CompositeComponent
findById, getChildren, getScopes, hasChildren
-
Field Details
-
actionType
-
icon
-
runInBackgroundTask
protected boolean runInBackgroundTask -
fullscreen
protected boolean fullscreen -
modalSize
-
minSelection
-
maxSelection
-
showConfirmation
protected boolean showConfirmation -
confirmationThreshold
-
cancelConfirmation
protected boolean cancelConfirmation
-
-
Constructor Details
-
AbstractAction
public AbstractAction()
-
-
Method Details
-
getActionType
Description copied from interface:BaseActionReturns the action type of the action. SeeBaseAction.ActionTypefor more information about the specific action types.- Specified by:
getActionTypein interfaceBaseAction
-
setActionType
-
getIcon
Description copied from interface:BaseActionThe icon which should be displayed before the label. Represents font-awesome icon.- Specified by:
getIconin interfaceBaseAction
-
setIcon
-
getMinSelection
Description copied from interface:BaseActionMinimum number of entities that need to be selected for this action.- Specified by:
getMinSelectionin interfaceBaseAction
-
setMinSelection
-
getMaxSelection
Description copied from interface:BaseActionMaximum number of entities that may be selected for this action.- Specified by:
getMaxSelectionin interfaceBaseAction
-
setMaxSelection
-
isRunInBackgroundTask
public boolean isRunInBackgroundTask()Description copied from interface:BaseActionIf `true` the action will run as background task. Makes sense, if the action may take a long time. Default is `false`.- Specified by:
isRunInBackgroundTaskin interfaceBaseAction
-
setRunInBackgroundTask
public void setRunInBackgroundTask(boolean runInBackgroundTask) -
getShowConfirmation
public boolean getShowConfirmation()Description copied from interface:BaseActionIf `true` the action will show the "selection is big it may take a while" warning / confirmation in the new client if the selection size is larger than the "confirmationThreshold".- Specified by:
getShowConfirmationin interfaceBaseAction
-
setShowConfirmation
public void setShowConfirmation(boolean showConfirmation) -
getConfirmationThreshold
Description copied from interface:BaseActionThis property defines from which selection size the "selection is big it may take a while" warning / confirmation is displayed in the new client (if "showConfirmation" is `false` the value of this property is ignored).- Specified by:
getConfirmationThresholdin interfaceBaseAction
-
setConfirmationThreshold
-
isFullscreen
public boolean isFullscreen()Description copied from interface:BaseActionReturns true if the action is supposed to be run as "fullscreen" action- Specified by:
isFullscreenin interfaceBaseAction
-
setFullscreen
public void setFullscreen(boolean fullscreen) -
getModalSize
- Specified by:
getModalSizein interfaceBaseAction- Returns:
- the ModalSize of the custom non-fullscreen action (default: Medium)
-
setModalSize
-
isCancelConfirmation
public boolean isCancelConfirmation()Description copied from interface:BaseActionReturns true if a confirmation should be shown if the action is canceled- Specified by:
isCancelConfirmationin interfaceBaseAction
-
setCancelConfirmation
public void setCancelConfirmation(boolean cancelConfirmation) -
usesLabelAsTextResource
public boolean usesLabelAsTextResource()- Specified by:
usesLabelAsTextResourcein interfaceBaseAction- Returns:
- true if label should be interpreted as text resource, false if it should be used as is
-
setUsesLabelAsTextResource
public void setUsesLabelAsTextResource(boolean usesLabelAsTextResource)
-