Package net.pricefx.formulaengine.forms
A Form logic runs in three phases. Each phase exposes its own interface through the
form binding.
FormInitApideclares the initial set of inputs and the layout, in the Init phase.FormValueOptionsApisupplies the values of OPTION and OPTIONS inputs on demand, in the ValueOptions phase.FormActionApireacts to user actions such as value changes and clicks, in the Action phase.
FormInputBuilderApi carries the create... factory methods shared across
the phases. These methods reuse the builder classes of the
net.pricefx.formulaengine.scripting.inputbuilder package, with the terminal call
buildFormInput().
Layout is arranged with FormLayout, obtained with form.layout() in the
Init phase. Attach a node to the layout with addChild.
FormLayoutNodeis the common interface of the layout nodes.FormRowarranges inputs horizontally. Create it withlayout.createRow(name).FormContainergroups inputs with an optional heading and collapsible behavior. Create it withlayout.createContainer(name).FormModalshows inputs in a popup dialog with an optional heading. Create it withlayout.createModal(name).
FormChange collects the property changes to apply to an input, such as value,
label, read only state and validation messages. The Action phase obtains one with
form.updateInput(name) or form.insertAfter(name, inputs).
Forms 2.0 is available since version 17.0. It replaces the "input generation" mode and configurators as the current mechanism for all new implementations.
- See Also:
-
InterfacesClassDescriptionRepresents a set of property changes to apply to a form input.A container layout node used to group form inputs with an optional heading and collapsible behaviour.Defines input builder methods shared across form phases.A modal layout node used to display form inputs in a popup dialog with an optional heading.A row layout node used to arrange inputs horizontally within a form.The
FormValueOptionsApiis exposed to form logics through theformbinding during thevalueOptionsphase.