Class DataAwareComponentsTools

java.lang.Object
io.jmix.ui.component.data.DataAwareComponentsTools

@Component("ui_DataAwareComponentsTools") public class DataAwareComponentsTools extends Object
Utillity bean that provides typical data aware operations with UI components.
  • Field Details

  • Constructor Details

    • DataAwareComponentsTools

      public DataAwareComponentsTools()
  • Method Details

    • setupCaseConversion

      public void setupCaseConversion(TextInputField.CaseConversionSupported component, EntityValueSource valueSource)
      Sets case conversion using CaseConversion annotation on entity property.
      Parameters:
      component - UI component
      valueSource - value source
    • setupMaxLength

      public void setupMaxLength(TextInputField.MaxLengthLimited component, EntityValueSource valueSource)
      Sets max length for textual UI component using Entity metadata.
      Parameters:
      component - UI component
      valueSource - value source
    • setupDateRange

      public void setupDateRange(HasRange component, EntityValueSource valueSource)
    • setupZoneId

      public void setupZoneId(DateField component, EntityValueSource valueSource)
    • setupDateFormat

      public void setupDateFormat(DateField component, EntityValueSource valueSource)
    • setupDateFormat

      public void setupDateFormat(DateField component, MetaProperty metaProperty)
    • setupDateFormat

      public void setupDateFormat(DateField component, Class valueType)
    • getTemporalType

      @Nullable protected javax.persistence.TemporalType getTemporalType(@Nullable MetaProperty metaProperty, Class javaType)
    • setupTemporalType

      protected void setupTemporalType(DateField component, @Nullable javax.persistence.TemporalType temporalType)
    • checkValueSourceDatatypeMismatch

      public void checkValueSourceDatatypeMismatch(@Nullable Datatype datatype, @Nullable ValueSource valueSource)
      Throws IllegalArgumentException if component's ValueSource and Datatype have different types.
      Parameters:
      datatype - datatype
      valueSource - component's value source
    • setupOptions

      public void setupOptions(OptionsField optionsField, EntityValueSource valueSource)