Package com.onec.ui

Class EntityConfigBuilder

java.lang.Object
com.onec.ui.EntityConfigBuilder

public class EntityConfigBuilder extends Object
Per-entity configuration scope passed to lambdas on SectionBuilder.catalog/document/register.

Today this exposes only field-level hints (replacing @UiHint). Future entity-level UI knobs (default sort, list columns subset, form grouping order, etc.) belong here too.

  • Constructor Details

    • EntityConfigBuilder

      public EntityConfigBuilder()
  • Method Details

    • field

      public FieldHintBuilder field(String name)
    • relatedList

      public RelatedListBuilder relatedList(String name, Class<?> joinCatalog)
      Declare an inline related-list (child rows) panel for this catalog editor, backed by a join catalog — the catalog-side analogue of a document's @TabularSection. Point it at the join @Catalog class, then say which Ref scopes rows to this record (via) and which Ref to show/pick per row (display):
       f.relatedList("doctors", ClinicDoctor.class).via("clinic").display("doctor");
       

      See RelatedList. Editor-only — no schema change; rows are read/written live against the join catalog.

    • action

      public ActionHintBuilder action(String name)
      Configure where a detail-header action shows: post, unpost, edit or delete. By default Post is a primary button and the rest live in the overflow (⋯) menu; override per action with .primary(), .inMenu() or .hidden().
    • icon

      public EntityConfigBuilder icon(String icon)
      The nav icon for this entity — any lucide icon name (e.g. "key", "calendar-check"). Honored over the keyword heuristic, so an authored icon always wins. Blank means "fall back to the heuristic".
    • buildFieldHints

      public Map<String,FieldHint> buildFieldHints()
    • buildRelatedLists

      public List<RelatedList> buildRelatedLists()
      Related-list panels authored on this entity, in declaration order.