Package net.pricefx.formulaengine.forms
Interface FormContainer
- All Superinterfaces:
FormLayoutNode
A container layout node used to group form inputs with an optional heading and collapsible behaviour. Created with
layout.createContainer(name) (see FormLayout.createContainer(String)) and populated with addChild(FormLayoutNode)/addChild(ContextParameter).
Example:
def layout = form.layout()
layout.addChild(
layout.createContainer("main")
.setHeading("Order Details")
.setCollapsible(true)
.addChild(input1)
)
- Since:
- 17.0 - Paloma
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaddChild(FormLayoutNode child) Attacheschildto this container.addChild(ContextParameter child) Attaches a built input directly to this container.setCollapsed(boolean collapsed) Sets whether this container starts collapsed.setCollapsible(boolean collapsible) Sets whether the user can expand and collapse this container.setHeading(String heading) Sets the heading displayed above this container's inputs.
-
Method Details
-
setCollapsible
Sets whether the user can expand and collapse this container. Must be set totrueforsetCollapsed(boolean)to have any effect.- Parameters:
collapsible-trueto allow expanding/collapsing- Returns:
- this
FormContainer, so that calls can be chained - Since:
- 17.0 - Paloma
-
setCollapsed
Sets whether this container starts collapsed. Only takes effect ifsetCollapsible(boolean)has already been called withtrue; callsetCollapsible(true)first.- Parameters:
collapsed-trueto start collapsed- Returns:
- this
FormContainer, so that calls can be chained - Since:
- 17.0 - Paloma
-
setHeading
Sets the heading displayed above this container's inputs.- Parameters:
heading- text shown as the container's heading- Returns:
- this
FormContainer, so that calls can be chained - Since:
- 17.0 - Paloma
- See Also:
-
addChild
Attacheschildto this container.- Specified by:
addChildin interfaceFormLayoutNode- Parameters:
child- the layout node to attach- Returns:
- this
FormContainer, so that calls can be chained - Since:
- 17.0 - Paloma
-
addChild
Attaches a built input directly to this container.- Specified by:
addChildin interfaceFormLayoutNode- Parameters:
child- the input to attach, typically built with acreate...Entry(...).buildFormInput()call- Returns:
- this
FormContainer, so that calls can be chained - Since:
- 17.0 - Paloma
-