Class Field

All Implemented Interfaces:
HasHandlers
Direct Known Subclasses:
DataSourceField, DBCField, FormItem

public class Field extends RefDataClass
Base type representing a field.

Field container implementations may extend this type with additional attributes and/or methods. For example, DataSource uses DataSourceField, DataBoundComponent uses DBCField, and ListGrid uses ListGridField (itself an extension of DBCField).

In general, Field instances should not be shared with multiple field containers.

  • Constructor Details

  • Method Details

    • getOrCreateRef

      public static Field getOrCreateRef(JavaScriptObject jsObj)
    • setCanEdit

      public Field setCanEdit(Boolean canEdit)
      If set to true, then values for the field are considered editable. If set to false, then values for the field cannot be edited. If null, then the determination is left to the field container.
      Parameters:
      canEdit - New canEdit value. Default value is null
      Returns:
      Field instance, for chaining setter calls
    • getCanEdit

      public Boolean getCanEdit()
      If set to true, then values for the field are considered editable. If set to false, then values for the field cannot be edited. If null, then the determination is left to the field container.
      Returns:
      Current canEdit value. Default value is null
    • setCanExport

      public Field setCanExport(Boolean canExport)
      If set to true, then values for the field are considered exportable. If set to false, then values for the field will not be exported. If null, then the determination is left to the field container.
      Parameters:
      canExport - New canExport value. Default value is null
      Returns:
      Field instance, for chaining setter calls
    • getCanExport

      public Boolean getCanExport()
      If set to true, then values for the field are considered exportable. If set to false, then values for the field will not be exported. If null, then the determination is left to the field container.
      Returns:
      Current canExport value. Default value is null
    • setEscapeHTML

      public Field setEscapeHTML(Boolean escapeHTML)
      If set to true, then values for the field will be HTML-escaped.
      Parameters:
      escapeHTML - New escapeHTML value. Default value is null
      Returns:
      Field instance, for chaining setter calls
    • getEscapeHTML

      public Boolean getEscapeHTML()
      If set to true, then values for the field will be HTML-escaped.
      Returns:
      Current escapeHTML value. Default value is null
    • setExportTitle

      public Field setExportTitle(String exportTitle)
      Optional title HTML to use for the field in exports.
      Parameters:
      exportTitle - New exportTitle value. Default value is null
      Returns:
      Field instance, for chaining setter calls
      See Also:
    • getExportTitle

      public String getExportTitle()
      Optional title HTML to use for the field in exports.
      Returns:
      Current exportTitle value. Default value is null
      See Also:
    • setMultiple

      public Field setMultiple(Boolean multiple)
      If set to true, then the field is array-valued.
      Parameters:
      multiple - New multiple value. Default value is null
      Returns:
      Field instance, for chaining setter calls
    • getMultiple

      public Boolean getMultiple()
      If set to true, then the field is array-valued.
      Returns:
      Current multiple value. Default value is null
    • setName

      public Field setName(String name)
      Name of the field.
      Parameters:
      name - New name value. Default value is null
      Returns:
      Field instance, for chaining setter calls
      See Also:
    • getName

      public String getName()
      Name of the field.
      Returns:
      Current name value. Default value is null
      See Also:
    • setRequired

      public Field setRequired(Boolean required)
      If set to true, then a value for this field is required to pass validation.
      Parameters:
      required - New required value. Default value is null
      Returns:
      Field instance, for chaining setter calls
    • setSortByField

      public Field setSortByField(String sortByField)
      If set to a field name, causes the field to be sorted by the values in the specified field, for both client- and server-side sorting.
      Parameters:
      sortByField - New sortByField value. Default value is null
      Returns:
      Field instance, for chaining setter calls
      See Also:
    • getSortByField

      public String getSortByField()
      If set to a field name, causes the field to be sorted by the values in the specified field, for both client- and server-side sorting.
      Returns:
      Current sortByField value. Default value is null
      See Also:
    • setTitle

      public Field setTitle(String title)
      An HTMLString to use as the displayable title for this field outside the context of a field container.

      Within a DataBoundComponent:

      • A field's title may be set with DataBoundComponent.setFieldTitle().
      • Always call the DataBoundComponent.getFieldTitle() method to obtain the field's title.
      Parameters:
      title - New title value. Default value is null
      Returns:
      Field instance, for chaining setter calls
      See Also:
    • getTitle

      public String getTitle()
      An HTMLString to use as the displayable title for this field outside the context of a field container.

      Within a DataBoundComponent:

      • A field's title may be set with DataBoundComponent.setFieldTitle().
      • Always call the DataBoundComponent.getFieldTitle() method to obtain the field's title.
      Returns:
      Current title value. Default value is null
      See Also:
    • setValueMap

      public Field setValueMap(Map valueMap)
      If set, specifies the set of legal values for the field.
      Parameters:
      valueMap - New valueMap value. Default value is null
      Returns:
      Field instance, for chaining setter calls
    • getValueMap

      public Map getValueMap()
      If set, specifies the set of legal values for the field.
      Returns:
      Current valueMap value. Default value is null