Class ReadOnlyScreensSupport

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

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

  • Constructor Details

    • ReadOnlyScreensSupport

      @Autowired public ReadOnlyScreensSupport(AccessManager accessManager)
  • Method Details

    • setScreenReadOnly

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

      The following components change their state:

      All own screen actions will be refreshed (Action.refreshState()).

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

      protected void updateComponentsReadOnlyState(Screen<?> screen, boolean readOnly)
    • isEditableConsideringDataBinding

      protected boolean isEditableConsideringDataBinding(com.vaadin.flow.component.Component component, boolean editable)
    • isChangeComponentActionEnabled

      protected boolean isChangeComponentActionEnabled(Action action)
    • isChangeReadOnly

      protected boolean isChangeReadOnly(com.vaadin.flow.component.Component component)
    • refreshOwnActionStates

      protected void refreshOwnActionStates(Screen screen)
    • updateActionsEnableState

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