Package io.jmix.flowui.view.builder
Class LookupWindowBuilderProcessor
java.lang.Object
io.jmix.flowui.view.builder.AbstractWindowBuilderProcessor
io.jmix.flowui.view.builder.LookupWindowBuilderProcessor
@Component("flowui_LookupWindowBuilderProcessor")
public class LookupWindowBuilderProcessor
extends AbstractWindowBuilderProcessor
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected DataManagerprotected EntityStatesprotected ExtendedEntitiesprotected FetchPlansprotected Metadataprotected MetadataToolsprotected UiViewPropertiesFields inherited from class io.jmix.flowui.view.builder.AbstractWindowBuilderProcessorapplicationContext, uiAccessChecker, viewRegistry, views
- 
Constructor SummaryConstructorsConstructorDescriptionLookupWindowBuilderProcessor(org.springframework.context.ApplicationContext applicationContext, Views views, ViewRegistry viewRegistry, Metadata metadata, MetadataTools metadataTools, DataManager dataManager, FetchPlans fetchPlans, EntityStates entityStates, ExtendedEntities extendedEntities, UiViewProperties viewProperties, UiAccessChecker uiAccessChecker) 
- 
Method SummaryModifier and TypeMethodDescription<E,V extends View<?>> 
 DialogWindow<V>build(LookupWindowBuilder<E, V> builder) protected <E> CollectionContainer<E>findContainer(LookupWindowBuilder<E, ?> builder) protected <E> ObjectfromCollection(Collection<E> value, boolean isCollectionValue) protected <E> FetchPlangetFetchPlanForCollectionContainer(CollectionContainer<E> collectionDc, boolean initializeMasterReference, MetaProperty inverseMetaProperty) SeegetFetchPlanForField(HasValue)javadoc.protected FetchPlangetFetchPlanForField(com.vaadin.flow.component.HasValue<?, ?> field) The method evaluates the fetch plan that is used for the entity in the givenfieldprotected <E> voidhandleSelectionWithContainer(LookupWindowBuilder<E, ?> builder, CollectionContainer<E> collectionDc, Collection<E> itemsFromLookup) protected <E,V extends View<?>> 
 voidhandleSelectionWithField(LookupWindowBuilder<E, V> builder, com.vaadin.flow.component.HasValue field, Collection<E> itemsFromLookup) inferViewClass(DialogWindowBuilder<V> builder) protected <E> Collection<E>reloadItemsByFetchPlan(FetchPlan fetchPlan, Collection<E> itemsFromLookup) protected <E> Collection<E>toCollection(Object value, boolean isCollectionValue) protected <E> Collection<E>transform(LookupWindowBuilder<E, ?> builder, Collection<E> selectedItems) <E> voidupdateFieldOptions(SupportsDataProvider<E> field, Collection<E> items) Updates entities in options if they contain selected item from lookup view.Methods inherited from class io.jmix.flowui.view.builder.AbstractWindowBuilderProcessorcreateDialog, createView, getViewClass, initDialog
- 
Field Details- 
metadata
- 
metadataTools
- 
dataManager
- 
fetchPlans
- 
entityStates
- 
extendedEntities
- 
viewProperties
 
- 
- 
Constructor Details- 
LookupWindowBuilderProcessorpublic LookupWindowBuilderProcessor(org.springframework.context.ApplicationContext applicationContext, Views views, ViewRegistry viewRegistry, Metadata metadata, MetadataTools metadataTools, DataManager dataManager, FetchPlans fetchPlans, EntityStates entityStates, ExtendedEntities extendedEntities, UiViewProperties viewProperties, UiAccessChecker uiAccessChecker) 
 
- 
- 
Method Details- 
build
- 
findContainer
- 
inferViewClass- Specified by:
- inferViewClassin class- AbstractWindowBuilderProcessor
 
- 
handleSelectionWithContainerprotected <E> void handleSelectionWithContainer(LookupWindowBuilder<E, ?> builder, CollectionContainer<E> collectionDc, Collection<E> itemsFromLookup) 
- 
handleSelectionWithFieldprotected <E,V extends View<?>> void handleSelectionWithField(LookupWindowBuilder<E, V> builder, com.vaadin.flow.component.HasValue field, Collection<E> itemsFromLookup) 
- 
transformprotected <E> Collection<E> transform(LookupWindowBuilder<E, ?> builder, Collection<E> selectedItems) 
- 
getFetchPlanForFieldThe method evaluates the fetch plan that is used for the entity in the givenfieldIf the value for a component (e.g. EntityPicker) is selected from lookup view then there may be cases when in entities in lookup view some attributes required in the detail are not loaded.- Returns:
- a view or nullif the fetch plan cannot be evaluated
 
- 
getFetchPlanForCollectionContainer@Nullable protected <E> FetchPlan getFetchPlanForCollectionContainer(CollectionContainer<E> collectionDc, boolean initializeMasterReference, @Nullable MetaProperty inverseMetaProperty) SeegetFetchPlanForField(HasValue)javadoc.- Returns:
- a fetch plan or null if the fetch plan cannot be evaluated
 
- 
reloadItemsByFetchPlanprotected <E> Collection<E> reloadItemsByFetchPlan(FetchPlan fetchPlan, Collection<E> itemsFromLookup) 
- 
toCollection
- 
fromCollection
- 
updateFieldOptionsUpdates entities in options if they contain selected item from lookup view.- Type Parameters:
- E- entity type
- Parameters:
- field- options field to update
- items- selected entities from lookup view to update options in field
 
 
-