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 Details

    • setEditMode

      @StudioProperty(type=ENUMERATION, defaultValue="CREATE") void setEditMode(EditMode editMode)
      Sets EditMode to use in editor.
      Parameters:
      editMode - edit mode
    • getEditMode

      EditMode getEditMode()
      Returns:
      editor edit mode
    • setAddFirst

      @StudioProperty(type=BOOLEAN, defaultValue="false") void setAddFirst(boolean addFirst)
      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

      void setEntityProvider(@Nullable Supplier<E> entityProvider)
      Sets entity provider.
      Parameters:
      entityProvider - entity provider
    • getEntityProvider

      @Nullable Supplier<E> getEntityProvider()
      Returns:
      entity provider
    • setInitializer

      void setInitializer(@Nullable Consumer<E> initializer)
      Sets code to initialize a new entity instance.

      The initializer is invoked only when EditMode is CREATE.

    • getInitializer

      @Nullable Consumer<E> getInitializer()
      Returns:
      entity initializer
    • setParentDataContextProvider

      void setParentDataContextProvider(@Nullable Supplier<DataContext> parentDataContextProvider)
      Sets parent DataContext supplier for the editor screen.

      The screen will commit data to the parent context instead of directly to DataManager.

    • getParentDataContextProvider

      @Nullable Supplier<DataContext> getParentDataContextProvider()
      Returns:
      parent DataContext provider
    • setTransformation

      void setTransformation(Function<E,E> transformation)
      Sets code to transform the edited entity after editor commit.

      Applied only if either field or container or listComponent is assigned.

      Parameters:
      transformation - transformation