Package io.jmix.flowui.view
Interface LookupView<E>
- Type Parameters:
E
- entity class
- All Known Implementing Classes:
AddConditionView
,EntityInspectorListView
,EntityLogView
,JobModelListView
,MultiValueSelectDialog
,ResourceRoleModelListView
,ResourceRoleModelLookupView
,RowLevelRoleModelListView
,RowLevelRoleModelLookupView
,StandardListView
,TenantListView
,UserSessionsView
public interface LookupView<E>
Interface of views that display a list of entities and can return instances selected by the user.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Context object which is passed to the selection validator set bysetSelectionValidator(Predicate)
. -
Method Summary
Modifier and TypeMethodDescriptionClose the view without selection.Handle selected entities.void
setSelectionHandler
(Consumer<Collection<E>> selectionHandler) Sets selection handler for screen.void
setSelectionValidator
(Predicate<LookupView.ValidationContext<E>> selectionValidator) Sets selection validator.
-
Method Details
-
handleSelection
OperationResult handleSelection()Handle selected entities. -
closeWithDiscard
OperationResult closeWithDiscard()Close the view without selection. -
getLookupComponent
LookupComponent<E> getLookupComponent()- Returns:
- a component that is used to select entities of this view
- Throws:
IllegalStateException
- if such a component is not defined
-
findLookupComponent
Optional<LookupComponent<E>> findLookupComponent()- Returns:
- an optional component that is used to select entities of this view
-
getSelectionHandler
Optional<Consumer<Collection<E>>> getSelectionHandler()- Returns:
- selection handler
-
setSelectionHandler
Sets selection handler for screen.- Parameters:
selectionHandler
- selection handler
-
getSelectionValidator
Optional<Predicate<LookupView.ValidationContext<E>>> getSelectionValidator()- Returns:
- selection validator
-
setSelectionValidator
Sets selection validator.- Parameters:
selectionValidator
- selection validator
-