Package io.jmix.ui.component.impl
Class EntityLinkFieldImpl<V>
java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<T>
io.jmix.ui.component.impl.AbstractValueComponent<T,P,V>
io.jmix.ui.component.impl.AbstractField<JmixButtonField<V>,V,V>
io.jmix.ui.component.impl.EntityLinkFieldImpl<V>
- All Implemented Interfaces:
AttachNotifier
,Component
,Component.BelongToFrame
,Component.Editable
,Component.Focusable
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Component.HasXmlDescriptor
,Component.Wrapper
,HasValueSource<V>
,EntityLinkField<V>
,Field<V>
,HasContextHelp
,HasDebugId
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,HasValidator<V>
,HasValue<V>
,Requirable
,Validatable
,org.springframework.beans.factory.InitializingBean
public class EntityLinkFieldImpl<V>
extends AbstractField<JmixButtonField<V>,V,V>
implements EntityLinkField<V>, org.springframework.beans.factory.InitializingBean
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.EntityLinkField
EntityLinkField.EditorCloseEvent<V>
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasValue
HasValue.ValueChangeEvent<V>
-
Field Summary
Modifier and TypeFieldDescriptionprotected Consumer<EntityLinkField>
protected Subscription
protected DatatypeRegistry
protected static final String
protected Messages
protected MetaClass
protected Metadata
protected MetadataTools
protected ListComponent
protected String
protected ScreenBuilders
protected OpenMode
protected WindowConfig
Fields inherited from class io.jmix.ui.component.impl.AbstractField
editable, parentEditableChangeListener, validators, VALIDATORS_LIST_INITIAL_CAPACITY
Fields inherited from class io.jmix.ui.component.impl.AbstractValueComponent
internalValue, uiTestIdsSupport, valueBinding
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Fields inherited from interface io.jmix.ui.component.EntityLinkField
NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddEditorCloseListener
(Consumer<EntityLinkField.EditorCloseEvent> editorCloseListener) Adds editor close listener.protected void
void
protected JmixButtonField<V>
protected void
fireEditorCloseEvent
(EditorScreen editorScreen, String closeActionId) void
focus()
Sets focus to this componentprotected CollectionContainer
protected MetaProperty
getOwner()
Styles implementation is client-type-specific.int
Gets the tabulator index of theHasTabIndex
component.protected void
protected void
void
setCustomClickHandler
(Consumer<EntityLinkField> clickHandler) Sets a custom click handler to the field.void
setDatatypeRegistry
(DatatypeRegistry datatypeRegistry) void
setMessages
(Messages messages) void
setMetaClass
(MetaClass metaClass) Sets field meta class.void
setMetadata
(Metadata metadata) void
setMetadataTools
(MetadataTools metadataTools) void
setOpenMode
(OpenMode openMode) Sets open mode for editor screen.void
setOwner
(ListComponent owner) Sets an owner list componentListComponent
to the field.void
Sets an editor screen id.void
setScreenBuilders
(ScreenBuilders screenBuilders) void
setScreenParams
(Map<String, Object> screenParams) void
setTabIndex
(int tabIndex) Sets the tabulator index of theFocusable
component.void
protected void
setValueSilently
(V item) Sets value to the component without triggering change listeners for ContainerValueSource.void
setWindowConfig
(WindowConfig windowConfig) Methods inherited from class io.jmix.ui.component.impl.AbstractField
addValidator, attachValueChangeListener, getDatatypeConversionErrorMsg, getDefaultRequiredMessage, getErrorMessage, getRequiredMessage, getValidators, isEditable, isRequired, isValid, removeValidator, setEditable, setEditableToComponent, setParent, setRequired, setRequiredMessage, setupComponentErrorProvider, triggerValidators, validate
Methods inherited from class io.jmix.ui.component.impl.AbstractValueComponent
addValueChangeListener, commit, componentValueChanged, convertToModel, convertToPresentation, discard, fieldValueEquals, getValue, getValueSource, isBuffered, isModified, setBuffered, setUiTestId, setUiTestIdsSupport, setValueSource, setValueToPresentation, valueBindingActivated, valueBindingConnected
Methods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditable
Methods inherited from interface io.jmix.ui.component.Component.Focusable
isFocusable, setFocusable
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods inherited from interface io.jmix.ui.component.HasValidator
addValidator, addValidators, getValidators, removeValidator
Methods inherited from interface io.jmix.ui.component.HasValue
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty
Methods inherited from interface io.jmix.ui.component.data.HasValueSource
getValueSource, setValueSource
Methods inherited from interface io.jmix.ui.component.Requirable
getRequiredMessage, isRequired, setRequired, setRequiredMessage
Methods inherited from interface io.jmix.ui.component.Validatable
isValid, isValidateOnCommit, validate
-
Field Details
-
EMPTY_VALUE_STYLENAME
- See Also:
-
clickHandler
-
screen
-
screenOpenMode
-
screenParams
-
metaClass
-
owner
-
closeListenerSubscription
-
metadata
-
metadataTools
-
screenBuilders
-
datatypeRegistry
-
messages
-
windowConfig
-
-
Constructor Details
-
EntityLinkFieldImpl
public EntityLinkFieldImpl()
-
-
Method Details
-
setMetadata
-
setMetadataTools
-
setScreenBuilders
-
setDatatypeRegistry
-
setMessages
-
setWindowConfig
-
createComponent
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
initComponent
protected void initComponent() -
getMetaClass
- Specified by:
getMetaClass
in interfaceEntityLinkField<V>
- Returns:
- a field meta class
-
setMetaClass
Description copied from interface:EntityLinkField
Sets field meta class.- Specified by:
setMetaClass
in interfaceEntityLinkField<V>
- Parameters:
metaClass
- a field meta class
-
getOwner
- Specified by:
getOwner
in interfaceEntityLinkField<V>
- Returns:
- owner list component
-
setOwner
Description copied from interface:EntityLinkField
Sets an owner list componentListComponent
to the field.- Specified by:
setOwner
in interfaceEntityLinkField<V>
- Parameters:
owner
- owner list component
-
setValue
- Specified by:
setValue
in interfaceHasValue<V>
- Overrides:
setValue
in classAbstractValueComponent<JmixButtonField<V>,
V, V>
-
getStyleName
Description copied from interface:Component
Styles implementation is client-type-specific.- Specified by:
getStyleName
in interfaceComponent
- Overrides:
getStyleName
in classAbstractComponent<JmixButtonField<V>>
- Returns:
- current style name.
-
getScreen
- Specified by:
getScreen
in interfaceEntityLinkField<V>
- Returns:
- an editor screen id
-
setScreen
Description copied from interface:EntityLinkField
Sets an editor screen id.- Specified by:
setScreen
in interfaceEntityLinkField<V>
- Parameters:
screen
- an editor screen id
-
getCustomClickHandler
- Specified by:
getCustomClickHandler
in interfaceEntityLinkField<V>
- Returns:
- click handler
-
setCustomClickHandler
Description copied from interface:EntityLinkField
Sets a custom click handler to the field.- Specified by:
setCustomClickHandler
in interfaceEntityLinkField<V>
- Parameters:
clickHandler
- click handler
-
getOpenMode
- Specified by:
getOpenMode
in interfaceEntityLinkField<V>
- Returns:
- open mode for editor screen
-
setOpenMode
Description copied from interface:EntityLinkField
Sets open mode for editor screen.- Specified by:
setOpenMode
in interfaceEntityLinkField<V>
- Parameters:
openMode
- open mode
-
getScreenParams
- Specified by:
getScreenParams
in interfaceEntityLinkField<V>
-
setScreenParams
- Specified by:
setScreenParams
in interfaceEntityLinkField<V>
-
addEditorCloseListener
public Subscription addEditorCloseListener(Consumer<EntityLinkField.EditorCloseEvent> editorCloseListener) Description copied from interface:EntityLinkField
Adds editor close listener.- Specified by:
addEditorCloseListener
in interfaceEntityLinkField<V>
- Parameters:
editorCloseListener
- a listener to set- Returns:
- subscription
-
openEntityEditor
protected void openEntityEditor() -
fireEditorCloseEvent
-
afterCommitOpenedEntity
-
getCollectionContainerFromOwner
-
getMetaPropertyForEditedValue
-
setValueSilently
Sets value to the component without triggering change listeners for ContainerValueSource.- Parameters:
item
- value
-
focus
public void focus()Description copied from interface:Component.Focusable
Sets focus to this component- Specified by:
focus
in interfaceComponent.Focusable
-
getTabIndex
public int getTabIndex()Description copied from interface:Component.Focusable
Gets the tabulator index of theHasTabIndex
component.- Specified by:
getTabIndex
in interfaceComponent.Focusable
- Returns:
- tab index set for the
HasTabIndex
component
-
setTabIndex
public void setTabIndex(int tabIndex) Description copied from interface:Component.Focusable
Sets the tabulator index of theFocusable
component. The tab index property is used to specify the order in which the fields are focused when the user presses the Tab key. Components with a defined tab index are focused sequentially first, and then the components with no tab index.- Specified by:
setTabIndex
in interfaceComponent.Focusable
- Parameters:
tabIndex
- tab index
-