Class ReadOnlyViewsSupport

java.lang.Object
io.jmix.flowui.view.ReadOnlyViewsSupport

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

  • Constructor Details

    • ReadOnlyViewsSupport

      @Autowired public ReadOnlyViewsSupport(AccessManager accessManager)
  • Method Details

    • setViewReadOnly

      public void setViewReadOnly(View<?> view, boolean readOnly)
      Changes the read-only mode of the given view.

      The following components change their state:

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

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

      protected void updateComponentsReadOnlyState(View<?> view, 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(View<?> view)
    • updateActionsEnableState

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