T
- type of entitypublic class StandardLookup<T extends Entity> extends Screen implements LookupScreen<T>, MultiSelectLookupScreen
Screen.AfterCloseEvent, Screen.AfterDetachEvent, Screen.AfterInitEvent, Screen.AfterShowEvent, Screen.BeforeCloseEvent, Screen.BeforeShowEvent, Screen.InitEvent
LookupScreen.ValidationContext<T extends Entity>
Modifier and Type | Field and Description |
---|---|
protected java.util.function.Consumer<java.util.Collection<T>> |
selectHandler |
protected java.util.function.Predicate<LookupScreen.ValidationContext<T>> |
selectValidator |
LOOKUP_CANCEL_ACTION_ID, LOOKUP_SELECT_ACTION_ID, LOOKUP_SELECT_CLOSE_ACTION
NO_OPTIONS, WINDOW_CLOSE_ACTION, WINDOW_COMMIT_AND_CLOSE_ACTION, WINDOW_DISCARD_AND_CLOSE_ACTION
Constructor and Description |
---|
StandardLookup() |
Modifier and Type | Method and Description |
---|---|
protected void |
cancel(Action.ActionPerformedEvent event) |
protected Component |
getLookupActionsLayout() |
protected LookupComponent<T> |
getLookupComponent() |
java.util.function.Consumer<java.util.Collection<T>> |
getSelectHandler() |
java.util.function.Predicate<LookupScreen.ValidationContext<T>> |
getSelectValidator() |
protected void |
initActions(Screen.InitEvent event) |
protected void |
select(Action.ActionPerformedEvent event) |
protected void |
select(java.util.Collection<T> items) |
void |
setLookupComponentMultiSelect(boolean multiSelect)
Informs a screen that a lookup component should change its selection mode, if possible.
|
void |
setSelectHandler(java.util.function.Consumer<java.util.Collection<T>> selectHandler)
Sets selection handler for screen.
|
void |
setSelectValidator(java.util.function.Predicate<LookupScreen.ValidationContext<T>> selectValidator)
Sets selection validator.
|
protected void |
setupCommitShortcut() |
protected void |
setupLookupComponent() |
addAfterCloseListener, addAfterDetachListener, addAfterInitListener, addAfterShowListener, addBeforeCloseListener, addBeforeShowListener, addInitListener, addUrlParamsChangeListener, applyDataLoadingSettings, applySettings, close, close, closeWithDefaultAction, deleteSettings, fireEvent, getBeanLocator, getEventHub, getExtensions, getId, getScreenData, getSettings, getUiEventListeners, getWindow, isMultipleOpen, isSameScreen, isSaveScreenHistoryOnClose, isSaveSettingsOnClose, saveSettings, setBeanLocator, setExtensions, setId, setScreenData, setUiEventListeners, setWindow, show
protected java.util.function.Consumer<java.util.Collection<T extends Entity>> selectHandler
protected java.util.function.Predicate<LookupScreen.ValidationContext<T extends Entity>> selectValidator
protected void initActions(Screen.InitEvent event)
protected void setupCommitShortcut()
protected void setupLookupComponent()
@Nullable public java.util.function.Consumer<java.util.Collection<T>> getSelectHandler()
getSelectHandler
in interface LookupScreen<T extends Entity>
public void setSelectHandler(@Nullable java.util.function.Consumer<java.util.Collection<T>> selectHandler)
LookupScreen
setSelectHandler
in interface LookupScreen<T extends Entity>
selectHandler
- selection handlerpublic java.util.function.Predicate<LookupScreen.ValidationContext<T>> getSelectValidator()
getSelectValidator
in interface LookupScreen<T extends Entity>
public void setSelectValidator(java.util.function.Predicate<LookupScreen.ValidationContext<T>> selectValidator)
LookupScreen
setSelectValidator
in interface LookupScreen<T extends Entity>
selectValidator
- selection validator@Nullable protected Component getLookupActionsLayout()
protected LookupComponent<T> getLookupComponent()
protected void select(Action.ActionPerformedEvent event)
protected void cancel(Action.ActionPerformedEvent event)
protected void select(java.util.Collection<T> items)
public void setLookupComponentMultiSelect(boolean multiSelect)
MultiSelectLookupScreen
setLookupComponentMultiSelect
in interface MultiSelectLookupScreen
multiSelect
- true
to enable multiple selections, false
otherwise