public class RoleEditor extends AbstractEditor<Role>
Screen.AfterCloseEvent, Screen.AfterDetachEvent, Screen.AfterInitEvent, Screen.AfterShowEvent, Screen.BeforeCloseEvent, Screen.BeforeShowEvent, Screen.InitEventWindow.BeforeCloseEvent, Window.BeforeCloseWithCloseButtonEvent, Window.BeforeCloseWithShortcutEvent, Window.CloseListener, Window.CloseOrigin, Window.CloseWithCommitListener, Window.Committable, Window.ContentSwitchMode, Window.Editor<T extends Entity>, Window.HasFoldersPane, Window.HasUserIndicator, Window.HasWorkArea, Window.Lookup<T extends Entity>, Window.TopLevelWindow, Window.WrapperFrame.MessageMode, Frame.MessageType, Frame.NotificationTypeExpandingLayout.ExpandDirectionComponent.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.OptionsStyleProvider| Modifier and Type | Field and Description |
|---|---|
protected CheckBox |
defaultRole |
protected TextArea |
description |
protected EntityStates |
entityStates |
protected TextField |
locName |
protected TextField |
name |
protected Datasource<Role> |
roleDs |
protected RolesService |
rolesService |
protected ScreenPermissionsFrame |
screensTabFrame |
protected LookupField |
securityScopeLookup |
protected SecurityScopesService |
securityScopesService |
protected Label<java.lang.String> |
superRoleLabel |
protected LookupField<RoleType> |
typeLookup |
protected Label<java.lang.String> |
typeLookupLabel |
protected Button |
windowCommit |
protected Button |
windowCommitAndClose |
commitActionPerformed, crossFieldValidate, justLocked, readOnly, readOnlyDueToLock, showEnableEditingBtn, showSaveNotificationframe, messages, UNKNOWN_CLOSE_ACTION_IDNAMEBROWSE_WINDOW_SUFFIX, CLOSE_ACTION_ID, COMMIT_ACTION_ID, CREATE_WINDOW_SUFFIX, EDITOR_WINDOW_SUFFIX, LOOKUP_WINDOW_SUFFIX, SELECT_ACTION_IDAUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE, UNITS_PERCENTAGE, UNITS_PIXELSENABLE_EDITING, WINDOW_CLOSE, WINDOW_COMMIT, WINDOW_COMMIT_AND_CLOSENO_OPTIONS, WINDOW_CLOSE_ACTION, WINDOW_COMMIT_AND_CLOSE_ACTION, WINDOW_DISCARD_AND_CLOSE_ACTION| Constructor and Description |
|---|
RoleEditor() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
initNewItem(Role item)
Hook to be implemented in subclasses.
|
protected void |
initSecurityScopes() |
protected void |
initUiBySecurityVersion() |
protected void |
postInit()
Hook to be implemented in subclasses.
|
boolean |
preCommit()
Hook to be implemented in subclasses.
|
protected void |
restrictAccessForPredefinedRole() |
afterWindowApplyPostInit, closeWithCommit, commit, commit, commitAndClose, commitInternal, disableCommitAction, getDatasourceInternal, getEditedEntity, getItem, getMetaClassForLocking, getParentDs, handlePreviouslyDeletedCompositionItems, hasUnsavedChanges, initCommitActions, isCrossFieldValidate, isLocked, isModified, isReadOnly, isShowSaveNotification, postCommit, releaseLock, setCrossFieldValidate, setEntityToEdit, setItem, setItemInternal, setParentDs, setReadOnly, setShowSaveNotification, validateAdditionalRulesadd, add, addAction, addAction, addBeforeWindowCloseListener, addFacet, addStyleName, addTimer, afterShow, applySettings, beforeClose, closeWithDiscard, deleteSettings, expand, expand, formatMessage, getAction, getActions, getActionsPermissions, getAlignment, getCaption, getCompanion, getComponent, getComponent, getComponent, getComponents, getComposition, getContentSwitchMode, getContext, getDescription, getDialogOptions, getDsContext, getExpandDirection, getExpandRatio, getFacet, getFacets, getFocusComponent, getFrame, getFrameOwner, getHeight, getHeightSizeUnit, getIcon, getMargin, getMaxHeight, getMaxWidth, getMessage, getMessagesPack, getMinHeight, getMinWidth, getOwnComponent, getOwnComponents, getOwnComponentsStream, getParent, getScreenHashCode, getSettings, getSpacing, getStyleName, getTimer, getWidth, getWidthSizeUnit, getWindowManager, getWrappedFrame, getWrappedWindow, getXmlDescriptor, handleValidationErrors, indexOf, init, init, initEnableEditingActionStub, isAttributeAccessControlEnabled, isCloseable, isEnabled, isEnabledRecursive, isExpanded, isResponsive, isSameScreen, isValid, isVisible, isVisibleRecursive, postValidate, preClose, ready, remove, removeAction, removeAction, removeAll, removeAllActions, removeBeforeWindowCloseListener, removeFacet, removeStyleName, resetExpanded, saveSettings, setAlignment, setCaption, setCloseable, setCompanion, setContentSwitchMode, setDescription, setDsContext, setEnabled, setExpandRatio, setFocusComponent, setFrame, setHeight, setIcon, setIconFromSet, setId, setMargin, setMaxHeight, setMaxWidth, setMessagesPack, setMinHeight, setMinWidth, setParent, setResponsive, setSpacing, setStyleName, setVisible, setWidth, setWindow, setXmlDescriptor, showValidationErrors, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, validate, validate, validateAll, withUnwrapped, withUnwrappedCompositionaddAfterCloseListener, addAfterDetachListener, addAfterInitListener, addAfterShowListener, addBeforeCloseListener, addBeforeShowListener, addInitListener, addUrlParamsChangeListener, applyDataLoadingSettings, close, close, closeWithDefaultAction, fireEvent, getBeanLocator, getEventHub, getExtensions, getId, getScreenData, getUiEventListeners, getWindow, isMultipleOpen, isSaveScreenHistoryOnClose, isSaveSettingsOnClose, setBeanLocator, setExtensions, setScreenData, setUiEventListeners, showclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddBeforeCloseWithCloseButtonListener, addBeforeCloseWithShortcutListener, addBeforeWindowCloseListener, addCloseListener, addCloseWithCommitListener, addListener, addTimer, applySettings, close, close, closeAndRun, deleteSettings, getContext, getDialogOptions, getFocusComponent, getFrameOwner, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getSettings, getTimer, getWindowManager, isCloseable, removeBeforeCloseWithCloseButtonListener, removeBeforeCloseWithShortcutListener, removeBeforeWindowCloseListener, removeCloseListener, removeCloseWithCommitListener, removeListener, saveSettings, setCloseable, setFocusComponent, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, validate, validateAlladdFacet, getFacet, getFacetNN, getFacets, isValid, removeFacet, validateexpand, expand, getExpandDirection, isExpanded, resetExpandedadd, getComponent, getComponentNN, indexOfadd, add, focusFirstComponent, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, getOwnComponentsStream, remove, remove, removeAlladdStyleName, getAlignment, getHeight, getHeightSizeUnit, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, getWidthUnits, isEnabled, isEnabledItself, isEnabledRecursive, isResponsive, isVisible, isVisibleItself, isVisibleRecursive, removeStyleName, requestFocus, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositiongetFrame, setFramegetSpacing, setSpacinggetMargin, setMargin, setMargin, setMarginaddAction, addAction, getAction, getActionNN, getActions, getSubPart, removeAction, removeAction, removeAllActionsgetIcon, setIcon, setIconFromSetgetCaption, setCaptiongetDescription, setDescriptionopenEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openFrame, openFrame, openLookup, openLookup, openLookup, openLookup, openWindow, openWindow, showMessageDialog, showNotification, showNotification, showNotification, showOptionDialog, showOptionDialog, showWebPagegetExpandRatio, setExpandRatiogetCompanion, getContext, getDsContext, getMessagesPack, getXmlDescriptor, isValid, setDsContext, setMessagesPack, setXmlDescriptor, validate, validate, validateAllgetComponent, getCompositiongetWrappedFrame@Inject protected ScreenPermissionsFrame screensTabFrame
@Inject protected EntityStates entityStates
@Inject protected Datasource<Role> roleDs
@Inject protected Button windowCommitAndClose
@Inject protected Button windowCommit
@Inject protected TextField name
@Inject protected LookupField securityScopeLookup
@Inject protected TextArea description
@Inject protected TextField locName
@Inject protected CheckBox defaultRole
@Inject protected SecurityScopesService securityScopesService
@Inject protected RolesService rolesService
@Inject protected LookupField<RoleType> typeLookup
@Inject protected Label<java.lang.String> typeLookupLabel
@Inject protected Label<java.lang.String> superRoleLabel
protected void initNewItem(Role item)
AbstractEditorAbstractEditor.setItem(com.haulmont.cuba.core.entity.Entity) when
the editor is opened for a new entity instance. Allows to additionally initialize the new entity instance
before setting it into the datasource.initNewItem in class AbstractEditor<Role>item - entity instanceprotected void postInit()
AbstractEditorAbstractEditor.setItem(com.haulmont.cuba.core.entity.Entity).
At the moment of calling the main datasource is initialized and AbstractEditor.getItem() returns reloaded entity instance.
AbstractEditor.postCommit(boolean, boolean) if the window is not closed after
commit. Then AbstractEditor.getItem() contains instance, returned from DataService.commit().
This is useful for initialization of components that have to show fresh information from the current instance.
protected void postInit() {
if (!PersistenceHelper.isNew(getItem())) {
diffFrame.loadVersions(getItem());
entityLogDs.refresh();
}
}
postInit in class AbstractEditor<Role>public boolean preCommit()
AbstractEditorpreCommit in class AbstractEditor<Role>protected void restrictAccessForPredefinedRole()
protected void initSecurityScopes()
protected void initUiBySecurityVersion()