public class EntityLinkFieldImpl<V> extends AbstractField<JmixButtonField<V>,V,V> implements EntityLinkField<V>, org.springframework.beans.factory.InitializingBean
EntityLinkField.EditorCloseEvent<V>
HasValue.ValueChangeEvent<V>
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
HasContextHelp.ContextHelpIconClickEvent
Modifier and Type | Field and Description |
---|---|
protected java.util.function.Consumer<EntityLinkField> |
clickHandler |
protected io.jmix.core.common.event.Subscription |
closeListenerSubscription |
protected io.jmix.core.metamodel.datatype.DatatypeRegistry |
datatypeRegistry |
protected static java.lang.String |
EMPTY_VALUE_STYLENAME |
protected io.jmix.core.Messages |
messages |
protected io.jmix.core.metamodel.model.MetaClass |
metaClass |
protected io.jmix.core.Metadata |
metadata |
protected io.jmix.core.MetadataTools |
metadataTools |
protected ListComponent |
owner |
protected java.lang.String |
screen |
protected ScreenBuilders |
screenBuilders |
protected OpenMode |
screenOpenMode |
protected java.util.Map<java.lang.String,java.lang.Object> |
screenParams |
protected WindowConfig |
windowConfig |
editable, parentEditableChangeListener, validators, VALIDATORS_LIST_INITIAL_CAPACITY
internalValue, uiTestIdsSupport, valueBinding
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
NAME
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Constructor and Description |
---|
EntityLinkFieldImpl() |
Modifier and Type | Method and Description |
---|---|
io.jmix.core.common.event.Subscription |
addEditorCloseListener(java.util.function.Consumer<EntityLinkField.EditorCloseEvent> editorCloseListener)
Adds editor close listener.
|
protected void |
afterCommitOpenedEntity(java.lang.Object item) |
void |
afterPropertiesSet() |
protected JmixButtonField<V> |
createComponent() |
protected void |
fireEditorCloseEvent(EditorScreen editorScreen,
java.lang.String closeActionId) |
void |
focus()
Sets focus to this component
|
protected CollectionContainer |
getCollectionContainerFromOwner() |
java.util.function.Consumer<EntityLinkField> |
getCustomClickHandler() |
io.jmix.core.metamodel.model.MetaClass |
getMetaClass() |
protected io.jmix.core.metamodel.model.MetaProperty |
getMetaPropertyForEditedValue() |
OpenMode |
getOpenMode() |
ListComponent |
getOwner() |
java.lang.String |
getScreen() |
java.util.Map<java.lang.String,java.lang.Object> |
getScreenParams() |
java.lang.String |
getStyleName()
Styles implementation is client-type-specific.
|
int |
getTabIndex()
Gets the tabulator index of the
HasTabIndex component. |
protected void |
initComponent() |
protected void |
openEntityEditor() |
void |
setCustomClickHandler(java.util.function.Consumer<EntityLinkField> clickHandler)
Sets a custom click handler to the field.
|
void |
setDatatypeRegistry(io.jmix.core.metamodel.datatype.DatatypeRegistry datatypeRegistry) |
void |
setMessages(io.jmix.core.Messages messages) |
void |
setMetaClass(io.jmix.core.metamodel.model.MetaClass metaClass)
Sets field meta class.
|
void |
setMetadata(io.jmix.core.Metadata metadata) |
void |
setMetadataTools(io.jmix.core.MetadataTools metadataTools) |
void |
setOpenMode(OpenMode openMode)
Sets open mode for editor screen.
|
void |
setOwner(ListComponent owner)
Sets an owner list component
ListComponent to the field. |
void |
setScreen(java.lang.String screen)
Sets an editor screen id.
|
void |
setScreenBuilders(ScreenBuilders screenBuilders) |
void |
setScreenParams(java.util.Map<java.lang.String,java.lang.Object> screenParams) |
void |
setTabIndex(int tabIndex)
Sets the tabulator index of the
Focusable component. |
void |
setValue(V value) |
protected void |
setValueSilently(V item)
Sets value to the component without triggering change listeners for ContainerValueSource.
|
void |
setWindowConfig(WindowConfig windowConfig) |
addValidator, attachValueChangeListener, getDatatypeConversionErrorMsg, getErrorMessage, getRequiredMessage, getValidators, isEditable, isRequired, isValid, removeValidator, setEditable, setEditableToComponent, setParent, setRequired, setRequiredMessage, setupComponentErrorProvider, triggerValidators, validate
addValueChangeListener, commit, componentValueChanged, convertToModel, convertToPresentation, discard, fieldValueEquals, getValue, getValueSource, isBuffered, isModified, setBuffered, setUiTestId, setUiTestIdsSupport, setValueSource, setValueToPresentation, valueBindingActivated, valueBindingConnected
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getValueSource, setValueSource
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty
isEditable, isEditableWithParent, setEditable
getFrame, setFrame
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
isValid, isValidateOnCommit, validate
getIcon, setIcon, setIconFromSet
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
addValidator, addValidators, getValidators, removeValidator
getRequiredMessage, isRequired, setRequired, setRequiredMessage
isFocusable, setFocusable
protected static final java.lang.String EMPTY_VALUE_STYLENAME
protected java.util.function.Consumer<EntityLinkField> clickHandler
protected java.lang.String screen
protected OpenMode screenOpenMode
protected java.util.Map<java.lang.String,java.lang.Object> screenParams
protected io.jmix.core.metamodel.model.MetaClass metaClass
protected ListComponent owner
protected io.jmix.core.common.event.Subscription closeListenerSubscription
protected io.jmix.core.Metadata metadata
protected io.jmix.core.MetadataTools metadataTools
protected ScreenBuilders screenBuilders
protected io.jmix.core.metamodel.datatype.DatatypeRegistry datatypeRegistry
protected io.jmix.core.Messages messages
protected WindowConfig windowConfig
@Autowired public void setMetadata(io.jmix.core.Metadata metadata)
@Autowired public void setMetadataTools(io.jmix.core.MetadataTools metadataTools)
@Autowired public void setScreenBuilders(ScreenBuilders screenBuilders)
@Autowired public void setDatatypeRegistry(io.jmix.core.metamodel.datatype.DatatypeRegistry datatypeRegistry)
@Autowired public void setMessages(io.jmix.core.Messages messages)
@Autowired public void setWindowConfig(WindowConfig windowConfig)
protected JmixButtonField<V> createComponent()
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
protected void initComponent()
@Nullable public io.jmix.core.metamodel.model.MetaClass getMetaClass()
getMetaClass
in interface EntityLinkField<V>
public void setMetaClass(@Nullable io.jmix.core.metamodel.model.MetaClass metaClass)
EntityLinkField
setMetaClass
in interface EntityLinkField<V>
metaClass
- a field meta class@Nullable public ListComponent getOwner()
getOwner
in interface EntityLinkField<V>
public void setOwner(ListComponent owner)
EntityLinkField
ListComponent
to the field.setOwner
in interface EntityLinkField<V>
owner
- owner list componentpublic void setValue(@Nullable V value)
setValue
in interface HasValue<V>
setValue
in class AbstractValueComponent<JmixButtonField<V>,V,V>
public java.lang.String getStyleName()
Component
getStyleName
in interface Component
getStyleName
in class AbstractComponent<JmixButtonField<V>>
public java.lang.String getScreen()
getScreen
in interface EntityLinkField<V>
public void setScreen(java.lang.String screen)
EntityLinkField
setScreen
in interface EntityLinkField<V>
screen
- an editor screen id@Nullable public java.util.function.Consumer<EntityLinkField> getCustomClickHandler()
getCustomClickHandler
in interface EntityLinkField<V>
public void setCustomClickHandler(@Nullable java.util.function.Consumer<EntityLinkField> clickHandler)
EntityLinkField
setCustomClickHandler
in interface EntityLinkField<V>
clickHandler
- click handlerpublic OpenMode getOpenMode()
getOpenMode
in interface EntityLinkField<V>
public void setOpenMode(OpenMode openMode)
EntityLinkField
setOpenMode
in interface EntityLinkField<V>
openMode
- open mode@Nullable public java.util.Map<java.lang.String,java.lang.Object> getScreenParams()
getScreenParams
in interface EntityLinkField<V>
public void setScreenParams(@Nullable java.util.Map<java.lang.String,java.lang.Object> screenParams)
setScreenParams
in interface EntityLinkField<V>
public io.jmix.core.common.event.Subscription addEditorCloseListener(java.util.function.Consumer<EntityLinkField.EditorCloseEvent> editorCloseListener)
EntityLinkField
addEditorCloseListener
in interface EntityLinkField<V>
editorCloseListener
- a listener to setprotected void openEntityEditor()
protected void fireEditorCloseEvent(@Nullable EditorScreen editorScreen, java.lang.String closeActionId)
protected void afterCommitOpenedEntity(java.lang.Object item)
@Nullable protected CollectionContainer getCollectionContainerFromOwner()
@Nullable protected io.jmix.core.metamodel.model.MetaProperty getMetaPropertyForEditedValue()
protected void setValueSilently(@Nullable V item)
item
- valuepublic void focus()
Component.Focusable
focus
in interface Component.Focusable
public int getTabIndex()
Component.Focusable
HasTabIndex
component.getTabIndex
in interface Component.Focusable
HasTabIndex
componentpublic void setTabIndex(int tabIndex)
Component.Focusable
Focusable
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.setTabIndex
in interface Component.Focusable
tabIndex
- tab index