public class ItemTrackingAction extends ListAction implements Action.HasSecurityConstraint
ListComponent
.
Action action = new ItemTrackingAction("moveToTrash")
.withCaption("Move to trash")
.withIcon("icons/trash.png")
.withHandler(event -> {
// action logic here
});
docsTable.addAction(action);
BaseAction.EnabledRule
Action.ActionPerformedEvent, Action.BeforeActionPerformedHandler, Action.HasBeforeActionPerformedHandler, Action.HasOpenType, Action.HasSecurityConstraint, Action.HasTarget, Action.SecuredAction, Action.Status
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
constraintCode |
protected ConstraintOperationType |
constraintOperationType |
protected Security |
security |
target
caption, description, enabled, eventHub, icon, id, owners, primary, shortcut, visible
PROP_CAPTION, PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_VISIBLE
Constructor and Description |
---|
ItemTrackingAction(ListComponent target,
java.lang.String id) |
ItemTrackingAction(java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getConstraintCode() |
ConstraintOperationType |
getConstraintOperationType() |
protected boolean |
isApplicable()
Callback method which is invoked by the action to determine its enabled state.
|
protected boolean |
isPermitted()
Callback method which is invoked by the action to determine its enabled state.
|
void |
setConstraintCode(java.lang.String constraintCode) |
void |
setConstraintOperationType(ConstraintOperationType constraintOperationType) |
getTarget, setTarget, withCaption, withDescription, withHandler, withIcon, withPrimary, withShortcut
actionPerform, addActionPerformedListener, addEnabledRule, isEnabledByRule, isEnabledByUiPermissions, isVisibleByUiPermissions, refreshState, removeEnabledRule, setEnabled, setEnabledByUiPermissions, setEnabledInternal, setVisible, setVisibleByUiPermissions, setVisibleInternal
addOwner, addPropertyChangeListener, firePropertyChange, getCaption, getDefaultCaption, getDescription, getEventHub, getIcon, getId, getOwner, getOwners, getShortcutCombination, hasSubscriptions, isEnabled, isPrimary, isVisible, removeOwner, removePropertyChangeListener, setCaption, setDescription, setIcon, setIconFromSet, setPrimary, setShortcut, setShortcutCombination
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
actionPerform, addOwner, addPropertyChangeListener, getCaption, getDescription, getIcon, getId, getOwner, getOwners, getShortcutCombination, isEnabled, isVisible, refreshState, removeOwner, removePropertyChangeListener, setCaption, setDescription, setEnabled, setIcon, setIconFromSet, setShortcut, setShortcutCombination, setVisible
protected ConstraintOperationType constraintOperationType
protected java.lang.String constraintCode
protected Security security
public ItemTrackingAction(java.lang.String id)
public ItemTrackingAction(ListComponent target, java.lang.String id)
protected boolean isApplicable()
BaseAction
isApplicable
in class BaseAction
protected boolean isPermitted()
BaseAction
isPermitted
in class BaseAction
public void setConstraintOperationType(ConstraintOperationType constraintOperationType)
setConstraintOperationType
in interface Action.HasSecurityConstraint
public ConstraintOperationType getConstraintOperationType()
getConstraintOperationType
in interface Action.HasSecurityConstraint
public void setConstraintCode(java.lang.String constraintCode)
setConstraintCode
in interface Action.HasSecurityConstraint
public java.lang.String getConstraintCode()
getConstraintCode
in interface Action.HasSecurityConstraint