Package io.jmix.flowui.view
Class StandardListView<E>
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<T>
io.jmix.flowui.view.View<ViewLayout>
io.jmix.flowui.view.StandardView
io.jmix.flowui.view.StandardListView<E>
- Type Parameters:
E- entity class
- 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.HasDynamicTitle,com.vaadin.flow.router.internal.AfterNavigationHandler,com.vaadin.flow.router.internal.BeforeEnterHandler,com.vaadin.flow.router.internal.BeforeLeaveHandler,LookupView<E>,MultiSelectLookupView,Serializable
- Direct Known Subclasses:
AddConditionView,EntityInspectorListView,EntityLogView,JobModelListView,MultiValueSelectDialog,ResourceRoleModelListView,ResourceRoleModelLookupView,RowLevelRoleModelListView,RowLevelRoleModelLookupView,TenantListView,UserSessionsView
public class StandardListView<E>
extends StandardView
implements LookupView<E>, MultiSelectLookupView
Base class of entity list views.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.jmix.flowui.view.View
View.AfterCloseEvent, View.BeforeCloseEvent, View.BeforeShowEvent, View.InitEvent, View.QueryParametersChangeEvent, View.ReadyEventNested classes/interfaces inherited from interface io.jmix.flowui.view.LookupView
LookupView.ValidationContext<E> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected Consumer<Collection<E>>protected Predicate<LookupView.ValidationContext<E>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClose the view without selection.protected OperationResultdoSelect(Collection<E> items) protected Optional<com.vaadin.flow.component.Component>Handle selected entities.voidsetLookupComponentMultiSelect(boolean multiSelect) Informs the view that a lookup component should change its selection mode, if possible.voidsetSelectionHandler(Consumer<Collection<E>> selectionHandler) Sets selection handler for screen.voidsetSelectionValidator(Predicate<LookupView.ValidationContext<E>> selectionValidator) Sets selection validator.protected voidprotected voidprotected OperationResultvalidateSelectedItems(Collection<E> items) Methods inherited from class io.jmix.flowui.view.StandardView
initContentMethods inherited from class io.jmix.flowui.view.View
addAfterCloseListener, addBeforeCloseListener, addBeforeShowListener, addInitListener, addReadyListener, afterNavigation, beforeEnter, beforeLeave, close, close, closeWithDefaultAction, getApplicationContext, getId, getPageTitle, getReturnParameters, getViewActions, getViewAttributes, getViewData, getViewFacets, getViewSupport, onDetach, setApplicationContext, setId, setViewActions, setViewData, setViewFacetsMethods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElementMethods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getEventBus, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onEnabledStateChanged, scrollIntoView, set, setElement, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods 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
-
StandardListView
public StandardListView()
-
-
Method Details
-
setupLookupComponent
protected void setupLookupComponent() -
setupSaveShortcut
protected void setupSaveShortcut() -
getSelectionHandler
- Specified by:
getSelectionHandlerin interfaceLookupView<E>- Returns:
- selection handler
-
setSelectionHandler
Description copied from interface:LookupViewSets selection handler for screen.- Specified by:
setSelectionHandlerin interfaceLookupView<E>- Parameters:
selectionHandler- selection handler
-
getLookupActionsLayout
-
getLookupComponent
- Specified by:
getLookupComponentin interfaceLookupView<E>- Returns:
- a component that is used to select entities of this view
-
findLookupComponent
- Specified by:
findLookupComponentin interfaceLookupView<E>- Returns:
- an optional component that is used to select entities of this view
-
getSelectionValidator
- Specified by:
getSelectionValidatorin interfaceLookupView<E>- Returns:
- selection validator
-
setSelectionValidator
public void setSelectionValidator(@Nullable Predicate<LookupView.ValidationContext<E>> selectionValidator) Description copied from interface:LookupViewSets selection validator.- Specified by:
setSelectionValidatorin interfaceLookupView<E>- Parameters:
selectionValidator- selection validator
-
setLookupComponentMultiSelect
public void setLookupComponentMultiSelect(boolean multiSelect) Description copied from interface:MultiSelectLookupViewInforms the view that a lookup component should change its selection mode, if possible.- Specified by:
setLookupComponentMultiSelectin interfaceMultiSelectLookupView- Parameters:
multiSelect-trueto enable multiple selections,falseotherwise
-
handleSelection
Description copied from interface:LookupViewHandle selected entities.- Specified by:
handleSelectionin interfaceLookupView<E>
-
validateSelectedItems
-
doSelect
-
closeWithDiscard
Description copied from interface:LookupViewClose the view without selection.- Specified by:
closeWithDiscardin interfaceLookupView<E>
-
getSelectAction
-
getDiscardAction
-