Interface FormModal

All Superinterfaces:
FormLayoutNode

public interface FormModal extends FormLayoutNode
A modal layout node used to display form inputs in a popup dialog with an optional heading. Created with layout.createModal(name) (see FormLayout.createModal(String)) and populated with addChild(FormLayoutNode)/addChild(ContextParameter).

Example:


 def layout = form.layout()

 layout.addChild(
     layout.createModal("detailsModal")
         .setHeading("More Details")
         .addChild(input3)
 )
 
Since:
17.0 - Paloma
See Also:
  • Method Details

    • setHeading

      FormModal setHeading(String heading)
      Sets the heading displayed as the title of the modal dialog.

      The heading is separate from the modal's name, which identifies the layout node and is supplied when the modal is created. Set the heading in the Init phase together with the rest of the layout, so the dialog renders with its title the first time the user opens it.

      Example:

      
       // Init element of a Form logic
       def layout = form.layout()
      
       layout.addChild(
           layout.createModal("lineItemDetails")
               .setHeading("Line Item Details")
       )
       
      Parameters:
      heading - text shown as the dialog title
      Returns:
      this FormModal, so that calls can be chained
      Since:
      17.1 - Paloma
      See Also:
    • addChild

      FormModal addChild(FormLayoutNode child)
      Attaches child to this modal.
      Specified by:
      addChild in interface FormLayoutNode
      Parameters:
      child - the layout node to attach
      Returns:
      this FormModal, so that calls can be chained
      Since:
      17.0 - Paloma
    • addChild

      FormModal addChild(ContextParameter child)
      Attaches a built input directly to this modal.
      Specified by:
      addChild in interface FormLayoutNode
      Parameters:
      child - the input to attach, typically built with a create...Entry(...).buildFormInput() call
      Returns:
      this FormModal, so that calls can be chained
      Since:
      17.0 - Paloma