Package io.jmix.flowui
Class DialogWindows
java.lang.Object
io.jmix.flowui.DialogWindows
Provides fluent interface for opening views in dialog windows.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected DetailWindowBuilderProcessorprotected LookupWindowBuilderProcessorprotected org.springframework.beans.factory.ObjectProvider<OpenedDialogWindows>protected WindowBuilderProcessor
- 
Constructor SummaryConstructorsConstructorDescriptionDialogWindows(WindowBuilderProcessor windowBuilderProcessor, DetailWindowBuilderProcessor detailBuilderProcessor, LookupWindowBuilderProcessor lookupBuilderProcessor, org.springframework.beans.factory.ObjectProvider<OpenedDialogWindows> openedDialogWindows) 
- 
Method SummaryModifier and TypeMethodDescription<E,V extends View<?>> 
 DetailWindowBuilder<E,V> detail(EntityPickerComponent<E> picker) Creates a detail view builder to edit an entity selected in the picker component.<E,V extends View<?>> 
 DetailWindowBuilder<E,V> detail(ListDataComponent<E> listDataComponent) Creates a detail view builder to edit an entity selected in the list component.<E,V extends View<?>> 
 DetailWindowBuilder<E,V> Creates a detail view builder for entity class.protected <E> Class<E>getBeanType(EntityMultiPickerComponent<E> picker) protected <E> Class<E>getBeanType(EntityPickerComponent<E> picker) protected <E> Class<E>getBeanType(ListDataComponent<E> listDataComponent) <E,V extends View<?>> 
 LookupWindowBuilder<E,V> lookup(EntityMultiPickerComponent<E> picker) Creates a lookup view builder to select an entities and set it to the multi-value picker component.<E,V extends View<?>> 
 LookupWindowBuilder<E,V> lookup(EntityPickerComponent<E> picker) Creates a lookup view builder to select an entity and set it to the picker component.<E,V extends View<?>> 
 LookupWindowBuilder<E,V> lookup(ListDataComponent<E> listDataComponent) Creates a lookup view builder to select entities and add them to the data container of the list component.<E,V extends View<?>> 
 LookupWindowBuilder<E,V> Creates a lookup view builder for an entity class.<V extends View<?>>
 WindowBuilder<V>Creates a view builder.WindowBuilder<View<?>>Creates a view builder.
- 
Field Details- 
windowBuilderProcessor
- 
detailBuilderProcessor
- 
lookupBuilderProcessor
- 
openedDialogWindows
 
- 
- 
Constructor Details- 
DialogWindowspublic DialogWindows(WindowBuilderProcessor windowBuilderProcessor, DetailWindowBuilderProcessor detailBuilderProcessor, LookupWindowBuilderProcessor lookupBuilderProcessor, @Autowired(required=false) org.springframework.beans.factory.ObjectProvider<OpenedDialogWindows> openedDialogWindows) 
 
- 
- 
Method Details- 
detailCreates a detail view builder for entity class.Example of opening a view for editing an entity: DialogWindow<CustomerDetailView> dialogWindow = dialogWindows.detail(this, Customer.class) .withViewClass(CustomerDetailView.class) .editEntity(customer) .withAfterCloseListener(closeEvent -> { if (closeEvent.closedWith(StandardOutcome.SAVE)) { Customer editedCustomer = closeEvent.getView().getEditedEntity(); // ... } }) .open();Example of opening a view for creating a new entity instance: DialogWindow<CustomerDetailView> dialogWindow = dialogWindows.detail(this, Customer.class) .withViewClass(CustomerDetailView.class) .newEntity() .withAfterCloseListener(closeEvent -> { if (closeEvent.closedWith(StandardOutcome.SAVE)) { Customer newCustomer = closeEvent.getView().getEditedEntity(); // ... } }) .open();- Parameters:
- origin- calling view
- entityClass- edited entity class
 
- 
detailpublic <E,V extends View<?>> DetailWindowBuilder<E,V> detail(ListDataComponent<E> listDataComponent) Creates a detail view builder to edit an entity selected in the list component.- Parameters:
- listDataComponent- the component which provides a selected entity to edit
- See Also:
 
- 
detailCreates a detail view builder to edit an entity selected in the picker component.- Parameters:
- picker- the component which provides an entity to edit
- See Also:
 
- 
lookupCreates a lookup view builder for an entity class.Example of opening a view for selecting an entity: DialogWindow<CustomerListView> dialogWindow = dialogWindows.lookup(this, Customer.class) .withViewClass(CustomerListView.class) .withSelectHandler(customers -> { // ... }) .open();- Parameters:
- origin- calling view
- entityClass- entity class
 
- 
lookuppublic <E,V extends View<?>> LookupWindowBuilder<E,V> lookup(ListDataComponent<E> listDataComponent) Creates a lookup view builder to select entities and add them to the data container of the list component.- Parameters:
- listDataComponent- the list component
- See Also:
 
- 
lookupCreates a lookup view builder to select an entity and set it to the picker component.- Parameters:
- picker- the picker component
- See Also:
 
- 
lookupCreates a lookup view builder to select an entities and set it to the multi-value picker component.- Parameters:
- picker- the multi-value picker component
- See Also:
 
- 
viewCreates a view builder.- Parameters:
- origin- calling view
- viewClass- opened view class
 
- 
getOpenedDialogWindows- Returns:
- the object that provides information about opened dialogs
- Throws:
- IllegalStateException- if- OpenedDialogWindowsis not available
 
- 
viewCreates a view builder.- Parameters:
- origin- calling view
- viewId- id of the opened view (as set in the- ViewControllerannotation)
 
- 
getBeanType
- 
getBeanType
- 
getBeanType
 
-