Class ReadOnlyScreensSupport

java.lang.Object
io.jmix.ui.screen.ReadOnlyScreensSupport

@Component("ui_ReadOnlyScreensSupport") public class ReadOnlyScreensSupport extends Object
Bean that encapsulates the default logic of changing screens read-only mode.
  • Field Details

  • Constructor Details

    • ReadOnlyScreensSupport

      public ReadOnlyScreensSupport()
  • Method Details

    • secAccessManager

      @Autowired public void secAccessManager(AccessManager accessManager)
    • setScreenReadOnly

      public void setScreenReadOnly(Screen screen, boolean readOnly)
      Changes the read-only mode of the given screen.

      The following components and actions change their state:

      Parameters:
      screen - a screen to set the read-only mode
      readOnly - whether a screen in the read-only mode
    • setScreenReadOnly

      public void setScreenReadOnly(Screen screen, boolean readOnly, boolean showEnableEditingBtn)
      Changes the read-only mode of the given screen.

      The following components and actions change their state:

      Parameters:
      screen - a screen to set the read-only mode
      readOnly - whether a screen in the read-only mode
      showEnableEditingBtn - whether or not the EditorScreen.ENABLE_EDITING should be displayed in the read-only mode
    • updateComponentsEditableState

      protected void updateComponentsEditableState(Screen screen, boolean readOnly)
    • isEditableConsideringDataBinding

      protected boolean isEditableConsideringDataBinding(Component component, boolean editable)
    • isChangeComponentActionEnabled

      protected boolean isChangeComponentActionEnabled(Action action)
    • isChangeOwnActionEnabled

      protected boolean isChangeOwnActionEnabled(Action action)
    • isChangeEditable

      protected boolean isChangeEditable(Component component)
    • updateOwnActionsEnableState

      protected void updateOwnActionsEnableState(Screen screen, boolean readOnly)
    • updateActionsEnableState

      protected void updateActionsEnableState(Collection<Action> actions, boolean readOnly, Predicate<Action> shouldChangeEnabled)