Annotation Interface Widget


@Documented @Target({FIELD,METHOD}) @Retention(RUNTIME) public @interface Widget
Provides information about UI widget representing this field.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether to copy this field when creating duplicate record.
    boolean
    Whether the field should use current date/datetime as default value.
    Help text.
    boolean
    Whether to hide widget by default.
    boolean
    Use image widget for this binary field.
    boolean
    Whether to allow mass update on this field.
    boolean
    Should be used with String fields to mark whether to use multiline text widget.
    boolean
    Use password widget for this string field.
    boolean
    Whether the widget should be set readonly.
    List of the columns to be used to search this record.
    The name of the selection.
    Title for the UI widget.
    boolean
    Whether the field value is translatable.
  • Element Details

    • title

      String title
      Title for the UI widget.
      Returns:
      the title
      Default:
      ""
    • help

      String help
      Help text.
      Returns:
      help text
      Default:
      ""
    • readonly

      boolean readonly
      Whether the widget should be set readonly.
      Returns:
      true if marked as readonly, default is false
      Default:
      false
    • hidden

      boolean hidden
      Whether to hide widget by default.
      Returns:
      true if marked as hidden, default is false
      Default:
      false
    • multiline

      boolean multiline
      Should be used with String fields to mark whether to use multiline text widget.
      Returns:
      true if marked as multiline, default is false
      Default:
      false
    • image

      boolean image
      Use image widget for this binary field.
      Returns:
      true if marked as image, default is false
      Default:
      false
    • password

      boolean password
      Use password widget for this string field.
      Returns:
      true if marked as password, default is false
      Default:
      false
    • massUpdate

      boolean massUpdate
      Whether to allow mass update on this field.
      Returns:
      true if marked for mass update, default is false
      Default:
      false
    • copyable

      boolean copyable
      Whether to copy this field when creating duplicate record.
      Returns:
      true if marked as copyable, default is true
      Default:
      true
    • translatable

      boolean translatable
      Whether the field value is translatable.
      Returns:
      true if marked as translatable, default is false
      Default:
      false
    • defaultNow

      boolean defaultNow
      Whether the field should use current date/datetime as default value.
      Returns:
      true if "now" is given as defaultValue
      Default:
      false
    • search

      String[] search
      List of the columns to be used to search this record.

      Used by auto-complete widget. By default the same column will be searched. Also, in case of virtual column (computed values) specify the actual searchable columns.

      Returns:
      array if fields on which to search, default is empty
      Default:
      {}
    • selection

      String selection
      The name of the selection.
      Returns:
      name of the selection, default is empty
      Default:
      ""