public class EntityCombinedScreen extends AbstractLookup
io.jmix.ui.screen.Screen.AfterCloseEvent, io.jmix.ui.screen.Screen.AfterDetachEvent, io.jmix.ui.screen.Screen.AfterInitEvent, io.jmix.ui.screen.Screen.AfterShowEvent, io.jmix.ui.screen.Screen.BeforeCloseEvent, io.jmix.ui.screen.Screen.BeforeShowEvent, io.jmix.ui.screen.Screen.InitEventWindow.Lookup.Handler, Window.Lookup.ValidatorWindow.BeforeCloseWithCloseButtonEvent, Window.BeforeCloseWithShortcutEvent, Window.CloseListener, Window.CloseWithCommitListener, Window.Editor<T>, Window.HasFoldersPane, Window.Lookup<T>, Window.TopLevelWindow, Window.Wrapperio.jmix.ui.component.Window.BeforeCloseEvent, io.jmix.ui.component.Window.CloseOrigin, io.jmix.ui.component.Window.Committable, io.jmix.ui.component.Window.ContentSwitchMode, io.jmix.ui.component.Window.HasUserIndicator, io.jmix.ui.component.Window.HasWorkAreaFrame.MessageMode, Frame.MessageType, Frame.NotificationType| 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, messageTools, 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_ID| 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 io.jmix.ui.component.ComponentContainer |
getActionsPane()
Returns the container with edit actions (save, cancel).
|
protected io.jmix.ui.component.ComponentContainer |
getEditBox()
Returns the right container with edit components.
|
protected FieldGroup |
getFieldGroup()
Returns the field group.
|
protected io.jmix.ui.component.ComponentContainer |
getLookupBox()
Returns the left container with browse components.
|
protected io.jmix.core.metamodel.model.MetaClass |
getMetaClassForLocking(io.jmix.core.Entity item) |
protected ListComponent |
getTable()
Returns the browse table.
|
protected io.jmix.ui.component.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(io.jmix.core.Entity item)
Hook to be implemented in subclasses.
|
protected void |
initShortcuts()
Adds ESCAPE shortcut that invokes cancel() method.
|
protected boolean |
lockIfNeeded(io.jmix.core.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.
|
protected boolean |
validateEditor()
Validates editor fields.
|
afterInit, getLookupComponent, getSelectHandler, getSelectValidator, initLookupActions, initLookupLayout, selectItemsOnClick, setLookupComponent, setSelectHandler, setSelectValidator, setupCommitShortcut, setupLookupComponentadd, add, addAction, addAction, addBeforeWindowCloseListener, addFacet, addStyleName, afterShow, applyDataLoadingSettings, 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, getWidth, getWidthSizeUnit, getWindowManager, getWrappedFrame, getWrappedWindow, getXmlDescriptor, handleValidationErrors, hasUnsavedChanges, indexOf, init, initEnableEditingActionStub, isAttributeAccessControlEnabled, isCloseable, isEnabled, isEnabledRecursive, isExpanded, isResponsive, isSameScreen, isValid, isVisible, isVisibleRecursive, onAfterDetach, 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, validateAdditionalRules, validateAll, withUnwrapped, withUnwrappedCompositionaddAfterCloseListener, addAfterDetachListener, addAfterInitListener, addAfterShowListener, addBeforeCloseListener, addBeforeShowListener, addInitListener, addUrlParamsChangeListener, close, close, closeWithDefaultAction, fireEvent, getApplicationContext, getEventHub, getExtensions, getId, getScreenData, getUiEventListeners, getWindow, isMultipleOpen, setApplicationContext, setExtensions, setScreenData, setUiEventListeners, showclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLookupHandler, getLookupValidator, setLookupHandler, setLookupValidatoraddBeforeCloseWithCloseButtonListener, addBeforeCloseWithShortcutListener, addCloseListener, addListener, close, close, getContext, getDialogOptions, getWindowManager, removeBeforeCloseWithCloseButtonListener, removeBeforeCloseWithShortcutListener, removeBeforeWindowCloseListener, removeCloseListener, removeListeneraddBeforeWindowCloseListener, getFocusComponent, getFrameOwner, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, isCloseable, setCloseable, setFocusComponent, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, validate, validateAlladdFacet, getFacet, getFacetNN, getFacets, isValid, removeFacet, validateadd, getComponent, getComponentNN, indexOfgetMargin, setMargin, setMargin, setMarginaddAction, addAction, getAction, getActionNN, getActions, getSubPart, removeAction, removeAction, removeAllActionsgetExpandRatio, setExpandRatioexpandexpand, getExpandDirection, isExpanded, resetExpandedadd, add, remove, remove, removeAllfocusFirstComponent, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, getOwnComponentsStreamopenEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openEditor, openFrame, openFrame, openLookup, openLookup, openLookup, openLookup, openWindow, openWindow, showMessageDialog, showNotification, showNotification, showNotification, showOptionDialog, showOptionDialog, showWebPagegetCompanion, getContext, getDsContext, getMessagesPack, getXmlDescriptor, isValid, setDsContext, setMessagesPack, setXmlDescriptor, validate, validate, validateAllgetComponent, getCompositiongetWrappedFrameprotected boolean creating
protected boolean editing
protected boolean justLocked
protected io.jmix.ui.component.ComponentContainer getLookupBox()
protected ListComponent getTable()
protected io.jmix.ui.component.ComponentContainer getEditBox()
@Nullable protected io.jmix.ui.component.TabSheet getTabSheet()
protected FieldGroup getFieldGroup()
protected io.jmix.ui.component.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(io.jmix.core.Entity item)
item - new entity instanceprotected void initBrowseEditAction()
protected boolean lockIfNeeded(io.jmix.core.Entity entity)
protected void releaseLock()
protected io.jmix.core.metamodel.model.MetaClass getMetaClassForLocking(io.jmix.core.Entity item)
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 versaprotected boolean validateEditor()
public void save()
public void cancel()