Package io.jmix.ui.action.tagpicker
Class TagLookupAction<E>
java.lang.Object
io.jmix.ui.action.AbstractAction
io.jmix.ui.action.BaseAction
io.jmix.ui.action.AbstractLookupAction<E>
io.jmix.ui.action.tagpicker.TagLookupAction<E>
- Type Parameters:
E- type of entity
- All Implemented Interfaces:
Action,Action.ExecutableAction,Action.HasPrimaryState,Action.ScreenOpeningAction,Action.SecuredAction,TagPicker.TagPickerAction,ValuePicker.ValuePickerAction,org.springframework.beans.factory.InitializingBean
@StudioAction(target="io.jmix.ui.component.TagPicker",
description="Sets an entity to the tag picker using the entity lookup screen")
@ActionType("tag_lookup")
public class TagLookupAction<E>
extends AbstractLookupAction<E>
implements Action.ScreenOpeningAction, TagPicker.TagPickerAction, org.springframework.beans.factory.InitializingBean, Action.ExecutableAction
Lookup action for setting entities to the tag picker using the entity lookup screen.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.ui.action.BaseAction
BaseAction.EnabledRuleNested classes/interfaces inherited from interface io.jmix.ui.action.Action
Action.ActionPerformedEvent, Action.AdjustWhenScreenReadOnly, Action.ExecutableAction, Action.HasPrimaryState, Action.HasSecurityConstraint, Action.HasTarget, Action.MainTabSheetAction, Action.ScreenOpeningAction, Action.SecuredAction, Action.Status -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected UiComponentPropertiesprotected booleanstatic final Stringprotected booleanprotected TagPickerFields inherited from class io.jmix.ui.action.AbstractLookupAction
icons, messages, screenBuilders, screenInitializer, selectValidator, transformationFields inherited from class io.jmix.ui.action.AbstractAction
caption, description, enabled, eventHub, icon, id, owners, primary, shortcut, visibleFields inherited from interface io.jmix.ui.action.Action
PROP_CAPTION, PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_VISIBLEFields inherited from interface io.jmix.ui.component.TagPicker.TagPickerAction
PROP_MULTISELECTFields inherited from interface io.jmix.ui.component.ValuePicker.ValuePickerAction
PROP_EDITABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerform(Component component) Invoked by owning component to execute the action.voidvoideditableChanged(boolean editable) Called byValuePickerto inform about its editable state.voidexecute()Executes theActionbooleanbooleanprotected voidsetEditable(boolean editable) voidsetMultiSelect(boolean multiSelect) Sets multiselect to the action.voidsetTagPicker(TagPicker tagPicker) SetsTagPickerto the action.voidsetUiComponentProperties(UiComponentProperties componentProperties) Methods inherited from class io.jmix.ui.action.AbstractLookupAction
getOpenMode, getScreenClass, getScreenId, setAfterCloseHandler, setIcons, setMessages, setOpenMode, setScreenBuilders, setScreenClass, setScreenConfigurer, setScreenId, setScreenOptionsSupplier, setSelectValidator, setTransformationMethods inherited from class io.jmix.ui.action.BaseAction
addActionPerformedListener, addEnabledRule, isApplicable, isEnabledByRule, isEnabledByUiPermissions, isPermitted, isVisibleByUiPermissions, refreshState, removeEnabledRule, setEnabled, setEnabledByUiPermissions, setEnabledInternal, setVisible, setVisibleByUiPermissions, setVisibleInternal, withCaption, withDescription, withHandler, withIcon, withPrimary, withShortcutMethods inherited from class io.jmix.ui.action.AbstractAction
addOwner, addPropertyChangeListener, firePropertyChange, getCaption, getDescription, getEventHub, getIcon, getId, getOwner, getOwners, getShortcutCombination, hasSubscriptions, isEnabled, isPrimary, isVisible, removeOwner, removePropertyChangeListener, setCaption, setDescription, setIcon, setPrimary, setShortcut, setShortcutCombinationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.ui.action.Action
addOwner, addPropertyChangeListener, getCaption, getDescription, getIcon, getId, getOwner, getOwners, getShortcutCombination, isEnabled, isVisible, refreshState, removeOwner, removePropertyChangeListener, setCaption, setDescription, setEnabled, setIcon, setShortcut, setShortcutCombination, setVisibleMethods inherited from interface io.jmix.ui.action.Action.ScreenOpeningAction
getOpenMode, getScreenClass, getScreenId, setAfterCloseHandler, setOpenMode, setScreenClass, setScreenConfigurer, setScreenId, setScreenOptionsSupplierMethods inherited from interface io.jmix.ui.component.TagPicker.TagPickerAction
setPicker
-
Field Details
-
ID
- See Also:
-
tagPicker
-
componentProperties
-
multiSelect
protected boolean multiSelect -
editable
protected boolean editable
-
-
Constructor Details
-
TagLookupAction
public TagLookupAction() -
TagLookupAction
-
-
Method Details
-
setUiComponentProperties
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
setTagPicker
Description copied from interface:TagPicker.TagPickerActionSetsTagPickerto the action.- Specified by:
setTagPickerin interfaceTagPicker.TagPickerAction- Parameters:
tagPicker- field to set
-
editableChanged
public void editableChanged(boolean editable) Description copied from interface:ValuePicker.ValuePickerActionCalled byValuePickerto inform about its editable state.- Specified by:
editableChangedin interfaceValuePicker.ValuePickerAction- Parameters:
editable- aValuePickereditable state
-
isMultiSelect
public boolean isMultiSelect()- Returns:
- whether multiselect enabled
-
setMultiSelect
Sets multiselect to the action. In the Lookup Screen it enables multiselect ifLookupComponentsupports it. The default value istrue.- Parameters:
multiSelect- whether multiselect should be enabled or not
-
isEditable
public boolean isEditable()- Specified by:
isEditablein interfaceValuePicker.ValuePickerAction- Returns:
- whether action is editable
-
setEditable
protected void setEditable(boolean editable) -
actionPerform
Description copied from interface:ActionInvoked by owning component to execute the action.- Specified by:
actionPerformin interfaceAction- Overrides:
actionPerformin classBaseAction- Parameters:
component- invoking component
-
execute
public void execute()Description copied from interface:Action.ExecutableActionExecutes theAction- Specified by:
executein interfaceAction.ExecutableAction
-