Package io.jmix.flowui.view
Class ReadOnlyViewsSupport
java.lang.Object
io.jmix.flowui.view.ReadOnlyViewsSupport
Bean that encapsulates the default logic of changing views read-only mode.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanisChangeComponentActionEnabled(Action action) protected booleanisChangeReadOnly(com.vaadin.flow.component.Component component) protected booleanisEditableConsideringDataBinding(com.vaadin.flow.component.Component component, boolean editable) protected voidrefreshOwnActionStates(View<?> view) voidsetViewReadOnly(View<?> view, boolean readOnly) Changes the read-only mode of the given view.protected voidupdateActionsEnableState(Collection<Action> actions, boolean readOnly, Predicate<Action> shouldChangeEnabled) protected voidupdateComponentsReadOnlyState(View<?> view, boolean readOnly)
-
Field Details
-
accessManager
-
-
Constructor Details
-
ReadOnlyViewsSupport
-
-
Method Details
-
setViewReadOnly
Changes the read-only mode of the given view.The following components change their state:
- All
HasValueAndElementcomponents that has a not nullValueSource - All
AdjustWhenViewReadOnlyactions obtained fromHasActionscomponents
Action.refreshState()).- Parameters:
view- a view to set the read-only modereadOnly- whether a view in the read-only mode
- All
-
updateComponentsReadOnlyState
-
isEditableConsideringDataBinding
protected boolean isEditableConsideringDataBinding(com.vaadin.flow.component.Component component, boolean editable) -
isChangeComponentActionEnabled
-
isChangeReadOnly
protected boolean isChangeReadOnly(com.vaadin.flow.component.Component component) -
refreshOwnActionStates
-
updateActionsEnableState
protected void updateActionsEnableState(Collection<Action> actions, boolean readOnly, Predicate<Action> shouldChangeEnabled)
-