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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
isChangeComponentActionEnabled
(Action action) protected boolean
isChangeReadOnly
(com.vaadin.flow.component.Component component) protected boolean
isEditableConsideringDataBinding
(com.vaadin.flow.component.Component component, boolean editable) protected void
refreshOwnActionStates
(Screen screen) void
setScreenReadOnly
(Screen<?> screen, boolean readOnly) Changes the read-only mode of the given screen.protected void
updateActionsEnableState
(Collection<Action> actions, boolean readOnly, Predicate<Action> shouldChangeEnabled) protected void
updateComponentsReadOnlyState
(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
HasValueAndElement
components that has a not nullValueSource
- All
AdjustWhenScreenReadOnly
actions obtained fromHasActions
components
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)
-