Package io.jmix.flowui.view.builder
Class LookupWindowClassBuilder<E,V extends View<?> & LookupView<E>> 
java.lang.Object
io.jmix.flowui.view.builder.AbstractWindowBuilder<V>
io.jmix.flowui.view.builder.LookupWindowBuilder<E,V>
 
io.jmix.flowui.view.builder.LookupWindowClassBuilder<E,V> 
- Type Parameters:
- V- a view type which is opened in a dialog window
- E- entity type
- All Implemented Interfaces:
- DialogWindowBuilder<V>,- DialogWindowClassBuilder<V>
public class LookupWindowClassBuilder<E,V extends View<?> & LookupView<E>> 
extends LookupWindowBuilder<E,V>
implements DialogWindowClassBuilder<V> 
Provides a fluent interface to configure and open a lookup view with
 the specific class in a 
DialogWindow.- 
Field SummaryFieldsFields inherited from class io.jmix.flowui.view.builder.LookupWindowBuildercontainer, entityClass, field, fieldCollectionValue, listDataComponent, lookupComponentMultiSelect, selectHandler, selectValidator, transformationFields inherited from class io.jmix.flowui.view.builder.AbstractWindowBuilderafterCloseListener, afterOpenListener, handler, origin, viewConfigurer, viewId
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedLookupWindowClassBuilder(LookupWindowBuilder<E, V> builder, Class<V> viewClass) LookupWindowClassBuilder(View<?> origin, Class<E> entityClass, Class<V> viewClass, Function<? extends LookupWindowClassBuilder<E, V>, DialogWindow<V>> handler) 
- 
Method SummaryModifier and TypeMethodDescriptionwithAfterCloseListener(Consumer<DialogWindow.AfterCloseEvent<V>> listener) AddsDialogWindow.AfterCloseEventlistener to the dialog window.withAfterOpenListener(Consumer<DialogWindow.AfterOpenEvent<V>> listener) AddsDialogWindow.AfterOpenEventlistener to the dialog window.withContainer(CollectionContainer<E> container) SetsCollectionContainerto updated after the lookup view is closed.<T extends com.vaadin.flow.component.HasValue<?,E>> 
 LookupWindowClassBuilder<E,V> withField(T field) Sets the field in which the framework sets the selected entity after successful lookup.withListDataComponent(ListDataComponent<E> listDataComponent) Sets list data component that is used to get thecontainerif it is not set explicitly byLookupWindowBuilder.withContainer(CollectionContainer)method.withLookupComponentMultiSelect(boolean lookupComponentMultiSelect) Sets multi selection mode for the lookup component in the lookup view.<T extends com.vaadin.flow.component.HasValue<?,Collection<E>>> 
 LookupWindowClassBuilder<E,V> withMultiValueField(T field) Sets the field in which the framework sets the selected entities after successful lookup.withSelectHandler(Consumer<Collection<E>> selectHandler) Sets selection handler for the lookup view.withSelectValidator(Predicate<LookupView.ValidationContext<E>> selectValidator) Sets selection validator for the lookup view.withTransformation(Function<Collection<E>, Collection<E>> transformation) Sets code to transform the entities after selection.withViewConfigurer(Consumer<V> configurer) Adds configurer to the dialog window.withViewId(String viewId) Sets identifier of the opened view as specified in theViewControllerannotation.Methods inherited from class io.jmix.flowui.view.builder.LookupWindowBuildergetContainer, getEntityClass, getField, getListDataComponent, getSelectHandler, getSelectValidator, getTransformation, isFieldCollectionValue, isLookupComponentMultiSelect, withViewClassMethods inherited from class io.jmix.flowui.view.builder.AbstractWindowBuilderbuild, getAfterCloseListener, getAfterOpenListener, getOrigin, getViewConfigurer, getViewId, openMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.flowui.view.builder.DialogWindowBuildergetAfterCloseListener, getAfterOpenListener, getOrigin, getViewConfigurer, getViewId
- 
Field Details- 
viewClass
 
- 
- 
Constructor Details- 
LookupWindowClassBuilder
- 
LookupWindowClassBuilder
 
- 
- 
Method Details- 
withViewIdDescription copied from class:LookupWindowBuilderSets identifier of the opened view as specified in theViewControllerannotation.- Overrides:
- withViewIdin class- LookupWindowBuilder<E,- V extends View<?> & LookupView<E>> 
- Parameters:
- viewId- identifier of the opened view as specified in the- ViewControllerannotation
- Returns:
- this instance for chaining
 
- 
withSelectHandlerDescription copied from class:LookupWindowBuilderSets selection handler for the lookup view.- Overrides:
- withSelectHandlerin class- LookupWindowBuilder<E,- V extends View<?> & LookupView<E>> 
- Parameters:
- selectHandler- handler to set
- Returns:
- this instance for chaining
 
