public abstract class AbstractValueComponent<T extends com.vaadin.ui.Component & com.vaadin.data.HasValue<P>,P,V> extends AbstractComponent<T> implements HasValue<V>, HasValueSource<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 V |
internalValue |
protected UiTestIdsSupport |
uiTestIdsSupport |
protected ValueBinding<V> |
valueBinding |
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Constructor and Description |
---|
AbstractValueComponent() |
Modifier and Type | Method and Description |
---|---|
io.jmix.core.common.event.Subscription |
addValueChangeListener(java.util.function.Consumer<HasValue.ValueChangeEvent<V>> listener) |
protected void |
commit() |
protected void |
componentValueChanged(P prevComponentValue,
P newComponentValue,
boolean isUserOriginated) |
protected V |
convertToModel(P componentRawValue) |
protected P |
convertToPresentation(V modelValue) |
protected void |
discard() |
protected boolean |
fieldValueEquals(V value,
V oldValue) |
V |
getValue() |
ValueSource<V> |
getValueSource() |
protected boolean |
isBuffered() |
protected boolean |
isModified() |
protected void |
setBuffered(boolean buffered) |
protected void |
setUiTestId(ValueSource<V> valueSource) |
void |
setUiTestIdsSupport(UiTestIdsSupport uiTestIdsSupport) |
void |
setValue(V value) |
void |
setValueSource(ValueSource<V> valueSource)
Sets value source for component.
|
protected void |
setValueToPresentation(P value) |
protected void |
valueBindingActivated(ValueSource<V> valueSource) |
protected void |
valueBindingConnected(ValueSource<V> valueSource) |
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, 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, setParent, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, getEmptyValue, isEmpty
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, 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
protected V internalValue
protected ValueBinding<V> valueBinding
protected UiTestIdsSupport uiTestIdsSupport
@Autowired public void setUiTestIdsSupport(UiTestIdsSupport uiTestIdsSupport)
public void setValueSource(@Nullable ValueSource<V> valueSource)
HasValueSource
setValueSource
in interface HasValueSource<V>
valueSource
- value sourceprotected void setUiTestId(ValueSource<V> valueSource)
protected void valueBindingConnected(ValueSource<V> valueSource)
protected void valueBindingActivated(ValueSource<V> valueSource)
@Nullable public ValueSource<V> getValueSource()
getValueSource
in interface HasValueSource<V>
public io.jmix.core.common.event.Subscription addValueChangeListener(java.util.function.Consumer<HasValue.ValueChangeEvent<V>> listener)
addValueChangeListener
in interface HasValue<V>
protected void setValueToPresentation(@Nullable P value)
protected void componentValueChanged(P prevComponentValue, P newComponentValue, boolean isUserOriginated)
@Nullable protected V convertToModel(@Nullable P componentRawValue) throws ConversionException
ConversionException
@Nullable protected P convertToPresentation(@Nullable V modelValue) throws ConversionException
ConversionException
protected void commit()
protected void discard()
protected boolean isBuffered()
protected void setBuffered(boolean buffered)
protected boolean isModified()