Class DetailWindowClassBuilder<E,V extends View<?> & DetailView<E>> 
- Type Parameters:
- V- a view type which is opened in a dialog window
- E- edited entity type
- All Implemented Interfaces:
- DialogWindowBuilder<V>,- DialogWindowClassBuilder<V>
DialogWindow.- 
Field SummaryFieldsFields inherited from class io.jmix.flowui.view.builder.DetailWindowBuilderaddFirst, container, editedEntity, entityClass, field, initializer, listDataComponent, mode, newEntity, parentDataContext, transformationFields inherited from class io.jmix.flowui.view.builder.AbstractWindowBuilderafterCloseListener, afterOpenListener, handler, origin, viewId
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedDetailWindowClassBuilder(DetailWindowBuilder<E, V> builder, Class<V> viewClass) DetailWindowClassBuilder(View<?> origin, Class<E> entityClass, Class<V> viewClass, Function<? extends DetailWindowClassBuilder<E, V>, DialogWindow<V>> handler) 
- 
Method SummaryModifier and TypeMethodDescriptioneditEntity(E entity) SetsDetailViewModetoEDITand the builder for chaining.SetsDetailViewModetoCREATEand the builder for chaining.SetsDetailViewModetoCREATEand the builder for chaining.withAddFirst(Boolean addFirst) Defines whether a new item will be added to the beginning or to the end of collection.withAfterCloseListener(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 update after the detail view is saved.Sets the field in which the framework sets the saved entity after successful detail view saving.withInitializer(Consumer<E> initializer) Sets callback to initialize a new entity instance.withListDataComponent(ListDataComponent<E> listDataComponent) Sets list data component that is used to get thecontainerif it is not set explicitly byDetailWindowBuilder.withContainer(CollectionContainer)method.withParentDataContext(DataContext parentDataContext) Sets parentDataContextfor the detail view.withTransformation(Function<E, E> transformation) Sets code to transform the edited entity after detail view saved.withViewId(String viewId) Sets identifier of the opened view as specified in theViewControllerannotation.Methods inherited from class io.jmix.flowui.view.builder.DetailWindowBuildergetAddFirst, getContainer, getEditedEntity, getEntityClass, getField, getInitializer, getListDataComponent, getMode, getNewEntity, getParentDataContext, getTransformation, withViewClassMethods inherited from class io.jmix.flowui.view.builder.AbstractWindowBuilderbuild, getAfterCloseListener, getAfterOpenListener, getOrigin, 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, getViewId
- 
Field Details- 
viewClass
 
- 
- 
Constructor Details- 
DetailWindowClassBuilder
- 
DetailWindowClassBuilder
 
- 
- 
Method Details- 
newEntityDescription copied from class:DetailWindowBuilderSetsDetailViewModetoCREATEand the builder for chaining.A new entity instance will be created automatically. It can be initialized by code passed to the DetailWindowBuilder.withInitializer(Consumer)method.- Overrides:
- newEntityin class- DetailWindowBuilder<E,- V extends View<?> & DetailView<E>> 
- Returns:
- this instance for chaining
 
- 
newEntityDescription copied from class:DetailWindowBuilderSetsDetailViewModetoCREATEand the builder for chaining.The new entity instance is accepted as the parameter. It can be initialized by code passed to the DetailWindowBuilder.withInitializer(Consumer)method.- Overrides:
- newEntityin class- DetailWindowBuilder<E,- V extends View<?> & DetailView<E>> 
- Parameters:
- entity- new entity instance to be passed to the detail view
- Returns:
- this instance for chaining
 
- 
editEntityDescription copied from class:DetailWindowBuilderSetsDetailViewModetoEDITand the builder for chaining.- Overrides:
- editEntityin class- DetailWindowBuilder<E,- V extends View<?> & DetailView<E>> 
- Parameters:
- entity- entity instance to be passed to the detail view
- Returns:
- this instance for chaining
 
- 
withViewIdDescription copied from class:DetailWindowBuilderSets identifier of the opened view as specified in theViewControllerannotation.- Overrides:
- withViewIdin class- DetailWindowBuilder<E,- V extends View<?> & DetailView<E>> 
- Parameters:
- viewId- identifier of the opened view as specified in the- ViewControllerannotation
- Returns:
- this instance for chaining
 
- 
withInitializerDescription copied from class:DetailWindowBuilderSets callback to initialize a new entity instance.The initializer is invoked only when DetailViewModeisCREATE, i.e. whenDetailWindowBuilder.newEntity()orDetailWindowBuilder.newEntity(Object)methods are invoked on the builder.- Overrides:
- withInitializerin class- DetailWindowBuilder<E,- V extends View<?> & DetailView<E>> 
- Parameters:
- initializer- callback to initialize a new entity instance.
- Returns:
- this instance for chaining
 
- 
withTransformationDescription copied from class:DetailWindowBuilderSets code to transform the edited entity after detail view saved.Applied only if either field or container or listDataComponent is assigned. - Overrides:
- withTransformationin class- DetailWindowBuilder<E,- V extends View<?> & DetailView<E>> 
- Parameters:
- transformation- edited entity transformation object
- Returns:
- this instance for chaining
- See Also:
 
- 
withContainerDescription copied from class:DetailWindowBuilderSetsCollectionContainerto update after the detail view is saved.If the container is Nested, the framework automatically initializes the reference to the parent entity and sets up data contexts for editing compositions.- Overrides:
- withContainerin class- DetailWindowBuilder<E,- V extends View<?> & DetailView<E>> 
- Parameters:
- container- the container to update after the detail view is saved.
- Returns:
- this instance for chaining
 
- 
withParentDataContextDescription copied from class:DetailWindowBuilderSets parentDataContextfor the detail view.The view will save data to the parent context instead of directly to DataManager.- Overrides:
- withParentDataContextin class- DetailWindowBuilder<E,- V extends View<?> & DetailView<E>> 
- Parameters:
- parentDataContext- parent data context to set
- Returns:
- this instance for chaining
 
- 
withListDataComponentpublic DetailWindowClassBuilder<E,V> withListDataComponent(@Nullable ListDataComponent<E> listDataComponent) Description copied from class:DetailWindowBuilderSets list data component that is used to get thecontainerif it is not set explicitly byDetailWindowBuilder.withContainer(CollectionContainer)method.Usually, the list component is a DataGriddisplaying the list of entities.- Overrides:
- withListDataComponentin class- DetailWindowBuilder<E,- V extends View<?> & DetailView<E>> 
- Parameters:
- listDataComponent- the component to set
- Returns:
- this instance for chaining
 
- 
withFieldpublic DetailWindowClassBuilder<E,V> withField(@Nullable com.vaadin.flow.component.HasValue<?, E> field) Description copied from class:DetailWindowBuilderSets the field in which the framework sets the saved entity after successful detail view saving.- Overrides:
- withFieldin class- DetailWindowBuilder<E,- V extends View<?> & DetailView<E>> 
- Parameters:
- field- the field to set
- Returns:
- this instance for chaining
 
- 
withAddFirstDescription copied from class:DetailWindowBuilderDefines whether a new item will be added to the beginning or to the end of collection. Affects only standalone containers, for nested containers new items are always added to the end.- Overrides:
- withAddFirstin class- DetailWindowBuilder<E,- V extends View<?> & DetailView<E>> 
- Parameters:
- addFirst- whether a new item will be added to the beginning of collection
- Returns:
- this instance for chaining
 
- 
withAfterOpenListenerpublic DetailWindowClassBuilder<E,V> withAfterOpenListener(@Nullable Consumer<DialogWindow.AfterOpenEvent<V>> listener) Description copied from class:AbstractWindowBuilderAddsDialogWindow.AfterOpenEventlistener to the dialog window.- Overrides:
- withAfterOpenListenerin class- DetailWindowBuilder<E,- V extends View<?> & DetailView<E>> 
- Parameters:
- listener- the listener to add
- Returns:
- this instance for chaining
 
- 
withAfterCloseListenerpublic DetailWindowClassBuilder<E,V> withAfterCloseListener(@Nullable Consumer<DialogWindow.AfterCloseEvent<V>> listener) Description copied from class:AbstractWindowBuilderAddsDialogWindow.AfterCloseEventlistener to the dialog window.- Overrides:
- withAfterCloseListenerin class- DetailWindowBuilder<E,- V extends View<?> & DetailView<E>> 
- Parameters:
- listener- the listener to add
- Returns:
- this instance for chaining
 
- 
getViewClass- Specified by:
- getViewClassin interface- DialogWindowClassBuilder<E>
- Returns:
- opened view class
 
 
-