- 
withSelectValidatorpublic LookupWindowClassBuilder<E,V> withSelectValidator(Predicate<LookupView.ValidationContext<E>> selectValidator) Description copied from class:LookupWindowBuilderSets selection validator for the lookup view.- Overrides:
- withSelectValidatorin class- LookupWindowBuilder<E,- V extends View<?> & LookupView<E>> 
- Parameters:
- selectValidator- validator to set
- Returns:
- this instance for chaining
 
- 
withTransformationpublic LookupWindowClassBuilder<E,V> withTransformation(@Nullable Function<Collection<E>, Collection<E>> transformation) Description copied from class:LookupWindowBuilderSets code to transform the entities after selection.Applied only if either field or container or listDataComponent is assigned. - Overrides:
- withTransformationin class- LookupWindowBuilder<E,- V extends View<?> & LookupView<E>> 
- Parameters:
- transformation- edited entity transformation object
- Returns:
- this instance for chaining
- See Also:
 
- 
withContainerDescription copied from class:LookupWindowBuilderSetsCollectionContainerto updated after the lookup view is closed.If the container is Nested, the framework automatically initializes the reference to the parent entity and sets up data contexts for added One-To-Many and Many-To-Many relations.- Overrides:
- withContainerin class- LookupWindowBuilder<E,- V extends View<?> & LookupView<E>> 
- Parameters:
- container- the container to update after the lookup view is closed
- Returns:
- this instance for chaining
 
- 
withListDataComponentpublic LookupWindowClassBuilder<E,V> withListDataComponent(@Nullable ListDataComponent<E> listDataComponent) Description copied from class:LookupWindowBuilderSets list data component that is used to get thecontainerif it is not set explicitly byLookupWindowBuilder.withContainer(CollectionContainer)method.Usually, the list component is a DataGriddisplaying the list of entities.- Overrides:
- withListDataComponentin class- LookupWindowBuilder<E,- V extends View<?> & LookupView<E>> 
- Parameters:
- listDataComponent- the component to set
- Returns:
- this instance for chaining
 
- 
withFieldpublic <T extends com.vaadin.flow.component.HasValue<?,E>> LookupWindowClassBuilder<E,V> withField(@Nullable T field) Description copied from class:LookupWindowBuilderSets the field in which the framework sets the selected entity after successful lookup.- Overrides:
- withFieldin class- LookupWindowBuilder<E,- V extends View<?> & LookupView<E>> 
- Parameters:
- field- the field to set
- Returns:
- this instance for chaining
 
- 
withLookupComponentMultiSelectpublic LookupWindowClassBuilder<E,V> withLookupComponentMultiSelect(boolean lookupComponentMultiSelect) Description copied from class:LookupWindowBuilderSets multi selection mode for the lookup component in the lookup view.- Overrides:
- withLookupComponentMultiSelectin class- LookupWindowBuilder<E,- V extends View<?> & LookupView<E>> 
- Parameters:
- lookupComponentMultiSelect- whether to use multi selection for the lookup component
- Returns:
- this instance for chaining
 
- 
withMultiValueFieldpublic <T extends com.vaadin.flow.component.HasValue<?,Collection<E>>> LookupWindowClassBuilder<E,V> withMultiValueField(@Nullable T field) Description copied from class:LookupWindowBuilderSets the field in which the framework sets the selected entities after successful lookup.- Overrides:
- withMultiValueFieldin class- LookupWindowBuilder<E,- V extends View<?> & LookupView<E>> 
- Parameters:
- field- the field to set
- Returns:
- this instance for chaining
 
- 
withAfterOpenListenerpublic LookupWindowClassBuilder<E,V> withAfterOpenListener(@Nullable Consumer<DialogWindow.AfterOpenEvent<V>> listener) Description copied from class:AbstractWindowBuilderAddsDialogWindow.AfterOpenEventlistener to the dialog window.- Overrides:
- withAfterOpenListenerin class- LookupWindowBuilder<E,- V extends View<?> & LookupView<E>> 
- Parameters:
- listener- the listener to add
- Returns:
- this instance for chaining
 
- 
withAfterCloseListenerpublic LookupWindowClassBuilder<E,V> withAfterCloseListener(@Nullable Consumer<DialogWindow.AfterCloseEvent<V>> listener) Description copied from class:AbstractWindowBuilderAddsDialogWindow.AfterCloseEventlistener to the dialog window.- Overrides:
- withAfterCloseListenerin class- LookupWindowBuilder<E,- V extends View<?> & LookupView<E>> 
- Parameters:
- listener- the listener to add
- Returns:
- this instance for chaining
 
- 
withViewConfigurerDescription copied from class:AbstractWindowBuilderAdds configurer to the dialog window.- Overrides:
- withViewConfigurerin class- LookupWindowBuilder<E,- V extends View<?> & LookupView<E>> 
- Parameters:
- configurer- the configurer to add
- Returns:
- the instance for chaining
 
- 
getViewClass- Specified by:
- getViewClassin interface- DialogWindowClassBuilder<E>
- Returns:
- opened view class
 
 
-