Package io.jmix.ui.action.entitypicker
Class EntityLookupAction<E>
java.lang.Object
io.jmix.ui.action.AbstractAction
io.jmix.ui.action.BaseAction
io.jmix.ui.action.AbstractLookupAction<E>
io.jmix.ui.action.entitypicker.EntityLookupAction<E>
- Type Parameters:
E
- type of entity
- All Implemented Interfaces:
Action
,Action.ExecutableAction
,Action.HasPrimaryState
,Action.ScreenOpeningAction
,Action.SecuredAction
,EntityPicker.EntityPickerAction
,ValuePicker.ValuePickerAction
,org.springframework.beans.factory.InitializingBean
@StudioAction(target="io.jmix.ui.component.EntityPicker",
description="Sets an entity to the entity picker using the entity lookup screen")
@ActionType("entity_lookup")
public class EntityLookupAction<E>
extends AbstractLookupAction<E>
implements EntityPicker.EntityPickerAction, Action.ScreenOpeningAction, org.springframework.beans.factory.InitializingBean, Action.ExecutableAction
Standard action for setting an entity to the entity picker using the entity lookup screen.
Should be defined for EntityPicker
or its subclass in a screen XML descriptor.
The action instance can be parameterized using the nested properties
XML element or programmatically in the
screen controller.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.ui.action.BaseAction
BaseAction.EnabledRule
Nested 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
Modifier and TypeFieldDescriptionprotected UiComponentProperties
protected boolean
protected EntityPicker
static final String
Fields inherited from class io.jmix.ui.action.AbstractLookupAction
icons, messages, screenBuilders, screenInitializer, selectValidator, transformation
Fields inherited from class io.jmix.ui.action.AbstractAction
caption, description, enabled, eventHub, icon, id, owners, primary, shortcut, visible
Fields inherited from interface io.jmix.ui.action.Action
PROP_CAPTION, PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_VISIBLE
Fields inherited from interface io.jmix.ui.component.ValuePicker.ValuePickerAction
PROP_EDITABLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
actionPerform
(Component component) Invoked by owning component to execute the action.void
void
editableChanged
(boolean editable) Called byValuePicker
to inform about its editable state.void
execute()
Executes the action.boolean
protected void
setEditable
(boolean editable) void
setEntityPicker
(EntityPicker entityPicker) protected void
setUiComponentProperties
(UiComponentProperties componentProperties) Methods inherited from class io.jmix.ui.action.AbstractLookupAction
getOpenMode, getScreenClass, getScreenId, setAfterCloseHandler, setIcons, setMessages, setOpenMode, setScreenBuilders, setScreenClass, setScreenConfigurer, setScreenId, setScreenOptionsSupplier, setSelectValidator, setTransformation
Methods 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, withShortcut
Methods 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, setShortcutCombination
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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, setVisible
Methods inherited from interface io.jmix.ui.action.Action.ScreenOpeningAction
getOpenMode, getScreenClass, getScreenId, setAfterCloseHandler, setOpenMode, setScreenClass, setScreenConfigurer, setScreenId, setScreenOptionsSupplier
Methods inherited from interface io.jmix.ui.component.EntityPicker.EntityPickerAction
setPicker
-
Field Details
-
ID
- See Also:
-
entityPicker
-
componentProperties
-
editable
protected boolean editable
-
-
Constructor Details
-
EntityLookupAction
public EntityLookupAction() -
EntityLookupAction
-
-
Method Details
-
setEntityPicker
- Specified by:
setEntityPicker
in interfaceEntityPicker.EntityPickerAction
-
editableChanged
public void editableChanged(boolean editable) Description copied from interface:ValuePicker.ValuePickerAction
Called byValuePicker
to inform about its editable state.- Specified by:
editableChanged
in interfaceValuePicker.ValuePickerAction
- Parameters:
editable
- aValuePicker
editable state
-
isEditable
public boolean isEditable()- Specified by:
isEditable
in interfaceValuePicker.ValuePickerAction
- Returns:
- whether this action is editable
-
setEditable
protected void setEditable(boolean editable) -
setUiComponentProperties
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
actionPerform
Description copied from interface:Action
Invoked by owning component to execute the action.- Specified by:
actionPerform
in interfaceAction
- Overrides:
actionPerform
in classBaseAction
- Parameters:
component
- invoking component
-
execute
public void execute()Executes the action.- Specified by:
execute
in interfaceAction.ExecutableAction
-