Class RegionDef.Field

java.lang.Object
org.apache.juneau.console.views.RegionDef.Field
Enclosing class:
RegionDef

public static class RegionDef.Field extends Object
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 Details

    • data

      public String data
      The key into ctx.data's values map. Unique across the enclosing RegionDef.
    • label

      public String label
      The label shown above the value. null falls back to data at paint time.
    • render

      public String render
      Optional named renderer id, resolved against the same NS._renderers registry as today.
    • renderMeta

      Optional metadata handed to render's renderer function.
    • href

      public String href
      Optional {property} URL template consumed by the linked renderer (and any renderer that reads it). Independent of render.
    • format

      How the value is painted. null means FieldFormat.TEXT.
    • span

      public FieldSpan span
      How many of the grid's columns this field occupies. null means FieldSpan.ONE.
    • actions

      public List<String> 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. See RowAction.visibleWhen for the shared semantics.
  • Constructor Details

  • Method Details

    • of

      public static RegionDef.Field of(String data)
      Creates a field bound to the specified values-map key.
      Parameters:
      data - The ctx.data key. Must not be null or blank.
      Returns:
      A new RegionDef.Field.
    • label

      public RegionDef.Field label(String value)
      Sets the label.
      Parameters:
      value - The label. An empty string suppresses it (full-width markdown/sanitizedHtml body).
      Returns:
      This object.
    • render

      public RegionDef.Field render(String value)
      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

      public RegionDef.Field href(String value)
      Sets the declarative {property} URL template.
      Parameters:
      value - The template.
      Returns:
      This object.
    • format

      Sets the paint format.
      Parameters:
      value - The format. null means FieldFormat.TEXT.
      Returns:
      This object.
    • span

      public RegionDef.Field span(FieldSpan value)
      Sets the grid span.
      Parameters:
      value - The span. null means FieldSpan.ONE.
      Returns:
      This object.
    • actions

      public RegionDef.Field actions(String... value)
      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 Map ready for Json.of(...).