Package io.jmix.flowui.screen
Class ReadOnlyScreensSupport
java.lang.Object
io.jmix.flowui.screen.ReadOnlyScreensSupport
Bean that encapsulates the default logic of changing screens 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(Screen screen) voidsetScreenReadOnly(Screen<?> screen, boolean readOnly) Changes the read-only mode of the given screen.protected voidupdateActionsEnableState(Collection<Action> actions, boolean readOnly, Predicate<Action> shouldChangeEnabled) protected voidupdateComponentsReadOnlyState(Screen<?> screen, boolean readOnly)
-
Field Details
-
accessManager
-
-
Constructor Details
-
ReadOnlyScreensSupport
-
-
Method Details
-
setScreenReadOnly
Changes the read-only mode of the given screen.The following components change their state:
- All
HasValueAndElementcomponents that has a not nullValueSource - All
AdjustWhenScreenReadOnlyactions obtained fromHasActionscomponents
Action.refreshState()).- Parameters:
screen- a screen to set the read-only modereadOnly- whether a screen 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)
-