E
- type of entity@StudioAction(target="io.jmix.ui.component.EntityPicker", description="Sets an entity to the entity picker using the entity lookup screen") @ActionType(value="entity_lookup") public class EntityLookupAction<E> extends AbstractLookupAction<E> implements EntityPicker.EntityPickerAction, Action.ScreenOpeningAction, org.springframework.beans.factory.InitializingBean, Action.ExecutableAction
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.
BaseAction.EnabledRule
Action.ActionPerformedEvent, Action.AdjustWhenScreenReadOnly, Action.ExecutableAction, Action.HasPrimaryState, Action.HasSecurityConstraint, Action.HasTarget, Action.MainTabSheetAction, Action.ScreenOpeningAction, Action.SecuredAction, Action.Status
Modifier and Type | Field and Description |
---|---|
protected UiComponentProperties |
componentProperties |
protected boolean |
editable |
protected EntityPicker |
entityPicker |
static java.lang.String |
ID |
icons, messages, screenBuilders, screenInitializer, selectValidator, transformation
caption, description, enabled, eventHub, icon, id, owners, primary, shortcut, visible
PROP_EDITABLE
PROP_CAPTION, PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_VISIBLE
Constructor and Description |
---|
EntityLookupAction() |
EntityLookupAction(java.lang.String id) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerform(Component component)
Invoked by owning component to execute the action.
|
void |
afterPropertiesSet() |
void |
editableChanged(boolean editable)
Called by
ValuePicker to inform about its editable state. |
void |
execute()
Executes the action.
|
boolean |
isEditable() |
protected void |
setEditable(boolean editable) |
void |
setEntityPicker(EntityPicker entityPicker) |
protected void |
setUiComponentProperties(UiComponentProperties componentProperties) |
getOpenMode, getScreenClass, getScreenId, setAfterCloseHandler, setIcons, setMessages, setOpenMode, setScreenBuilders, setScreenClass, setScreenConfigurer, setScreenId, setScreenOptionsSupplier, setSelectValidator, setTransformation
addActionPerformedListener, addEnabledRule, isApplicable, isEnabledByRule, isEnabledByUiPermissions, isPermitted, isVisibleByUiPermissions, refreshState, removeEnabledRule, setEnabled, setEnabledByUiPermissions, setEnabledInternal, setVisible, setVisibleByUiPermissions, setVisibleInternal, withCaption, withDescription, withHandler, withIcon, withPrimary, withShortcut
addOwner, addPropertyChangeListener, firePropertyChange, getCaption, getDescription, getEventHub, getIcon, getId, getOwner, getOwners, getShortcutCombination, hasSubscriptions, isEnabled, isPrimary, isVisible, removeOwner, removePropertyChangeListener, setCaption, setDescription, setIcon, setPrimary, setShortcut, setShortcutCombination
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setPicker
getOpenMode, getScreenClass, getScreenId, setAfterCloseHandler, setOpenMode, setScreenClass, setScreenConfigurer, setScreenId, setScreenOptionsSupplier
addOwner, addPropertyChangeListener, getCaption, getDescription, getIcon, getId, getOwner, getOwners, getShortcutCombination, isEnabled, isVisible, refreshState, removeOwner, removePropertyChangeListener, setCaption, setDescription, setEnabled, setIcon, setShortcut, setShortcutCombination, setVisible
public static final java.lang.String ID
protected EntityPicker entityPicker
protected UiComponentProperties componentProperties
protected boolean editable
public EntityLookupAction()
public EntityLookupAction(java.lang.String id)
public void setEntityPicker(@Nullable EntityPicker entityPicker)
setEntityPicker
in interface EntityPicker.EntityPickerAction
public void editableChanged(boolean editable)
ValuePicker.ValuePickerAction
ValuePicker
to inform about its editable state.editableChanged
in interface ValuePicker.ValuePickerAction
editable
- a ValuePicker
editable statepublic boolean isEditable()
isEditable
in interface ValuePicker.ValuePickerAction
protected void setEditable(boolean editable)
@Autowired protected void setUiComponentProperties(UiComponentProperties componentProperties)
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public void actionPerform(Component component)
Action
actionPerform
in interface Action
actionPerform
in class BaseAction
component
- invoking componentpublic void execute()
execute
in interface Action.ExecutableAction