@Component(value="cuba_LookupAction") @Scope(value="prototype") public static class PickerField.LookupAction extends PickerField.StandardAction
In order to provide your own implementation globally, create a subclass and register it in web-spring.xml,
for example:
<bean id="cuba_LookupAction" class="com.company.sample.gui.MyLookupAction" scope="prototype"/>Also, use
create() static methods instead of constructors when creating the action programmatically.BaseAction.EnabledRuleAction.ActionPerformedEvent, Action.BeforeActionPerformedHandler, Action.HasBeforeActionPerformedHandler, Action.HasOpenType, Action.HasSecurityConstraint, Action.HasTarget, Action.Status, Action.UiPermissionAware| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
PROP_CAPTION, PROP_DESCRIPTION, PROP_ENABLED, PROP_ICON, PROP_SHORTCUT, PROP_VISIBLE| Constructor and Description |
|---|
LookupAction(PickerField pickerField) |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerform(Component component)
Invoked by owning component when an action occurs.
|
void |
afterCloseLookup(java.lang.String actionId)
Hook to be implemented in subclasses.
|
void |
afterSelect(java.util.Collection items)
Hook to be implemented in subclasses.
|
static PickerField.LookupAction |
create(PickerField pickerField) |
java.lang.String |
getLookupScreen() |
DialogParams |
getLookupScreenDialogParams()
Deprecated.
|
WindowManager.OpenType |
getLookupScreenOpenType() |
java.util.Map<java.lang.String,java.lang.Object> |
getLookupScreenParams() |
java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.Object>> |
getLookupScreenParamsSupplier() |
void |
setAfterLookupCloseHandler(PickerField.AfterLookupCloseHandler afterLookupCloseHandler) |
void |
setAfterLookupSelectionHandler(PickerField.AfterLookupSelectionHandler afterLookupSelectionHandler) |
void |
setLookupScreen(java.lang.String lookupScreen)
Set the lookup screen ID explicitly.
|
void |
setLookupScreenDialogParams(DialogParams lookupScreenDialogParams)
Deprecated.
Use
#setLookupScreenOpenType(OpenType) |
void |
setLookupScreenOpenType(WindowManager.OpenType lookupScreenOpenType)
How to open the lookup screen.
|
void |
setLookupScreenParams(java.util.Map<java.lang.String,java.lang.Object> lookupScreenParams)
Parameters to pass to the lookup screen.
|
void |
setLookupScreenParamsSupplier(java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.Object>> supplier) |
Entity |
transformValueFromLookupWindow(Entity valueFromLookupWindow)
Hook to be implemented in subclasses.
|
setEditableaddEnabledRule, getTarget, isEnabledByUiPermissions, isVisibleByUiPermissions, refreshState, removeEnabledRule, setEnabled, setEnabledByUiPermissions, setTarget, setVisible, setVisibleByUiPermissions, withCaption, withDescription, withHandler, withIcon, withShortcutaddOwner, addPropertyChangeListener, getCaption, getDescription, getIcon, getId, getOwner, getOwners, getShortcutCombination, isEnabled, isPrimary, isVisible, removeOwner, removePropertyChangeListener, setCaption, setDescription, setIcon, setIconFromSet, setPrimary, setShortcut, setShortcutCombinationequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddOwner, addPropertyChangeListener, getCaption, getDescription, getIcon, getId, getOwner, getOwners, getShortcutCombination, isEnabled, isVisible, removeOwner, removePropertyChangeListener, setCaption, setDescription, setIcon, setIconFromSet, setShortcut, setShortcutCombinationpublic LookupAction(PickerField pickerField)
public static PickerField.LookupAction create(PickerField pickerField)
public void setAfterLookupCloseHandler(PickerField.AfterLookupCloseHandler afterLookupCloseHandler)
public void setAfterLookupSelectionHandler(PickerField.AfterLookupSelectionHandler afterLookupSelectionHandler)
public java.lang.String getLookupScreen()
public void setLookupScreen(@Nullable
java.lang.String lookupScreen)
.lookup to it.lookupScreen - lookup screen ID, e.g. sec$User.lookuppublic WindowManager.OpenType getLookupScreenOpenType()
public void setLookupScreenOpenType(WindowManager.OpenType lookupScreenOpenType)
WindowManager.OpenType.THIS_TAB mode.lookupScreenOpenType - open type@Deprecated @Nullable public DialogParams getLookupScreenDialogParams()
@Deprecated public void setLookupScreenDialogParams(DialogParams lookupScreenDialogParams)
#setLookupScreenOpenType(OpenType)WindowManager.OpenType.DIALOG mode.
Doesn't affect other modes.@Nullable public java.util.Map<java.lang.String,java.lang.Object> getLookupScreenParams()
public void setLookupScreenParams(java.util.Map<java.lang.String,java.lang.Object> lookupScreenParams)
lookupScreenParams - map of parameterspublic void actionPerform(Component component)
ActionactionPerform in interface ActionactionPerform in class BaseActioncomponent - invoking componentpublic Entity transformValueFromLookupWindow(Entity valueFromLookupWindow)
valueFromLookupWindow - value selected in Lookup window.public void afterSelect(java.util.Collection items)
items - collection of entity instances selected by user, never nullpublic void afterCloseLookup(java.lang.String actionId)
actionId - ID of action that closed the screen. The following values are possible:
public java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.Object>> getLookupScreenParamsSupplier()
public void setLookupScreenParamsSupplier(java.util.function.Supplier<java.util.Map<java.lang.String,java.lang.Object>> supplier)