public class ConstraintEditor extends AbstractEditor<Constraint>
Screen.AfterCloseEvent, Screen.AfterDetachEvent, Screen.AfterInitEvent, Screen.AfterShowEvent, Screen.BeforeCloseEvent, Screen.BeforeShowEvent, Screen.InitEvent
Window.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.Wrapper
Frame.MessageMode, Frame.MessageType, Frame.NotificationType
ExpandingLayout.ExpandDirection
Component.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 TextField<java.lang.String> |
code |
protected Label<java.lang.String> |
codeLabel |
protected Datasource<Constraint> |
constraint |
protected java.util.Map<java.lang.Object,java.lang.String> |
entities |
protected LookupField<java.lang.String> |
entityName |
protected ExtendedEntities |
extendedEntities |
protected SourceCodeEditor |
groovyScript |
protected Label<java.lang.String> |
groovyScriptLabel |
protected SourceCodeEditor |
joinClause |
protected Label<java.lang.String> |
joinClauseLabel |
protected Metadata |
metadata |
protected LookupField<ConstraintOperationType> |
operationType |
protected Security |
security |
protected static java.lang.String |
SESSION_PREFIX |
protected Button |
testConstraint |
protected LookupField<ConstraintCheckType> |
type |
protected UserManagementService |
userManagementService |
protected SourceCodeEditor |
whereClause |
protected Label<java.lang.String> |
whereClauseLabel |
protected WindowConfig |
windowConfig |
commitActionPerformed, crossFieldValidate, justLocked, readOnly, showSaveNotification
frame, messages, UNKNOWN_CLOSE_ACTION_ID
NAME
BROWSE_WINDOW_SUFFIX, CLOSE_ACTION_ID, COMMIT_ACTION_ID, CREATE_WINDOW_SUFFIX, EDITOR_WINDOW_SUFFIX, LOOKUP_WINDOW_SUFFIX, SELECT_ACTION_ID
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE, UNITS_PERCENTAGE, UNITS_PIXELS
WINDOW_CLOSE, WINDOW_COMMIT, WINDOW_COMMIT_AND_CLOSE
NO_OPTIONS, WINDOW_CLOSE_ACTION, WINDOW_COMMIT_AND_CLOSE_ACTION, WINDOW_DISCARD_AND_CLOSE_ACTION
Constructor and Description |
---|
ConstraintEditor() |
Modifier and Type | Method and Description |
---|---|
protected void |
addSpecificSuggestions(SourceCodeEditor sender,
java.lang.String text,
int cursorPosition,
java.util.List<Suggestion> suggestions) |
void |
getGroovyScriptHelp() |
void |
getJoinClauseHelp() |
void |
getWhereClauseHelp() |
protected boolean |
isUnavailableInSecurityConstraints(MetaClass metaClass) |
void |
openWizard() |
void |
postInit()
Hook to be implemented in subclasses.
|
protected java.util.List<Suggestion> |
requestHint(SourceCodeEditor sender,
java.lang.String text,
int cursorPosition) |
protected void |
setupVisibility() |
void |
testConstraint() |
afterWindowApplyPostInit, closeWithCommit, commit, commit, commitAndClose, commitInternal, getDatasourceInternal, getEditedEntity, getItem, getMetaClassForLocking, getParentDs, handlePreviouslyDeletedCompositionItems, hasUnsavedChanges, initCommitActions, initNewItem, isCrossFieldValidate, isLocked, isModified, isShowSaveNotification, postCommit, preCommit, releaseLock, setCrossFieldValidate, setEntityToEdit, setItem, setItemInternal, setParentDs, setShowSaveNotification, validateAdditionalRules
add, 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, 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, validate, validate, validateAll
addAfterCloseListener, addAfterDetachListener, addAfterInitListener, addAfterShowListener, addBeforeCloseListener, addBeforeShowListener, addInitListener, addUrlParamsChangeListener, applyDataLoadingSettings, close, closeWithDefaultAction, fireEvent, getBeanLocator, getEventHub, getExtensions, getId, getScreenData, getUiEventListeners, getWindow, isMultipleOpen, isSaveScreenHistoryOnClose, isSaveSettingsOnClose, setBeanLocator, setExtensions, setScreenData, setUiEventListeners, show
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addBeforeCloseWithCloseButtonListener, 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, validateAll
addFacet, getFacet, getFacetNN, getFacets, isValid, removeFacet, validate
expand, expand, getExpandDirection, isExpanded, resetExpanded
add, getComponent, getComponentNN, indexOf
add, add, focusFirstComponent, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, getOwnComponentsStream, remove, remove, removeAll
addStyleName, 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
getFrame, setFrame
getSpacing, setSpacing
getMargin, setMargin, setMargin, setMargin
addAction, addAction, getAction, getActionNN, getActions, getSubPart, removeAction, removeAction, removeAllActions
getIcon, setIcon, setIconFromSet
getCaption, setCaption
getDescription, setDescription
openEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openFrame, openFrame, openLookup, openLookup, openLookup, openLookup, openWindow, openWindow, showMessageDialog, showNotification, showNotification, showNotification, showOptionDialog, showOptionDialog, showWebPage
getExpandRatio, setExpandRatio
getCompanion, getContext, getDsContext, getMessagesPack, getXmlDescriptor, isValid, setDsContext, setMessagesPack, setXmlDescriptor, validate, validate, validateAll
getComponent, getComposition
getWrappedFrame
@Inject protected LookupField<java.lang.String> entityName
@Inject protected SourceCodeEditor joinClause
@Inject protected SourceCodeEditor whereClause
@Inject protected SourceCodeEditor groovyScript
@Inject protected Label<java.lang.String> groovyScriptLabel
@Inject protected Label<java.lang.String> joinClauseLabel
@Inject protected Label<java.lang.String> whereClauseLabel
@Inject protected Label<java.lang.String> codeLabel
@Inject protected TextField<java.lang.String> code
@Inject protected LookupField<ConstraintOperationType> operationType
@Inject protected LookupField<ConstraintCheckType> type
@Inject protected Datasource<Constraint> constraint
@Inject protected Metadata metadata
@Inject protected ExtendedEntities extendedEntities
@Inject protected Button testConstraint
@Inject protected WindowConfig windowConfig
@Inject protected UserManagementService userManagementService
@Inject protected Security security
protected java.util.Map<java.lang.Object,java.lang.String> entities
protected static final java.lang.String SESSION_PREFIX
public void postInit()
AbstractEditor
AbstractEditor.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<Constraint>
protected void setupVisibility()
protected boolean isUnavailableInSecurityConstraints(MetaClass metaClass)
protected java.util.List<Suggestion> requestHint(SourceCodeEditor sender, java.lang.String text, int cursorPosition)
protected void addSpecificSuggestions(SourceCodeEditor sender, java.lang.String text, int cursorPosition, java.util.List<Suggestion> suggestions)
public void getJoinClauseHelp()
public void getWhereClauseHelp()
public void getGroovyScriptHelp()
public void openWizard()
public void testConstraint()