TableSpec (taack-ui 0.3.8 API)
Package: taack.ui.base.table

[Groovy] Class TableSpec

    • taack.ui.base.table.TableSpec


    • @groovy.transform.CompileStatic
      final class TableSpec
      extends java.lang.Object

      UiTableSpecifier.ui delegated class

      This class allows to draw a table. A table is composed of a header and rows.

      • Methods Summary

          Methods 
          Type Params Return Type Name and description
          void header(groovy.lang.Closure closure)
          Draw the header of the table.
          void paginate(java.lang.Number max, java.lang.Number offset, java.lang.Number count)
          Root element, must appear only once or zero time in the table closure
          void row(java.lang.Object currentObject, taack.ui.base.common.Style style, groovy.lang.Closure closure)
          Row container
          void rowGroupFooter(java.lang.String content)
          Display a row that has the width of the table.
          void rowGroupHeader(java.lang.Object label, org.codehaus.groovy.runtime.MethodClosure show, java.lang.Long id)
          Display a row that has the width of the table and contains group as label.
          void rowIndent(groovy.lang.Closure closure)
          Indent rows inside the closure
          void rowTree(boolean hasChildren, groovy.lang.Closure closure)
          Row container that can be expended as a tree.
      • Inherited Methods Summary

          Inherited Methods 
          Methods inherited from class Name
          class java.lang.Object java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
      • Method Detail

        • void paginate(java.lang.Number max, java.lang.Number offset, java.lang.Number count)

          Root element, must appear only once or zero time in the table closure

          Parameters:
          max - Max number of row to display
          offset - Record offset
          count - Number of object after a query, see TaackSimpleFilterService.list

        • void row(java.lang.Object currentObject, taack.ui.base.common.Style style, @groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_FIRST, value: RowColumnSpec) groovy.lang.Closure closure)

          Row container

          Parameters:
          currentObject - Mandatory if table is selectable
          style
          closure - Contains columns

        • void rowGroupFooter(java.lang.String content)

          Display a row that has the width of the table.

          Parameters:
          content

        • void rowGroupHeader(java.lang.Object label, org.codehaus.groovy.runtime.MethodClosure show, java.lang.Long id)

          Display a row that has the width of the table and contains group as label.

          Parameters:
          label - Label to display
          show - Action that point to a show
          id - The ID to pass to the show action

        • void rowIndent(@groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_FIRST, value: TableSpec) groovy.lang.Closure closure)

          Indent rows inside the closure

          Parameters:
          Closure - contain the list of TableSpec.row

        • void rowTree(boolean hasChildren, @groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_FIRST, value: RowColumnSpec) groovy.lang.Closure closure)

          Row container that can be expended as a tree. Can be nested.

          Parameters:
          hasChildren - If true, the subsequent rows will be collapsed under the current row
          closure - Contains columns