public class AttributeEditor extends AbstractEditor<CategoryAttribute>
CategoryAttribute
entities.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.MainWindow, 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
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 |
---|
AttributeEditor() |
Modifier and Type | Method and Description |
---|---|
protected void |
fillAttributeCode() |
protected void |
fillDefaultEntities(java.lang.Class entityClass) |
protected void |
fillSelectEntityScreens(java.lang.Class entityClass) |
void |
init(java.util.Map<java.lang.String,java.lang.Object> params)
Called by the framework after creation of all components and before showing the screen.
|
protected Action |
initCreateScreenAndComponentAction() |
protected void |
initFieldGroup() |
protected void |
initLocalizedFrame() |
void |
openConstraintWizard() |
protected void |
postInit()
Hook to be implemented in subclasses.
|
void |
postValidate(ValidationErrors errors)
Hook to be implemented in subclasses.
|
boolean |
preCommit()
Hook to be implemented in subclasses.
|
protected java.util.List<Suggestion> |
requestHint(SourceCodeEditor sender,
java.lang.String text,
int senderCursorPosition) |
afterWindowApplyPostInit, closeWithCommit, commit, commit, commitAndClose, commitInternal, getDatasourceInternal, getEditedEntity, getItem, getMetaClassForLocking, getParentDs, handlePreviouslyDeletedCompositionItems, hasUnsavedChanges, initCommitActions, initNewItem, isCrossFieldValidate, isLocked, isModified, isShowSaveNotification, postCommit, releaseLock, setCrossFieldValidate, setEntityToEdit, setItem, setItemInternal, setParentDs, setShowSaveNotification, validateAdditionalRules
add, add, addAction, addAction, addBeforeWindowCloseListener, 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, 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, isAttributeAccessControlEnabled, isCloseable, isEnabled, isEnabledRecursive, isExpanded, isResponsive, isSameScreen, isValid, isVisible, isVisibleRecursive, preClose, ready, remove, removeAction, removeAction, removeAll, removeAllActions, removeBeforeWindowCloseListener, 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, 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
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
protected static final com.google.common.collect.Multimap<PropertyType,java.lang.String> FIELDS_VISIBLE_FOR_DATATYPES
protected static final java.util.Set<java.lang.String> ALWAYS_VISIBLE_FIELDS
protected static final java.lang.String WHERE
protected CategoryAttribute attribute
@Inject protected FieldGroup attributeFieldGroup
protected LookupField<PropertyType> dataTypeField
protected LookupField<java.lang.String> screenField
protected LookupField<java.lang.String> entityTypeField
protected PickerField<Entity> defaultEntityField
protected java.lang.String fieldWidth
@Inject protected Datasource<CategoryAttribute> attributeDs
@Inject protected UiComponents uiComponents
@Inject protected Metadata metadata
@Inject protected MetadataTools metadataTools
@Inject protected MessageTools messageTools
@Inject protected DatatypeFormatter datatypeFormatter
@Inject protected ThemeConstants themeConstants
@Inject protected ScreensHelper screensHelper
@Inject protected DynamicAttributesGuiTools dynamicAttributesGuiTools
@Inject protected DataManager dataManager
@Inject protected ReferenceToEntitySupport referenceToEntitySupport
@Inject protected Table<ScreenAndComponent> targetScreensTable
@Inject protected TabSheet tabsheet
@Inject protected CollectionDatasource<ScreenAndComponent,java.util.UUID> screensDs
@Inject protected GlobalConfig globalConfig
@Inject protected ClientConfig clientConfig
@Inject protected Icons icons
protected LocalizedNameFrame localizedFrame
protected ListEditor<java.lang.String> enumerationListEditor
protected SourceCodeEditor joinField
protected SourceCodeEditor whereField
@Inject protected FilterParser filterParser
public void init(java.util.Map<java.lang.String,java.lang.Object> params)
AbstractWindow
init
in class AbstractWindow
params
- parameters passed from caller's code, usually from
HasWindowManager.openWindow(String, WindowManager.OpenType)
and similar methods, or set in
screens.xml
for this registered screenprotected Action initCreateScreenAndComponentAction()
protected void initLocalizedFrame()
protected void initFieldGroup()
public void openConstraintWizard()
protected void fillSelectEntityScreens(java.lang.Class entityClass)
protected void fillDefaultEntities(java.lang.Class entityClass)
protected void fillAttributeCode()
public boolean preCommit()
AbstractEditor
preCommit
in class AbstractEditor<CategoryAttribute>
public void postValidate(ValidationErrors errors)
AbstractWindow
AbstractWindow.validateAll()
at the end of standard validation.postValidate
in class AbstractWindow
errors
- the list of validation errors. Caller fills it by errors found during the default validation.
Overridden method should add into it errors found by custom validation.protected 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<CategoryAttribute>
protected java.util.List<Suggestion> requestHint(SourceCodeEditor sender, java.lang.String text, int senderCursorPosition)