Class ChoiceSection
Publishes {schemaVersion:1, viewId, columns:{<dim>: [selected...]}, options:{deselected:[...]}}, omitting
columns and options when every value is selected. The deselected list names the values the
user has unticked (capped at max), so a reload can list them again and tick them back. The array
value is a data-source extension: datatables do not apply it.
Unticking every value publishes an empty list (columns:{<dim>: []}). The data sources map an empty list to
no restriction on the dimension, so "nothing ticked" shows every row, the same as "everything ticked". The section
shows a "Select all" button while a filter is in force.
Example:
ChoiceSection.
- Since:
- 10.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.juneau.console.freemarker.Section
Section.Custom -
Method Summary
Modifier and TypeMethodDescriptionstatic ChoiceSectionCreates a choice section.Sets the section's legend text.max(int value) Caps the values shown before "Show all".Sets the topic this section owns.
-
Method Details
-
fromDim
Creates a choice section.- Parameters:
source- The data source id (its topic isdata:<source>).dim- The dictionary column whose values are listed.- Returns:
- A new section.
-
max
Caps the values shown before "Show all".- Parameters:
value- The cap, at least 1. Defaults to 50.- Returns:
- This object.
-
publishes
Description copied from class:SectionSets the topic this section owns. -
label
Description copied from class:SectionSets the section's legend text.
-