BlockLeafSpec (taack-ui 0.6.3-SNAPSHOT API)
Package: taack.ui.dsl.block

[Groovy] Class BlockLeafSpec

      • taack.ui.dsl.block.BlockLeafSpec


      • @groovy.transform.CompileStatic
        class BlockLeafSpec
        extends BlockBase

        UiBlockSpecifier.ui delegated class.

        This class allows to draw the layout of a page, or to update part of a page after an ajax call.

        Each block can contains many graphical elements, but it is better to have one graphical element (show, form, table, tableFilter ...) per block (modal, ajaxBlock ...)

        • Constructor Summary

        • Methods Summary

            Methods 
            Type Params Return Type Name and description
            void closeModal(java.lang.String id, java.lang.String value, FieldInfo[] fields)
            Close the topmost modal.
            void closeModal(java.lang.Long id, java.lang.String value, FieldInfo[] fields)
            Close the topmost modal.
            void closeModal(FieldInfo[] fields)
            Close the topmost modal.
            void custom(java.lang.String html, taack.ui.dsl.common.Style style, groovy.lang.Closure closure)
            Add custom HTML code in a block
            void diagram(UiDiagramSpecifier diagramSpecifier, groovy.lang.Closure closure)
            Add a chart to the block
            void diagram(org.codehaus.groovy.runtime.MethodClosure action, groovy.lang.Closure closure)
            Add a chart to the block, Method Closure version, **more efficient**, the method is not called if no redraw
            void diagramFilter(UiFilterSpecifier filterSpecifier, UiDiagramSpecifier diagramSpecifier, groovy.lang.Closure closure)
            void form(UiFormSpecifier formSpecifier, groovy.lang.Closure closure)
            Add a form in a block
            void iframe(java.lang.String url, java.lang.String cssHeight)
            Add custom HTML code in a block
            void processMenuBlock(java.lang.String ajaxBlockId, groovy.lang.Closure closure)
            void show(UiShowSpecifier showSpecifier, groovy.lang.Closure closure)
            Add a show in a block.
            static void simpleLog(java.lang.String toPrint)
            void table(UiTableSpecifier tableSpecifier, groovy.lang.Closure closure)
            void tableFilter(UiFilterSpecifier filterSpecifier, UiTableSpecifier tableSpecifier, groovy.lang.Closure closure)
            Add a filter and its associated table to the block
        • Constructor Detail

          • BlockLeafSpec()

        • Method Detail

          • void closeModal(java.lang.String id, java.lang.String value, FieldInfo[] fields)

            Close the topmost modal. Usually, it passes an ID and a label to a form in a many to many relationship, if you open a modal using FormSpec.ajaxField.

            Parameters:
            id - the ID of the object
            value - the label of the object (should use toString() obejct method)
            fields - allow to update the form from which ajaxField has been called with the values of the fields listed

          • void closeModal(java.lang.Long id, java.lang.String value, FieldInfo[] fields)

            Close the topmost modal. Usually, it passes an ID and a label to a form in a many to many relationship, if you open a modal using FormSpec.ajaxField.

            Parameters:
            id - the ID of the object
            value - the label of the object (should use toString() obejct method)
            fields - allow to update the form from which ajaxField has been called with the values of the fields listed

          • void closeModal(FieldInfo[] fields)

            Close the topmost modal. Usually, it passes an ID and a label to a form in a many to many relationship, if you open a modal using FormSpec.ajaxField.

            Parameters:
            fields - allow to update the form from which ajaxField has been called with the values of the fields listed

          • void custom(java.lang.String html, taack.ui.dsl.common.Style style, @groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_FIRST, value: MenuSpec) groovy.lang.Closure closure)

            Add custom HTML code in a block

            Parameters:
            html - code
            style - the template style to use
            closure - actions to display in the header

          • void diagram(UiDiagramSpecifier diagramSpecifier, @groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_FIRST, value: MenuSpec) groovy.lang.Closure closure)

            Add a chart to the block

            Parameters:
            diagramSpecifier - description of the Chart. See UiDiagramSpecifier
            closure - menu

          • void diagram(org.codehaus.groovy.runtime.MethodClosure action, @groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_FIRST, value: MenuSpec) groovy.lang.Closure closure)

            Add a chart to the block, Method Closure version, **more efficient**, the method is not called if no redraw

            Parameters:
            action - describing the Chart. Must return a UiDiagramSpecifier
            closure - menu

          • void diagramFilter(UiFilterSpecifier filterSpecifier, UiDiagramSpecifier diagramSpecifier, @groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_FIRST, value: MenuSpec) groovy.lang.Closure closure)

          • void form(UiFormSpecifier formSpecifier, @groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_FIRST, value: MenuSpec) groovy.lang.Closure closure)

            Add a form in a block

            Parameters:
            i18n - label in the header of the form
            formSpecifier - the form description see UiFormSpecifier
            width
            closure - list of action in the header to add. See MenuSpec

          • void iframe(java.lang.String url, java.lang.String cssHeight)

            Add custom HTML code in a block

            Parameters:
            html - code
            style - the template style to use
            closure - actions to display in the header

          • void processMenuBlock(java.lang.String ajaxBlockId, @groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_FIRST, value: MenuSpec) groovy.lang.Closure closure)

          • void show(UiShowSpecifier showSpecifier, @groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_FIRST, value: MenuSpec) groovy.lang.Closure closure)

            Add a show in a block. See UiShowSpecifier. A show serves to display object data with limited edition capabilities

            Parameters:
            i18n - label in the header of the show
            showSpecifier - the object data to display
            width
            closure - list of action in the header to add. See MenuSpec

          • static void simpleLog(java.lang.String toPrint)

          • void table(UiTableSpecifier tableSpecifier, @groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_FIRST, value: MenuSpec) groovy.lang.Closure closure)

          • void tableFilter(UiFilterSpecifier filterSpecifier, UiTableSpecifier tableSpecifier, @groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_FIRST, value: MenuSpec) groovy.lang.Closure closure)

            Add a filter and its associated table to the block

            Parameters:
            i18nFilter - filter label
            filterSpecifier - description of the filter
            i18nTable - table label
            tableSpecifier - description of the table
            closure - action ot display along with the label in the header