Package com.onec.ui

Class FieldHintBuilder

java.lang.Object
com.onec.ui.FieldHintBuilder

public class FieldHintBuilder extends Object
Per-field hint builder. Obtained from EntityConfigBuilder.field(String) inside a lambda passed to SectionBuilder.catalog/document/register.

Chain field-level setters; call field(String) to switch to another field on the same entity. Anything not set falls through to @UiHint (deprecated) or the scanner default.

  • Method Details

    • order

      public FieldHintBuilder order(int order)
    • group

      public FieldHintBuilder group(String group)
    • width

      public FieldHintBuilder width(String width)
    • widget

      public FieldHintBuilder widget(String widget)
      Override the control used to edit this field. Built-in hints include "switch"/ "toggle" (boolean), "textarea", "map"/"geo" (a "lat,lng" string), and the media widgets "image"/"photo", "avatar" (small round), "images"/"gallery"/"photos" (several), and "file" (any type). The media widgets stream the chosen file to POST /api/media and store only the returned reference URL, so a plain String attribute holds it — see com.onec.ui.media.
    • placeholder

      public FieldHintBuilder placeholder(String placeholder)
      Placeholder text shown in this field's empty input on the edit form.
    • format

      public FieldHintBuilder format(String format)
      How this field's value is displayed in tables (list) and the detail surface. The hint is interpreted by value type:
      • Dates / date-times — a date pattern, e.g. "dd-MM-yy", "dd/MM/yyyy HH:mm" (uppercase D/Y are accepted as day/year).
      • Numbers"integer", "decimal", "percent", "currency" (or "currency:EUR"), or a decimal pattern like "#,##0.00".
      It does not affect the edit form's input control (use widget(String) for that).
    • hint

      public FieldHintBuilder hint(String hint)
      Optional help text for this field, surfaced in the UI as a hoverable ? icon next to the field's label (on the edit form, list column header, and read-only detail view). Keep it short — a sentence explaining what the field means or how to fill it in. Blank (default) shows no icon.
    • hideInList

      public FieldHintBuilder hideInList()
    • hideInForm

      public FieldHintBuilder hideInForm()
    • hideInDetail

      public FieldHintBuilder hideInDetail()
    • visibleInList

      public FieldHintBuilder visibleInList(boolean v)
    • visibleInForm

      public FieldHintBuilder visibleInForm(boolean v)
    • visibleInDetail

      public FieldHintBuilder visibleInDetail(boolean v)
    • field

      public FieldHintBuilder field(String name)
      Switch to configuring another field on the same entity.