FormSpec (taack-ui 0.3.8-SNAPSHOT API)
Package: taack.ui.base.form

[Groovy] Class FormSpec

        • taack.ui.base.form.FormSpec


        • @groovy.transform.CompileStatic
          final class FormSpec
          extends FormSectionSpec

          UiFormSpecifier.ui delegated class.

          This class allow to draw a form. A form is composed of sections, field and tabs.

          A form is included into a block calling BlockSpec.form.

          Should help with autocompletion and static typing validation of the fields of the form that are displayed in the browser.

          • Method Detail

            • void formAction(java.lang.String i18n, java.lang.String controller, java.lang.String action, java.lang.Long id, java.util.Map params, boolean isAjax)

              form action. The form is POSTed to the target action.

              Parameters:
              i18n - label of the button
              controller - controller holding the action
              action - name of the action in the controller
              id - id param
              params - additional params
              isAjax - if true, the action is of ajax kind (either open a modal or updating part of the page, without reloading the page)

            • void formAction(java.lang.String i18n, org.codehaus.groovy.runtime.MethodClosure action, java.lang.Long id, java.util.Map params, boolean isAjax)

              form action. The form is POSTed to the target action.

              Parameters:
              i18n - label of the button
              action - methodClosure pointing to the action
              id - id param
              params - additional params
              isAjax - if true, the action is of ajax kind (either open a modal or updating part of the page, without reloading the page)

            • void formAction(java.lang.String i18n, org.codehaus.groovy.runtime.MethodClosure action, java.lang.Long id, boolean isAjax)

              form action. The form is POSTed to the target action.

              Parameters:
              i18n - label of the button
              action - methodClosure pointing to the action
              id - id param
              isAjax - if true, the action is of ajax kind (either open a modal or updating part of the page, without reloading the page)

            • void formAction(java.lang.String i18n, org.codehaus.groovy.runtime.MethodClosure action, java.util.Map params, boolean isAjax)

              form action. The form is POSTed to the target action.

              Parameters:
              i18n - label of the button
              action - methodClosure pointing to the action
              params - additional params
              isAjax - if true, the action is of ajax kind (either open a modal or updating part of the page, without reloading the page)

            • void formAction(java.lang.String i18n, org.codehaus.groovy.runtime.MethodClosure action, boolean isAjax)

              form action. The form is POSTed to the target action.

              Parameters:
              i18n - label of the button
              action - methodClosure pointing to the action
              isAjax - if true, the action is of ajax kind (either open a modal or updating part of the page, without reloading the page)

            • void section(java.lang.String sectionName, BlockSpec.Width width, @groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_FIRST, value: FormSectionSpec) groovy.lang.Closure closure)

              Add a section to enclose fields to display. Can be nested.

              Parameters:
              sectionName - the label of the section
              width - its relative width
              closure - Description of the content of this section

            • void sectionTab(java.lang.String sectionName, @groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_FIRST, value: FormSpec) groovy.lang.Closure closure)

              Add a tabulation to a section tabs. Can only be children of sectionTabs(groovy.lang.Closure).

              Parameters:
              sectionName - the label in the tab
              closure - describe the content of the tabulation