Package io.jmix.ui

Interface Fragments

All Known Implementing Classes:
FragmentsImpl

public interface Fragments
Interface defining methods for creation and displaying of reusable screen parts that have their own UI controller.
Usage example (this - Screen controller):

    Fragment editorActions = fragments.create(this, EditorActionsFragment.class)
             .init()
             .getFragment();

    this.getWindow().add(editorActions);
 
  • Method Details

    • create

      default <T extends ScreenFragment> T create(FrameOwner parent, Class<T> screenFragmentClass)
      Creates a screen fragment by its controller class.
      Parameters:
      parent - parent UI controller
      screenFragmentClass - screen controller class
    • create

      default ScreenFragment create(FrameOwner parent, String screenFragmentId)
      Creates a screen fragment by its id.
      Parameters:
      parent - parent UI controller
      screenFragmentId - id of screen fragment
    • create

      <T extends ScreenFragment> T create(FrameOwner parent, Class<T> screenFragmentClass, ScreenOptions options)
      Creates a screen fragment by its controller class.
      Parameters:
      parent - parent UI controller
      screenFragmentClass - screen controller class
      options - screen parameters
    • create

      ScreenFragment create(FrameOwner parent, String screenFragmentId, ScreenOptions options)
      Creates a screen fragment by its id.
      Parameters:
      parent - parent UI controller
      screenFragmentId - id of screen fragment
      options - screen parameters
    • init

      void init(ScreenFragment fragment)
      Perform fragment initialization. Clients must always perform init.
      Parameters:
      fragment - fragment