Package org.apache.juneau.console.views
Class RegionDef.Field
java.lang.Object
org.apache.juneau.console.views.RegionDef.Field
- Enclosing class:
- RegionDef
One entry in the field catalog: a label, an optional named renderer and its meta, an
optional href template, a paint format, a grid span, and per-field action-bar ids.
Card and tab regions only — see RegionDef.fields.
- Since:
- 10.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionAction ids painted beside this field's value.The key intoctx.data's values map.How the value is painted.Optional{property}URL template consumed by thelinkedrenderer (and any renderer that reads it).The label shown above the value.Optional named renderer id, resolved against the sameNS._renderersregistry as today.Optional metadata handed torender's renderer function.How many of the grid's columns this field occupies.The rules that must all match for this one detail field to render. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the per-field action ids.format(FieldFormat value) Sets the paint format.Sets the declarative{property}URL template.Sets the label.static RegionDef.FieldCreates a field bound to the specified values-map key.Sets the named renderer id.renderMeta(Map<String, Object> value) Sets the renderer's metadata.Sets the grid span.Serializes this entry to the compact JSON shape of the sidecar contract.visibleWhen(VisibilityRule... rules) Hides this field unless every rule matches.
-
Field Details
-
data
The key intoctx.data's values map. Unique across the enclosingRegionDef. -
label
The label shown above the value.null falls back todataat paint time. -
render
Optional named renderer id, resolved against the sameNS._renderersregistry as today. -
renderMeta
Optional metadata handed torender's renderer function. -
href
Optional{property}URL template consumed by thelinkedrenderer (and any renderer that reads it). Independent ofrender. -
format
How the value is painted.null meansFieldFormat.TEXT. -
span
How many of the grid's columns this field occupies.null meansFieldSpan.ONE. -
actions
Action ids painted beside this field's value. Ids only — the bar itself is rendered by the client helper, not by this bean. -
visibleWhen
The rules that must all match for this one detail field to render.null or empty means always visible. SeeRowAction.visibleWhenfor the shared semantics.
-
-
Constructor Details
-
Field
public Field()
-
-
Method Details
-
of
Creates a field bound to the specified values-map key.- Parameters:
data- Thectx.datakey. Must not benull or blank.- Returns:
- A new
RegionDef.Field.
-
label
Sets the label.- Parameters:
value- The label. An empty string suppresses it (full-width markdown/sanitizedHtml body).- Returns:
- This object.
-
render
Sets the named renderer id.- Parameters:
value- The renderer id.- Returns:
- This object.
-
renderMeta
Sets the renderer's metadata.- Parameters:
value- The metadata.- Returns:
- This object.
-
href
Sets the declarative{property}URL template.- Parameters:
value- The template.- Returns:
- This object.
-
format
Sets the paint format.- Parameters:
value- The format.null meansFieldFormat.TEXT.- Returns:
- This object.
-
span
Sets the grid span.- Parameters:
value- The span.null meansFieldSpan.ONE.- Returns:
- This object.
-
actions
Sets the per-field action ids.- Parameters:
value- The action ids.- Returns:
- This object.
-
visibleWhen
Hides this field unless every rule matches.- Parameters:
rules- The rules; all must match. Replaces any rules set by an earlier call.- Returns:
- This object.
-
toContractMap
Serializes this entry to the compact JSON shape of the sidecar contract.- Returns:
- An ordered
Mapready forJson.of(...).
-