Skip to content

Configuring Edit Form Fields

ikostenko edited this page Apr 21, 2013 · 11 revisions

Only transient fields of an entity can be shown on the Edit Form. The list of supported field types is the same as for [List View, Quick View and Show View](Configuring list view, quick view, and show view display). Once added, a field is available for editing.

Configuration of the Edit Form consists of two parts:

  1. defining the list of fields to be displayed in the formView() method of the entity configuration (can be omitted, in which case all entity persistent fields will be displayed);
  2. specifying formatting and validation rules for a field. It is done by marking the field declaration in the entity class definition with a specific annotation. For example:
    • to display a date picker for a Date field, @Temporal should be used;
    • to add validation to a field, one of JSR-303 annotations should be used (e.g. @NotNull to mark a field as required, @Size( min = 10, max = 100) to restrict input value length, etc);

Clone this wiki locally