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
-
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
(View<?> view) void
setViewReadOnly
(View<?> view, boolean readOnly) Changes the read-only mode of the given view.protected void
updateActionsEnableState
(Collection<Action> actions, boolean readOnly, Predicate<Action> shouldChangeEnabled) protected void
updateComponentsReadOnlyState
(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
HasValueAndElement
components that has a not nullValueSource
- All
AdjustWhenViewReadOnly
actions obtained fromHasActions
components
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)
-