Package io.jmix.ui.component
Interface EditorScreenFacet<E,S extends Screen & EditorScreen<E>>
- All Superinterfaces:
org.springframework.context.ApplicationContextAware,org.springframework.beans.factory.Aware,EntityAwareScreenFacet<E>,Facet,ScreenFacet<S>
- All Known Implementing Classes:
EditorScreenFacetImpl
@StudioFacet(xmlElement="editorScreen",
caption="EditorScreen",
description="Prepares and shows editor screens",
category="Facets",
defaultProperty="screenId",
documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/facets/editor-screen-facet.html",
icon="io/jmix/ui/icon/facet/screen.svg")
public interface EditorScreenFacet<E,S extends Screen & EditorScreen<E>>
extends ScreenFacet<S>, EntityAwareScreenFacet<E>
Prepares and shows editor screens.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidsetAddFirst(boolean addFirst) Defines whether a new item will be added to the beginning or to the end of collection.voidsetEditMode(EditMode editMode) SetsEditModeto use in editor.voidsetEntityProvider(Supplier<E> entityProvider) Sets entity provider.voidsetInitializer(Consumer<E> initializer) Sets code to initialize a new entity instance.voidsetParentDataContextProvider(Supplier<DataContext> parentDataContextProvider) Sets parentDataContextsupplier for the editor screen.voidsetTransformation(Function<E, E> transformation) Sets code to transform the edited entity after editor commit.Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface io.jmix.ui.component.EntityAwareScreenFacet
getContainer, getEntityClass, getEntityPicker, getListComponent, setContainer, setEntityClass, setEntityPicker, setListComponentMethods inherited from interface io.jmix.ui.component.ScreenFacet
addAfterCloseEventListener, addAfterShowEventListener, create, getActionTarget, getButtonTarget, getOpenMode, getOptionsProvider, getProperties, getScreenClass, getScreenConfigurer, getScreenId, setActionTarget, setButtonTarget, setOpenMode, setOptionsProvider, setProperties, setScreenClass, setScreenConfigurer, setScreenId, show
-
Method Details
-
setEditMode
SetsEditModeto use in editor.- Parameters:
editMode- edit mode
-
getEditMode
EditMode getEditMode()- Returns:
- editor edit mode
-
setAddFirst
Defines 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.- Parameters:
addFirst- add first
-
getAddFirst
boolean getAddFirst()- Returns:
- whether a new item will be added to the beginning or to the end
-
setEntityProvider
Sets entity provider.- Parameters:
entityProvider- entity provider
-
getEntityProvider
- Returns:
- entity provider
-
setInitializer
Sets code to initialize a new entity instance.The initializer is invoked only when
EditModeisCREATE. -
getInitializer
- Returns:
- entity initializer
-
setParentDataContextProvider
Sets parentDataContextsupplier for the editor screen.The screen will commit data to the parent context instead of directly to
DataManager. -
getParentDataContextProvider
- Returns:
- parent DataContext provider
-
setTransformation
Sets code to transform the edited entity after editor commit.Applied only if either field or container or listComponent is assigned.
- Parameters:
transformation- transformation
-