@Component(value="ui_ReadOnlyScreensSupport")
public class ReadOnlyScreensSupport
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected io.jmix.core.AccessManager |
accessManager |
| Constructor and Description |
|---|
ReadOnlyScreensSupport() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isChangeComponentActionEnabled(Action action) |
protected boolean |
isChangeEditable(Component component) |
protected boolean |
isChangeOwnActionEnabled(Action action) |
protected boolean |
isEditableConsideringDataBinding(Component component,
boolean editable) |
void |
secAccessManager(io.jmix.core.AccessManager accessManager) |
void |
setScreenReadOnly(Screen screen,
boolean readOnly)
Changes the read-only mode of the given screen.
|
void |
setScreenReadOnly(Screen screen,
boolean readOnly,
boolean showEnableEditingBtn)
Changes the read-only mode of the given screen.
|
protected void |
updateActionsEnableState(java.util.Collection<Action> actions,
boolean readOnly,
java.util.function.Predicate<Action> shouldChangeEnabled) |
protected void |
updateComponentsEditableState(Screen screen,
boolean readOnly) |
protected void |
updateOwnActionsEnableState(Screen screen,
boolean readOnly) |
@Autowired public void secAccessManager(io.jmix.core.AccessManager accessManager)
public void setScreenReadOnly(Screen screen, boolean readOnly)
The following components and actions change their state:
Component.Editable components that has a not null ValueSourceAction.AdjustWhenScreenReadOnly actions obtained from ActionsHolder componentsEditorScreen.WINDOW_CLOSE
and EditorScreen.ENABLE_EDITINGscreen - a screen to set the read-only modereadOnly - whether a screen in the read-only modepublic void setScreenReadOnly(Screen screen, boolean readOnly, boolean showEnableEditingBtn)
The following components and actions change their state:
Component.Editable components that has a not null ValueSourceAction.AdjustWhenScreenReadOnly actions obtained from ActionsHolder componentsEditorScreen.WINDOW_CLOSE
and EditorScreen.ENABLE_EDITINGscreen - a screen to set the read-only modereadOnly - whether a screen in the read-only modeshowEnableEditingBtn - whether or not the EditorScreen.ENABLE_EDITING
should be displayed in the read-only modeprotected void updateComponentsEditableState(Screen screen, boolean readOnly)
protected boolean isEditableConsideringDataBinding(Component component, boolean editable)
protected boolean isChangeComponentActionEnabled(Action action)
protected boolean isChangeOwnActionEnabled(Action action)
protected boolean isChangeEditable(Component component)
protected void updateOwnActionsEnableState(Screen screen, boolean readOnly)