public class EntityCombinedScreen extends AbstractLookup
Screen.AfterCloseEvent, Screen.AfterDetachEvent, Screen.AfterInitEvent, Screen.AfterShowEvent, Screen.BeforeCloseEvent, Screen.BeforeShowEvent, Screen.InitEventWindow.Lookup.Handler, Window.Lookup.ValidatorWindow.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.OptionsStyleProviderLookupScreen.ValidationContext<T extends Entity>| Modifier and Type | Field and Description |
|---|---|
protected boolean |
creating
Indicates that a new instance of entity is being created.
|
protected boolean |
editing
Indicates that the screen is in editing mode.
|
protected boolean |
justLocked
Indicates that edited entity is pessimistically locked.
|
frame, messages, UNKNOWN_CLOSE_ACTION_IDLOOKUP_ENTER_PRESSED_ACTION_ID, LOOKUP_ITEM_CLICK_ACTION_ID, NAMEBROWSE_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_PIXELSLOOKUP_CANCEL_ACTION_ID, LOOKUP_SELECT_ACTION_ID, LOOKUP_SELECT_CLOSE_ACTIONNO_OPTIONS, WINDOW_CLOSE_ACTION, WINDOW_COMMIT_AND_CLOSE_ACTION, WINDOW_DISCARD_AND_CLOSE_ACTION| Constructor and Description |
|---|
EntityCombinedScreen() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Method that is invoked by clicking Cancel button, discards changes and disables controls for editing.
|
protected void |
disableEditControls()
Disables edit controls.
|
protected void |
enableEditControls(boolean creating)
Enables controls for editing.
|
protected ComponentContainer |
getActionsPane()
Returns the container with edit actions (save, cancel).
|
protected ComponentContainer |
getEditBox()
Returns the right container with edit components.
|
protected FieldGroup |
getFieldGroup()
Returns the field group.
|
protected ComponentContainer |
getLookupBox()
Returns the left container with browse components.
|
protected MetaClass |
getMetaClassForLocking(Entity item) |
protected ListComponent |
getTable()
Returns the browse table.
|
protected TabSheet |
getTabSheet()
Returns the tab sheet with edit components.
|
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 void |
initBrowseCreateAction()
Adds a CreateAction that removes selection in table, sets a newly created item to editDs
and enables controls for record editing.
|
protected void |
initBrowseEditAction()
Adds an EditAction that enables controls for editing.
|
protected void |
initBrowseItemChangeListener()
Adds a listener that reloads the selected record with the specified view and sets it to editDs.
|
protected void |
initBrowseRemoveAction()
Adds AfterRemoveHandler for table's Remove action to reset the record contained in editDs.
|
protected void |
initEditComponents(boolean enabled)
Initializes edit controls, depending on if they should be enabled or disabled.
|
protected void |
initNewItem(Entity item)
Hook to be implemented in subclasses.
|
protected void |
initShortcuts()
Adds ESCAPE shortcut that invokes cancel() method.
|
protected boolean |
lockIfNeeded(Entity entity)
Pessimistic lock before start of editing, if it is configured for the entity.
|
protected void |
refreshOptionsForLookupFields() |
protected void |
releaseLock()
Release pessimistic lock if it was applied.
|
void |
save()
Method that is invoked by clicking Ok button after editing an existing or creating a new record.
|
afterInit, getLookupComponent, getSelectHandler, getSelectValidator, initLookupActions, initLookupLayout, selectItemsOnClick, setLookupComponent, setSelectHandler, setSelectValidator, setupCommitShortcut, setupLookupComponentadd, 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, hasUnsavedChanges, indexOf, 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, validateAdditionalRules, validateAlladdAfterCloseListener, 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, showclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLookupHandler, getLookupValidator, setLookupHandler, setLookupValidatoraddBeforeCloseWithCloseButtonListener, 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, unwrapCompositiongetFrame, 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, getCompositiongetWrappedFrameprotected boolean creating
protected boolean editing
protected boolean justLocked
protected ComponentContainer getLookupBox()
protected ListComponent getTable()
protected ComponentContainer getEditBox()
@Nullable protected TabSheet getTabSheet()
protected FieldGroup getFieldGroup()
protected ComponentContainer getActionsPane()
public void init(java.util.Map<java.lang.String,java.lang.Object> params)
AbstractWindowinit in class AbstractWindowparams - 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 void initBrowseItemChangeListener()
protected void initBrowseCreateAction()
protected void initNewItem(Entity item)
item - new entity instanceprotected void initBrowseEditAction()
protected boolean lockIfNeeded(Entity entity)
protected void releaseLock()
protected void initBrowseRemoveAction()
protected void initShortcuts()
protected void refreshOptionsForLookupFields()
protected void enableEditControls(boolean creating)
creating - indicates that a new instance is being createdprotected void disableEditControls()
protected void initEditComponents(boolean enabled)
enabled - if true - enables edit controls and disables controls on the left side of the splitter
if false - vice versapublic void save()
public void cancel()