Package io.jmix.ui.bulk
Class BulkEditorBuilder<E>
java.lang.Object
io.jmix.ui.bulk.BulkEditorBuilder<E>
- Type Parameters:
E
- item type
A builder that creates a new
BulkEditorWindow
with defined parameters.-
Field Summary
Modifier and TypeFieldDescriptionprotected ColumnsMode
protected final Collection<E>
protected String
protected FieldSorter
protected final Function<BulkEditorBuilder<E>,
BulkEditorWindow<E>> protected ListComponent<E>
protected final MetaClass
protected OpenMode
protected final FrameOwner
protected Boolean
-
Constructor Summary
ConstructorDescriptionBulkEditorBuilder
(MetaClass metaClass, Collection<E> entities, FrameOwner origin, Function<BulkEditorBuilder<E>, BulkEditorWindow<E>> handler) BulkEditorBuilder
(BulkEditorBuilder<E> builder) -
Method Summary
Modifier and TypeMethodDescriptioncreate()
withColumnsMode
(ColumnsMode columnsMode) Sets the columns mode for editor which defines number of columns.withExclude
(String exclude) Sets a regular expression to exclude some fields explicitly from the list of attributes available for editing.withFieldSorter
(FieldSorter fieldSorter) Sets field sorter that allows you to sort fields by custom logic.withFieldValidators
(Map<String, Validator<?>> fieldValidators) Sets a map with validators for fields that will be used for editing certain properties.withIncludeProperties
(List<String> includeProperties) Sets the entity attributes to be included to bulk editor window.withListComponent
(ListComponent<E> listComponent) Sets the list component that displays the items to be edited.withModelValidators
(List<Validator<?>> modelValidators) Sets a map with validators for the result of bulk editing.withOpenMode
(OpenMode openMode) Sets screen open mode.withUseConfirmDialog
(Boolean useConfirmDialog) Sets whether or not the confirmation dialog should be displayed to the user before saving the changes.
-
Field Details
-
metaClass
-
origin
-
entities
-
handler
-
openMode
-
listComponent
-
exclude
-
includeProperties
-
fieldValidators
-
modelValidators
-
useConfirmDialog
-
fieldSorter
-
columnsMode
-
-
Constructor Details
-
BulkEditorBuilder
-
BulkEditorBuilder
public BulkEditorBuilder(MetaClass metaClass, Collection<E> entities, FrameOwner origin, Function<BulkEditorBuilder<E>, BulkEditorWindow<E>> handler)
-
-
Method Details
-
withOpenMode
Sets screen open mode.- Parameters:
openMode
- the open mode to set- Returns:
- this builder
-
withListComponent
Sets the list component that displays the items to be edited.- Parameters:
listComponent
- the list component to be used- Returns:
- this builder
-
withExclude
Sets a regular expression to exclude some fields explicitly from the list of attributes available for editing.- Parameters:
exclude
- a regular expression- Returns:
- this builder
-
withIncludeProperties
Sets the entity attributes to be included to bulk editor window. If set, other attributes will be ignored.- Parameters:
includeProperties
- the entity attributes to be included to bulk editor window- Returns:
- this builder
-
withFieldValidators
Sets a map with validators for fields that will be used for editing certain properties.- Parameters:
fieldValidators
- a map with validators for fields that will be used for editing certain properties- Returns:
- this builder
-
withModelValidators
Sets a map with validators for the result of bulk editing.- Parameters:
modelValidators
- a map with validators for the result of bulk editing- Returns:
- this builder
-
withUseConfirmDialog
Sets whether or not the confirmation dialog should be displayed to the user before saving the changes. The default value is true.- Parameters:
useConfirmDialog
- whether or not the confirmation dialog should be displayed- Returns:
- this builder
-
withFieldSorter
Sets field sorter that allows you to sort fields by custom logic.- Parameters:
fieldSorter
- field sorter- Returns:
- this builder
-
withColumnsMode
Sets the columns mode for editor which defines number of columns.- Parameters:
columnsMode
- columns mode- Returns:
- this builder
- See Also:
-
getOrigin
- Returns:
- a
FrameOwner
of bulk editor
-
getMetaClass
- Returns:
- a
MetaClass
of items
-
getEntities
- Returns:
- a collection of items to be edited
-
getOpenMode
- Returns:
- screen launch mode
-
getListComponent
- Returns:
- the list component that displays the items to be edited
-
getExclude
- Returns:
- a regular expression to exclude some fields explicitly from the list of attributes available for editing
-
getIncludeProperties
- Returns:
- the entity attributes to be included to bulk editor window
-
getFieldValidators
- Returns:
- a map with validators for fields that will be used for editing certain properties
-
getModelValidators
- Returns:
- a map with validators for the result of bulk editing
-
isUseConfirmDialog
- Returns:
- whether or not the confirmation dialog should be displayed to the user before saving the changes
-
getFieldSorter
- Returns:
- field sorter
-
getColumnsMode
- Returns:
- columns mode
- See Also:
-
create
- Returns:
- a new instance of
BulkEditorWindow
-