Class BarSlot

java.lang.Object
org.apache.juneau.console.widgets.BarSlot
All Implemented Interfaces:
Widget

@BeanType(properties="contractVersion,id,widgets") public class BarSlot extends Object implements Widget
An additive trailing region beside the subtab ribbon: a small row of BarWidgets (concept #9).

A pure data bean. The views emitter renders a data-juneau-bar-slot region (never into the archived .juneau-view-toolbar-* DataTables control row) and, only when the slot is non-empty, a tiny JSON sidecar for any dynamic counts. The remaining Java-only accessor is RowDetailDef.barSlot(...) in the views module — omitted from the wire, and it does not bump any CONTRACT_VERSION.

Since:
10.0.0
  • Field Details

    • CONTRACT_VERSION

      public static final String CONTRACT_VERSION
      The frozen contract version for this widget. Serialized as the JSON string "1".
      See Also:
    • contractVersion

      The contract version; must equal CONTRACT_VERSION at validation time.
    • id

      public String id
      The stable bar-slot id; sidecar id (id="juneau-bar:<id>"). Required, non-blank.
    • widgets

      The bar widgets, in display order. At least one is required; ids must be unique within the slot.
    • refreshUrl

      Optional same-origin refresh endpoint owning the bar sidecar's demand-refresh. Omit = no live refresh.
  • Constructor Details

  • Method Details

    • create

      public static BarSlot create(String id)
      Creates an empty bar slot with the given id.
      Parameters:
      id - The stable bar-slot id. Must not be null or blank.
      Returns:
      A new BarSlot.
    • widgets

      public BarSlot widgets(BarWidget... value)
      Sets the bar widgets, in display order.
      Parameters:
      value - The widgets.
      Returns:
      This object.
    • refreshUrl

      public BarSlot refreshUrl(String value)
      Sets the same-origin bar refresh endpoint.
      Parameters:
      value - The same-origin refresh path.
      Returns:
      This object.
    • validate

      public void validate()
      Description copied from interface: Widget
      Fail-closed bean validation.
      Specified by:
      validate in interface Widget