Class AbstractValueComponent<T extends com.vaadin.ui.Component & com.vaadin.data.HasValue<P>,P,V>

java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<T>
io.jmix.ui.component.impl.AbstractValueComponent<T,P,V>
All Implemented Interfaces:
AttachNotifier, Component, Component.BelongToFrame, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper, HasValueSource<V>, HasContextHelp, HasDebugId, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer, HasValue<V>
Direct Known Subclasses:
AbstractField

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>
  • Field Details

    • internalValue

      protected V internalValue
    • valueBinding

      protected ValueBinding<V> valueBinding
    • uiTestIdsSupport

      protected UiTestIdsSupport uiTestIdsSupport
  • Constructor Details

    • AbstractValueComponent

      public AbstractValueComponent()
  • Method Details

    • setUiTestIdsSupport

      @Autowired public void setUiTestIdsSupport(UiTestIdsSupport uiTestIdsSupport)
    • setValueSource

      public void setValueSource(@Nullable ValueSource<V> valueSource)
      Description copied from interface: HasValueSource
      Sets value source for component.
      Specified by:
      setValueSource in interface HasValueSource<T extends com.vaadin.ui.Component & com.vaadin.data.HasValue<P>>
      Parameters:
      valueSource - value source
    • setUiTestId

      protected void setUiTestId(ValueSource<V> valueSource)
    • valueBindingConnected

      protected void valueBindingConnected(ValueSource<V> valueSource)
    • valueBindingActivated

      protected void valueBindingActivated(ValueSource<V> valueSource)
    • getValueSource

      @Nullable public ValueSource<V> getValueSource()
      Specified by:
      getValueSource in interface HasValueSource<T extends com.vaadin.ui.Component & com.vaadin.data.HasValue<P>>
      Returns:
      currently bound value source
    • getValue

      @Nullable public V getValue()
      Specified by:
      getValue in interface HasValue<T extends com.vaadin.ui.Component & com.vaadin.data.HasValue<P>>
    • setValue

      public void setValue(@Nullable V value)
      Specified by:
      setValue in interface HasValue<T extends com.vaadin.ui.Component & com.vaadin.data.HasValue<P>>
    • addValueChangeListener

      public Subscription addValueChangeListener(Consumer<HasValue.ValueChangeEvent<V>> listener)
      Specified by:
      addValueChangeListener in interface HasValue<T extends com.vaadin.ui.Component & com.vaadin.data.HasValue<P>>
    • setValueToPresentation

      protected void setValueToPresentation(@Nullable P value)
    • componentValueChanged

      protected void componentValueChanged(P prevComponentValue, P newComponentValue, boolean isUserOriginated)
    • convertToModel

      @Nullable protected V convertToModel(@Nullable P componentRawValue) throws ConversionException
      Throws:
      ConversionException
    • convertToPresentation

      @Nullable protected P convertToPresentation(@Nullable V modelValue) throws ConversionException
      Throws:
      ConversionException
    • fieldValueEquals

      protected boolean fieldValueEquals(@Nullable V value, @Nullable V oldValue)
    • commit

      protected void commit()
    • discard

      protected void discard()
    • isBuffered

      protected boolean isBuffered()
    • setBuffered

      protected void setBuffered(boolean buffered)
    • isModified

      protected boolean isModified()