Package su.onno.ui
Class EntityConfigBuilder<E>
java.lang.Object
su.onno.ui.EntityConfigBuilder<E>
Per-entity configuration scope passed to lambdas on
SectionBuilder.catalog/document/register.
Today this exposes field-level hints plus related lists and row/detail actions. Future entity-level UI knobs (default sort, list columns subset, form grouping order, etc.) belong here too.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConfigure where a detail-header action shows, keyed exactly as declared throughEntityView.actions(ActionSpec).Related-list panels authored on this entity, in declaration order.<V> FieldHintBuilder<E, Object> Configure a field using a compiler-checked getter reference.The nav icon for this entity — any lucide icon name (e.g.<T> FieldHintBuilder<E, T> Configure a Ref field while retaining its target type for target-field hints.<J> RelatedListBuilder<E, J> relatedList(String name, Class<J> junction) 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.<R,V> FieldHintBuilder <E, Object> rowField(Field<E, ? extends Collection<R>> section, Field<R, V> rowField) Configure a field inside a typed collection/tabular section.<R,T> FieldHintBuilder <E, T> rowRefField(Field<E, ? extends Collection<R>> section, Field<R, Ref<T>> rowField) Configure a Ref inside a typed collection/tabular section, retaining its target type.validation(String key, Class<? extends FormValidator> validator) Add debounced, dependency-aware live feedback to the generated form.
-
Constructor Details
-
EntityConfigBuilder
public EntityConfigBuilder()
-
-
Method Details
-
field
-
field
Configure a field using a compiler-checked getter reference. -
refField
Configure a Ref field while retaining its target type for target-field hints. -
rowField
public <R,V> FieldHintBuilder<E,Object> rowField(Field<E, ? extends Collection<R>> section, Field<R, V> rowField) Configure a field inside a typed collection/tabular section. -
rowRefField
public <R,T> FieldHintBuilder<E,T> rowRefField(Field<E, ? extends Collection<R>> section, Field<R, Ref<T>> rowField) Configure a Ref inside a typed collection/tabular section, retaining its target type. -
validation
Add debounced, dependency-aware live feedback to the generated form. The validator class must be a Spring bean; useFormValidationBuilder.dependsOn(java.lang.String...)to avoid unrelated calls. -
action
Configure where a detail-header action shows, keyed exactly as declared throughEntityView.actions(ActionSpec). Built-ins includepost,unpost,edit, anddelete; custom detail actions use their authored key too. By default Post is a primary button and the rest live in the overflow (⋯) menu; override with.primary(),.inMenu()or.hidden(). -
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
-
buildValidations
-
buildRelatedLists
Related-list panels authored on this entity, in declaration order.
-