Fluent builder for adding a single extra field to a sales data series. Obtain an instance from newDataSeriesExtraFieldBuilder, chain the setter methods to configure it, then call build to save it to the series' fieldset (only if a field of the same name does not already exist).
Group: Builders
Methods
dataSeries(SalesDataSeries dataSeries)
Returns: DataSeriesExtraFieldBuilder
Sets the sales data series to add the extra field to. Required before calling build.
| Parameter | Description |
|---|---|
dataSeries | the sales data series to add the field to |
name(String name)
Returns: DataSeriesExtraFieldBuilder
Sets the extra field's name. Required before calling build.
| Parameter | Description |
|---|---|
name | the field name; must not start with "field" and must not be a reserved name |
title(String title)
Returns: DataSeriesExtraFieldBuilder
Sets the extra field's display title; defaults to the field's name if not set.
| Parameter | Description |
|---|---|
title | the display title |
required(Boolean required)
Returns: DataSeriesExtraFieldBuilder
Sets whether the extra field is required; defaults to false if not set.
| Parameter | Description |
|---|---|
required | true if the field must be filled in |
options(List<String> options)
Returns: DataSeriesExtraFieldBuilder
Sets the fixed list of options for the extra field, for a selection-type field.
| Parameter | Description |
|---|---|
options | the field's allowed option values |
type(String type)
Returns: DataSeriesExtraFieldBuilder
Sets the extra field's input type.
| Parameter | Description |
|---|---|
type | the field type name |
ordering(Integer ordering)
Returns: DataSeriesExtraFieldBuilder
Sets the extra field's display ordering relative to other extra fields on the series.
| Parameter | Description |
|---|---|
ordering | the display order |
build()
Returns: void
Saves the configured extra field to its series' fieldset, if a field of the same name does not already exist there.