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 TypeMethodDescriptionboolean
void
setAddFirst
(boolean addFirst) Defines whether a new item will be added to the beginning or to the end of collection.void
setEditMode
(EditMode editMode) SetsEditMode
to use in editor.void
setEntityProvider
(Supplier<E> entityProvider) Sets entity provider.void
setInitializer
(Consumer<E> initializer) Sets code to initialize a new entity instance.void
setParentDataContextProvider
(Supplier<DataContext> parentDataContextProvider) Sets parentDataContext
supplier for the editor screen.void
setTransformation
(Function<E, E> transformation) Sets code to transform the edited entity after editor commit.Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface io.jmix.ui.component.EntityAwareScreenFacet
getContainer, getEntityClass, getEntityPicker, getListComponent, setContainer, setEntityClass, setEntityPicker, setListComponent
Methods 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
SetsEditMode
to 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
EditMode
isCREATE
. -
getInitializer
- Returns:
- entity initializer
-
setParentDataContextProvider
Sets parentDataContext
supplier 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
-