Package su.onno.ui
Class RelatedListBuilder<E,J>
java.lang.Object
su.onno.ui.RelatedListBuilder<E,J>
Builds one
RelatedList panel for a catalog editor. Obtained from
EntityConfigBuilder.relatedList(String, Class) inside an EntityView.fields(su.onno.ui.EntityConfigBuilder<E>)
lambda.
Chain via(String) / display(String) / columns(String...);
call relatedList(String, Class) to add another panel or field(String) to
switch back to per-field hints on the same entity.
-
Method Summary
Modifier and TypeMethodDescriptionExtra join-row fields to render as columns (e.g.final RelatedListBuilder<E, J> Compiler-checked join-row columns.TheReffield on the junction shown (and picked) per row — the "other side" of the relationship.<T> RelatedListBuilder<E, J> Compiler-checked reference shown as the related row's primary value.Switch back to configuring a plain field on the same entity.<V> FieldHintBuilder<E, Object> Switch back to a compiler-checked field on the owning entity.Hide this panel in the read/detail view, keeping it only in the edit form.Heading for the panel; blank derives one from the panel name.<K> RelatedListBuilder<E, K> relatedList(String name, Class<K> junction) Add another related-list panel on the same entity.TheReffield on the junction that scopes rows to the record being edited — the back-reference to this catalog.Compiler-checked back-reference to the entity owning this related list.
-
Method Details
-
via
TheReffield on the junction that scopes rows to the record being edited — the back-reference to this catalog. Required. -
via
Compiler-checked back-reference to the entity owning this related list. -
display
TheReffield on the junction shown (and picked) per row — the "other side" of the relationship. Resolved to its description for display and used as the add-row picker's target catalog. Required. -
display
Compiler-checked reference shown as the related row's primary value. -
columns
Extra join-row fields to render as columns (e.g. aroleorsortOrderattribute on the junction). When unset, the panel shows just thedisplayref. Thedisplayref is always rendered as the row's primary (name) column whether or not it appears here, so an explicit list adds columns on top of the name rather than replacing it; listing the display field is fine and is not duplicated. A field name that matches no attribute on the junction (a typo, or a field on a different entity) is dropped with aWARNat metadata resolution. -
columns
Compiler-checked join-row columns. -
label
Heading for the panel; blank derives one from the panel name. -
hideInDetail
Hide this panel in the read/detail view, keeping it only in the edit form. By default a related list renders read-only in the detail view (so the roster is visible without entering edit mode) and editable in the form; call this to opt a panel out of the detail render. -
field
Switch back to configuring a plain field on the same entity. -
field
Switch back to a compiler-checked field on the owning entity.
-