Axelor Doc

Attributes

Most fields can set optional attributes:

  • title : The text displayed by the component as label.
  • help : Description of how the field should be used. Appears in a tooltip when the mouse passes over the field.
  • column : Specifies the use of a specific column name.
  • readonly : Specifies whether the field should be readonly default display.
  • hidden : Specifies whether the field should be hidden by default in the display.
  • required : Specifies whether the field is required or authorized null values.
  • unique : Specifies whether the field value must be single base (creates a unique constraint base)
  • index : Allows creation of an index on the field.
  • haskKey : If it is not a single field specifies whether the field can be used to compute the hash code and be used in the equals method.
  • min : Minimum Size field.
  • max : Maximum Size field.
  • initParam : Specifies whether the field should be used as a parameter to the constructor.
  • default : Specifies a default.
  • selection : In the case of a static field select, select the name.
  • formula : Specifies whether the field is a formula field using native SQL query.
  • nullable : Enables to put a zero value when the value is not given. For example, integers and decimals record type 0 and 0.0 respectively if their default values are null or empty.
  • selection : Specifies the static select to use.

In the case of a binary field:

  • image : Specifies whether the field will be used as an image (used by UI components). In the case of a date field or dateTime
  • tz : Specifies the use of timeZone. Default false.

In the case of a date or dateTime field, you can use the shortcut "now" in the default attribute.

In the case of a string field

  • multiline : Specifies whether the string is a multi-line text (used by UI components).
  • large : Specifies whether the text value is large (creating a CLOB base to increase the size).
  • nameColumn : Specifies whether the field is used as a name for the recording (used by UI components to display the record).
  • search : List the name of the entity fields separated by commas. Search for a record on all the fields specified in a search by autocompletion.

In the case of a decimal field:

  • precision : Total significant digits (before and after the comma).
  • scale : Number of digits in the decimal part.

In the case of relational fields, the following attributes may be defined:

  • ref : Full name of the class of the reference entity.
  • mappedBy : In the case of bi-directional relationship, against field specifies the part of the object-reference
  • orphan : Specifies whether records can be orphaned, for the deletion of the parent.
  • orderBy : Specify which field of the reference object to sort.