java.lang.Object
ch.tocco.nice2.model.form.impl.form2.components.AbstractComponent
ch.tocco.nice2.model.form.impl.form2.components.FieldImpl
All Implemented Interfaces:
Component, DataComponent, Field, Cloneable
Direct Known Subclasses:
CodeFieldImpl, DocumentFieldImpl, FulltextSearchImpl, GeosearchFieldImpl, HtmlFieldImpl, LocationFieldImpl, RangeFieldImpl, RelationFieldImpl

public class FieldImpl extends AbstractComponent implements Field
  • Constructor Details

    • FieldImpl

      public FieldImpl()
  • Method Details

    • getPath

      public String getPath()
      Description copied from interface: Field
      The path from the base entity to the field or relation. The base entity is defined in the containing Form component.
      Specified by:
      getPath in interface Field
    • setPath

      public void setPath(String path)
    • getDataType

      public String getDataType()
      Description copied from interface: Field
      The data type of the field (e.g. date, datetime, string, ...).
      Specified by:
      getDataType in interface Field
    • setDataType

      public void setDataType(String dataType)
    • getDefaultValue

      @Nullable public @Nullable DefaultValueDescriptor getDefaultValue()
      Specified by:
      getDefaultValue in interface Field
      Returns:
      the default value for this form component as specified in the form xml.
    • setDefaultValue

      public void setDefaultValue(DefaultValueDescriptor defaultValue)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getDefaultLabel

      public String getDefaultLabel(Form form, TextResources textResources)
      Text resources are searched in the following order: Form: User_detail Path: relAddress.relAddress_type 1) 'forms.User_detail.relAddress.relAddress_type / 'forms.User_list.table.relAddress_type' 2) Label of FieldModel or RelationModel 3) 'entities.relAddress.relAddress_type'
      Specified by:
      getDefaultLabel in interface DataComponent
    • clone

      public FieldImpl clone() throws CloneNotSupportedException
      Overrides:
      clone in class AbstractComponent
      Throws:
      CloneNotSupportedException
    • getValidator

      public AndGroupValidator getValidator()
      Specified by:
      getValidator in interface Field
    • setValidator

      public void setValidator(AndGroupValidator validator)
    • setAutoCompleteEndpoint

      public void setAutoCompleteEndpoint(String autoCompleteEndpoint)
    • getAutoCompleteEndpoint

      public String getAutoCompleteEndpoint()
      Specified by:
      getAutoCompleteEndpoint in interface Field
    • getSimpleSearch

      public boolean getSimpleSearch()
      Specified by:
      getSimpleSearch in interface Field
    • setSimpleSearch

      public void setSimpleSearch(boolean simpleSearch)