Class Section

java.lang.Object
org.apache.juneau.console.freemarker.Section
Direct Known Subclasses:
CardSection, ChoiceSection, RangeSection, SearchSection, Section.Custom

public abstract class Section extends Object
A section of a dashboard Rail.

Every section except a CardSection owns one filter:<key> topic, set with publishes(String). The key is the section's id and its bus owner id. The section publishes a filter-shaped payload ({schemaVersion:1, viewId, search?, columns?, options?}) whenever the user changes it.

Example:

Rail.left().sections( SearchSection.create().publishes(Topics.filter("search")), Section.custom("app.goto", JsonMap.of()).publishes(Topics.filter("goto")));

Since:
10.0.0
  • Method Details

    • publishes

      public Section publishes(String topic)
      Sets the topic this section owns.
      Parameters:
      topic - A filter:<key> topic, normally Topics.filter(key). <key> becomes the section id.
      Returns:
      This object.
    • label

      public Section label(String label)
      Sets the section's legend text.
      Parameters:
      label - The label.
      Returns:
      This object.
    • custom

      public static Section.Custom custom(String name, JsonMap args)
      Creates a section implemented in JS by a JuneauDashboard.section.register(name, ...) section.
      Parameters:
      name - The dotted section name, for example app.goto.
      args - Arguments handed to the section's mount as ctx.args.
      Returns:
      A new section.