Package net.pricefx.formulaengine.scripting.inputbuilder
SimpleInputBuilder for basic entries,
StringInputBuilder for text entries, OptionInputBuilder for option lists,
and DateRangeInputBuilder for date ranges. All builders descend from
AbstractInputBuilder, whose fluent setters return the concrete builder type so
calls can be chained. The same builder classes serve the input mechanisms of the
platform: Form logics, the classic "input generation" flow, and configurators.
Form logics (Forms 2.0,
since version 17.0): the form binding exposes the same create... factory
methods (see FormInputBuilderApi) and an input is
finished with AbstractInputBuilder.buildFormInput(). Form logics run without the
"input generation" mode; their initial inputs are defined in the init phase
instead. Forms are the current mechanism for all new implementations;
see the net.pricefx.formulaengine.forms package. The Knowledge Base provides a
comparison of the input mechanisms and a step by step guide for converting existing
inputs to Forms.
Classic "input generation" flow: the factory is obtained through
api.inputBuilderFactory(); see
PublicGroovyAPI.inputBuilderFactory(). The
returned InputBuilderFactory provides one create... method per input
type; a typical flow creates a builder, chains property setters such as setLabel,
and finishes with AbstractInputBuilder.getInput(). The behavior of
getInput() depends on the execution mode. In the "input generation" mode it
registers the input field definition so the user interface can render the field, and
returns a random value. In regular execution it returns the value entered by the user;
reading the value through the input binding variable is recommended. In
configurators and header logics the terminal call is buildContextParameter()
instead, because those contexts add the input field through their own structures.
In both flows the first constructor argument is the parameter name, a stable camelCase
identifier stored on every line item; use setLabel for the display label.
- See Also:
-
ClassDescriptionBuilder class for input type Button
InputType.BUTTONClickableInput<T extends AbstractInputBuilder>Builder class for input type Configurator or InlineConfigurator (InputType.CONFIGURATORorInputType.INLINECONFIGURATOR)Builder class for input type CustomerInputType.CUSTOMERBuilder class for input typeDashboardInputs.Builder class for input typeDashboardPopup.Builder class for input type DateRangeUserEntryInputType.DATERANGEUSERENTRY.Builder class for input type DMFilterInputType.DMDIMFILTER.Builder class for input type DMFilterBuilderInputType.DMFILTERBUILDER.Builder class for input type DMFilterBuilderInputType.DMFILTERBUILDERMULTIPLE.Builder class for input typeDmQueryBuilder.Builder class for input type FilterBuilderInputType.FILTERBUILDER.Input Builder Factory class as a convenient way to create inputs (user entries, context parameters).Builder class for input type InputMatrixInputType.INPUTMATRIXBuilder class for input type MultiTierEntryInputType.MULTITIERENTRY.Builder class for input type Option and Options (InputType.OPTIONandInputType.OPTIONS).Builder class for input type ProductGroup, CustomerGroup and SellerGroupBuilder class for input type ProductInputType.PRODUCT.Builder class for input type RangeSliderInputType.RANGESLIDER.Builder class for input type SellerInputType.SELLER.Builder class for basic input types.Builder class for input type SliderInputType.SLIDER.Builder class for input type StringUserEntryInputType.STRINGUSERENTRY.ValueChangeableInput<T extends AbstractInputBuilder>Builder class for input type LookupInputType.LOOKUP.