Class AbstractFieldComponentConverter<T extends DataComponent & LabeledComponent>

java.lang.Object
ch.tocco.nice2.model.form.spi.converter.AbstractFieldComponentConverter<T>
All Implemented Interfaces:
FieldComponentConverter
Direct Known Subclasses:
BinaryToDocumentFieldConverter, BirthDateToBirthDateFieldConverter, BooleanToCheckboxConverter, CustomDataToCustomDataFieldConverter, DatetimeToDateFieldConverter, DatetimeToDatetimeFieldConverter, DateToDateFieldConverter, DateToDateRangeFieldConverter, DecimalToNumberFieldConverter, DocumentToDocumentFieldConverter, DoubleToNumberFieldConverter, DurationToDurationFieldConverter, DurationToDurationRangeFieldConverter, EmailToEmailFieldConverter, EnumToSelectBoxConverter, ImageToImageFieldConverter, IntegerToNumberFieldConverter, LatitudeToComponentConverter, LoginToLoginFieldConverter, LongitudeToComponentConverter, LongToNumberFieldConverter, MoneyAmountToMoneyAmountFieldConverter, NumberToNumberRangeFieldConverter, PasswordToCreatePasswordFieldConverter, PercentToPercentFieldConverter, PhoneToPhoneFieldConverter, StringToTextFieldConverter, StringToUploadFieldConverter, TextToHtmlFieldConverter, TextToTextAreaConverter, TimeToTimeFieldConverter, TimeToTimeRangeFieldConverter, UrlToUrlFieldConverter, UuidToUuidFieldConverter

@Deprecated public abstract class AbstractFieldComponentConverter<T extends DataComponent & LabeledComponent> extends Object implements FieldComponentConverter
Deprecated.
Basic convertion for any Field to a concrete Component.

You need to specify the interface with getInterfaceClass() and the concrete implementation-class with getImplClass(). The special-behaviors of the component are specified within the mapFields(T, ch.tocco.nice2.model.form.api.components.simple.Field, ch.tocco.nice2.model.entity.api.FieldModel)-method.

Default-fields like Label, Name and Position will be copied.

  • Constructor Details

    • AbstractFieldComponentConverter

      public AbstractFieldComponentConverter()
      Deprecated.
  • Method Details

    • convert

      public final Component convert(Field field, FieldModel fieldInfo)
      Deprecated.
      Specified by:
      convert in interface FieldComponentConverter
    • mapFields

      protected void mapFields(T newField, Field field, FieldModel fieldInfo)
      Deprecated.
      Implement and assign field-specific stuff.
      Parameters:
      newField - The new, specific field (target), for example "text" field.
      field - The generic "field" (source).
    • getImplClass

      protected abstract Class<? extends T> getImplClass()
      Deprecated.
    • getInterfaceClass

      protected abstract Class<T> getInterfaceClass()
      Deprecated.