Package io.jmix.flowui.screen
Class StandardLookup<T>
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<T>
io.jmix.flowui.screen.Screen<ScreenLayout>
io.jmix.flowui.screen.StandardScreen
io.jmix.flowui.screen.StandardLookup<T>
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.HasElement
,com.vaadin.flow.router.AfterNavigationObserver
,com.vaadin.flow.router.BeforeEnterObserver
,com.vaadin.flow.router.BeforeLeaveObserver
,com.vaadin.flow.router.internal.AfterNavigationHandler
,com.vaadin.flow.router.internal.BeforeEnterHandler
,com.vaadin.flow.router.internal.BeforeLeaveHandler
,LookupScreen<T>
,MultiSelectLookupScreen
,Serializable
public class StandardLookup<T>
extends StandardScreen
implements LookupScreen<T>, MultiSelectLookupScreen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.flowui.screen.Screen
Screen.AfterCloseEvent, Screen.AfterShowEvent, Screen.BeforeCloseEvent, Screen.BeforeShowEvent, Screen.InitEvent
Nested classes/interfaces inherited from interface io.jmix.flowui.screen.LookupScreen
LookupScreen.ValidationContext<T>
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected static final String
protected static final String
protected Consumer<Collection<T>>
protected Predicate<LookupScreen.ValidationContext<T>>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected OperationResult
doSelect
(Collection<T> items) protected Optional<com.vaadin.flow.component.Component>
void
setLookupComponentMultiSelect
(boolean multiSelect) Informs a screen that a lookup component should change its selection mode, if possible.void
setSelectionHandler
(Consumer<Collection<T>> selectionHandler) void
setSelectionValidator
(Predicate<LookupScreen.ValidationContext<T>> selectionValidator) protected void
protected void
protected OperationResult
validateSelectedItems
(Collection<T> items) Methods inherited from class io.jmix.flowui.screen.StandardScreen
initContent
Methods inherited from class io.jmix.flowui.screen.Screen
addAfterCloseListener, addAfterShowListener, addBeforeCloseListener, addBeforeShowListener, addInitListener, afterNavigation, beforeEnter, beforeLeave, close, close, closeWithDefaultAction, getApplicationContext, getId, getScreenActions, getScreenData, getScreenFacets, removeApplicationListeners, setApplicationContext, setId, setScreenActions, setScreenData, setScreenFacets, unregisterBackNavigation, updatePageTitle
Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElement
Methods inherited from class com.vaadin.flow.component.Component
addListener, fireEvent, from, get, getEventBus, getLocale, getParent, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, scrollIntoView, set, setElement, setVisible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
-
Field Details
-
LOOKUP_ACTIONS_LAYOUT_DEFAULT_ID
- See Also:
-
SELECT_ACTION_DEFAULT_ID
- See Also:
-
DISCARD_ACTION_DEFAULT_ID
- See Also:
-
selectionHandler
-
selectionValidator
-
-
Constructor Details
-
StandardLookup
public StandardLookup()
-
-
Method Details
-
setupLookupComponent
protected void setupLookupComponent() -
setupCommitShortcut
protected void setupCommitShortcut() -
getSelectionHandler
- Specified by:
getSelectionHandler
in interfaceLookupScreen<T>
-
setSelectionHandler
- Specified by:
setSelectionHandler
in interfaceLookupScreen<T>
-
getLookupActionsLayout
-
getLookupComponent
- Specified by:
getLookupComponent
in interfaceLookupScreen<T>
-
findLookupComponent
- Specified by:
findLookupComponent
in interfaceLookupScreen<T>
-
getSelectionValidator
- Specified by:
getSelectionValidator
in interfaceLookupScreen<T>
-
setSelectionValidator
public void setSelectionValidator(@Nullable Predicate<LookupScreen.ValidationContext<T>> selectionValidator) - Specified by:
setSelectionValidator
in interfaceLookupScreen<T>
-
setLookupComponentMultiSelect
public void setLookupComponentMultiSelect(boolean multiSelect) Description copied from interface:MultiSelectLookupScreen
Informs a screen that a lookup component should change its selection mode, if possible.- Specified by:
setLookupComponentMultiSelect
in interfaceMultiSelectLookupScreen
- Parameters:
multiSelect
-true
to enable multiple selections,false
otherwise
-
handleSelection
- Specified by:
handleSelection
in interfaceLookupScreen<T>
-
validateSelectedItems
-
doSelect
-
closeWithDiscard
- Specified by:
closeWithDiscard
in interfaceLookupScreen<T>
-
getSelectAction
-
getDiscardAction
-