Interface TableLayoutManager

All Superinterfaces:
Cloneable, CollectionLayoutManager, Copyable, DictionaryBean, LayoutManager, LifecycleElement, Serializable, UifDictionaryBean
All Known Implementing Classes:
TableLayoutManagerBase

public interface TableLayoutManager extends CollectionLayoutManager
Layout manager that works with CollectionGroup components and renders the collection as a Table.
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Method Details

    • getNumberOfColumns

      int getNumberOfColumns()
      Indicates the number of columns that should make up one row of data.

      If the item count is greater than the number of columns, a new row will be created to render the remaining items (and so on until all items are placed).

      Note this does not include any generated columns by the layout manager, so the final column count could be greater (if label fields are separate).

      Returns:
      int number of columns
    • setNumberOfColumns

      void setNumberOfColumns(int numberOfColumns)
      See Also:
    • isSuppressLineWrapping

      boolean isSuppressLineWrapping()
      Indicates whether the number of columns for the table data should match the number of fields given in the container's items list (so that each field takes up one column without wrapping), this overrides the configured numberOfColumns.

      If set to true during the initialize phase the number of columns will be set to the size of the container's field list, if false the configured number of columns is used

      Returns:
      true if the column count should match the container's field count, false to use the configured number of columns
    • setSuppressLineWrapping

      void setSuppressLineWrapping(boolean suppressLineWrapping)
      See Also:
    • isAutoTruncateColumns

      Boolean isAutoTruncateColumns()
      Indicates whether the column text should be truncated when the table cell is to small to display the text without wrapping.

      A tooltip is added to the table cell which displays the text before truncation.

      Returns:
      true if the column should be truncated
    • setAutoTruncateColumns

      void setAutoTruncateColumns(Boolean autoTruncateColumns)
      See Also:
    • isApplyAlternatingRowStyles

      boolean isApplyAlternatingRowStyles()
      Indicates whether alternating row styles should be applied.

      Indicator to layout manager templates to apply alternating row styles. See the configured template for the actual style classes used

      Returns:
      true if alternating styles should be applied, false if all rows should have the same style
    • setApplyAlternatingRowStyles

      void setApplyAlternatingRowStyles(boolean applyAlternatingRowStyles)
      See Also:
    • isApplyDefaultCellWidths

      boolean isApplyDefaultCellWidths()
      Indicates whether the manager should default the cell widths.

      If true, the manager will set the cell width by equally dividing by the number of columns

      Returns:
      true if default cell widths should be applied, false if no defaults should be applied
    • setApplyDefaultCellWidths

      void setApplyDefaultCellWidths(boolean applyDefaultCellWidths)
      See Also:
    • getRowCssClasses

      List<String> getRowCssClasses()
      List of styles for each row.

      Each entry in the list gives the style for the row with the same index. This style will be added to the <tr> tag when the table rows are rendered in the grid.tag. This is used to store the styles for newly added lines and other special cases like the add item row.

      Returns:
      list of styles for the rows
    • setRowCssClasses

      void setRowCssClasses(List<String> rowCssClasses)
      See Also:
    • getRowDataAttributes

      List<String> getRowDataAttributes()
      List of data attributes for each row.

      Each entry in the list gives the data attributes for the row with the same index. These data attributes will be added to the <tr> tag when the table rows are rendered in the grid.tag. This is used to store the data attributes for newly added lines and other special cases like the add item row.

      Returns:
      list of styles for the rows
    • setRowDataAttributes

      void setRowDataAttributes(List<String> rowDataAttributes)
      See Also:
    • isUseShortLabels

      boolean isUseShortLabels()
      Indicates whether the short label for the collection field should be used as the table header or the regular label
      Returns:
      true if short label should be used, false if long label should be used
    • setUseShortLabels

      void setUseShortLabels(boolean useShortLabels)
      Setter for the use short label indicator
      Parameters:
      useShortLabels -
    • isRepeatHeader

      boolean isRepeatHeader()
      Indicates whether the header should be repeated before each collection row. If false the header is only rendered at the beginning of the table
      Returns:
      true if header should be repeated, false if it should only be rendered once
    • setRepeatHeader

      void setRepeatHeader(boolean repeatHeader)
      Setter for the repeat header indicator
      Parameters:
      repeatHeader -
    • getHeaderLabelPrototype

      Label getHeaderLabelPrototype()
      Label instance to use as a prototype for creating the tables header fields. For each header field the prototype will be copied and adjusted as necessary
      Returns:
      Label instance to serve as prototype
    • setHeaderLabelPrototype

      void setHeaderLabelPrototype(Label headerLabelPrototype)
      Setter for the header field prototype
      Parameters:
      headerLabelPrototype -
    • getHeaderLabels

      List<Label> getHeaderLabels()
      List of Label instances that should be rendered to make up the tables header
      Returns:
      List of label field instances
    • isRenderSequenceField

      boolean isRenderSequenceField()
      Indicates whether the sequence field should be rendered for the collection
      Returns:
      true if sequence field should be rendered, false if not
    • setRenderSequenceField

      void setRenderSequenceField(boolean renderSequenceField)
      Setter for the render sequence field indicator
      Parameters:
      renderSequenceField -
    • getSequencePropertyName

      String getSequencePropertyName()
      Attribute name to use as sequence value. For each collection line the value of this field on the line will be retrieved and used as the sequence value
      Returns:
      sequence property name
    • setSequencePropertyName

      void setSequencePropertyName(String sequencePropertyName)
      Setter for the sequence property name
      Parameters:
      sequencePropertyName -
    • isGenerateAutoSequence

      boolean isGenerateAutoSequence()
      Indicates whether the sequence field should be generated with the current line number

      If set to true the sequence field prototype will be changed to a message field (if not already a message field) and the text will be set to the current line number

      Returns:
      true if the sequence field should be generated from the line number, false if not
    • setGenerateAutoSequence

      void setGenerateAutoSequence(boolean generateAutoSequence)
      Setter for the generate auto sequence field
      Parameters:
      generateAutoSequence -
    • getSequenceFieldPrototype

      Field getSequenceFieldPrototype()
      Field instance to serve as a prototype for the sequence field. For each collection line this instance is copied and adjusted as necessary
      Returns:
      Attribute field instance
    • setSequenceFieldPrototype

      void setSequenceFieldPrototype(Field sequenceFieldPrototype)
      Setter for the sequence field prototype
      Parameters:
      sequenceFieldPrototype -
    • getActionFieldPrototype

      FieldGroup getActionFieldPrototype()
      FieldGroup instance to serve as a prototype for the actions column. For each collection line this instance is copied and adjusted as necessary. Note the actual actions for the group come from the collection groups actions List (org.kuali.rice.krad.uif.container.CollectionGroup.getActions()). The FieldGroup prototype is useful for setting styling of the actions column and for the layout of the action fields. Note also the label associated with the prototype is used for the action column header
      Returns:
      GroupField instance
    • setActionFieldPrototype

      void setActionFieldPrototype(FieldGroup actionFieldPrototype)
      Setter for the action field prototype
      Parameters:
      actionFieldPrototype -
    • isSeparateAddLine

      boolean isSeparateAddLine()
      Indicates whether the add line should be rendered in a separate group, or as part of the table (first line)

      When separate add line is enabled, the fields for the add line will be placed in the CollectionLayoutManager.getAddLineGroup(). This group can be used to configure the add line presentation. In addition to the fields, the header on the group (unless already set) will be set to CollectionGroup.getAddLabel() and the add line actions will be placed into the group's footer.

      Returns:
      true if add line should be separated, false if it should be placed into the table
    • setSeparateAddLine

      void setSeparateAddLine(boolean separateAddLine)
      Setter for the separate add line indicator
      Parameters:
      separateAddLine -
    • getAllRowFields

      List<Field> getAllRowFields()
      List of Field instances that make up all the table's rows of data
      Returns:
      table body fields
    • getFirstRowFields

      List<Field> getFirstRowFields()
      List of Field instances that make us the table's first row of data
      Returns:
      list of field instances
    • getRichTable

      RichTable getRichTable()
      Widget associated with the table to add functionality such as sorting, paging, and export
      Returns:
      RichTable instance
    • setRichTable

      void setRichTable(RichTable richTable)
      Setter for the rich table widget
      Parameters:
      richTable -
    • getNumberOfDataColumns

      int getNumberOfDataColumns()
      Returns:
      the numberOfDataColumns
    • setNumberOfDataColumns

      void setNumberOfDataColumns(int numberOfDataColumns)
      Parameters:
      numberOfDataColumns - the numberOfDataColumns to set
    • getHiddenColumns

      Set<String> getHiddenColumns()
      Gets a set of property names defining hidden columns.
      Returns:
      set of property names
      See Also:
    • setHiddenColumns

      void setHiddenColumns(Set<String> hiddenColumns)
      Setter for getHiddenColumns().
      Parameters:
      hiddenColumns - set of property names
    • getSortableColumns

      Set<String> getSortableColumns()
      Gets a set of property names defining sortable columns.
      Returns:
      set of property names
      See Also:
    • setSortableColumns

      void setSortableColumns(Set<String> sortableColumns)
      Parameters:
      sortableColumns - set of property names
    • getActionColumnIndex

      int getActionColumnIndex()
      Indicates the index of the action column
      Returns:
      the action column index
    • getActionColumnPlacement

      String getActionColumnPlacement()
      Indicates the actions column placement

      Valid values are 'LEFT', 'RIGHT' or any valid number. The default is 'RIGHT' or '-1'. The column placement index takes all displayed columns, including sequence and selection columns, into account.

      Returns:
      the action column placement
    • setActionColumnPlacement

      void setActionColumnPlacement(String actionColumnPlacement)
      Setter for the action column placement
      Parameters:
      actionColumnPlacement - action column placement string
    • getRowDetailsGroup

      Group getRowDetailsGroup()
      The row details info group to use when using a TableLayoutManager with the a richTable.

      This group will be displayed when the user clicks the "Details" link/image on a row. This allows extra/long data to be hidden in table rows and then revealed during interaction with the table without the need to leave the page. Allows for any group content.

      Does not currently work with javascript required content.

      Returns:
      rowDetailsGroup component
    • setRowDetailsGroup

      void setRowDetailsGroup(Group rowDetailsGroup)
      Set the row details info group
      Parameters:
      rowDetailsGroup - row details group
    • getColumnsToCalculate

      List<String> getColumnsToCalculate()
      A list of all the columns to be calculated

      The list must contain valid column indexes. The indexes takes all displayed columns into account.

      Returns:
      the total columns list
    • isShowTotal

      boolean isShowTotal()
      Gets showTotal. showTotal shows/calculates the total field when true, otherwise it is not rendered.
      Only used when renderOnlyLeftTotalLabels is TRUE, this overrides the ColumnConfigurationInfo setting. Otherwise, the ColumnConfigurationInfo setting takes precedence.
      Returns:
      true if showing the total, false otherwise.
    • setShowTotal

      void setShowTotal(boolean showTotal)
      Sets showTotal. showTotal shows/calculates the total field when true, otherwise it is not rendered.
      Only used when renderOnlyLeftTotalLabels is TRUE, this overrides the ColumnConfigurationInfo setting. Otherwise, the ColumnConfigurationInfo setting takes precedence.
    • isShowPageTotal

      boolean isShowPageTotal()
      Gets showTotal. showTotal shows/calculates the total field when true, otherwise it is not rendered.
      Only used when renderOnlyLeftTotalLabels is TRUE, this overrides the ColumnConfigurationInfo setting. Otherwise, the ColumnConfigurationInfo setting takes precedence.
      Returns:
      true if showing the page total, false otherwise.
    • setShowPageTotal

      void setShowPageTotal(boolean showPageTotal)
      Sets showPageTotal. showPageTotal shows/calculates the total field for the page when true (and only when the table actually has pages), otherwise it is not rendered.
      Only used when renderOnlyLeftTotalLabels is TRUE, this overrides the ColumnConfigurationInfo setting. Otherwise, the ColumnConfigurationInfo setting takes precedence.
      Parameters:
      showPageTotal -
    • isShowGroupTotal

      boolean isShowGroupTotal()
      Gets showGroupTotal. showGroupTotal shows/calculates the total field for each grouping when true (and only when the table actually has grouping turned on), otherwise it is not rendered.
      Only used when renderOnlyLeftTotalLabels is TRUE, this overrides the ColumnConfigurationInfo setting. Otherwise, the ColumnConfigurationInfo setting takes precedence.
      Returns:
      true if showing the group total, false otherwise.
    • setShowGroupTotal

      void setShowGroupTotal(boolean showGroupTotal)
      Sets showGroupTotal. showGroupTotal shows/calculates the total field for each grouping when true (and only when the table actually has grouping turned on), otherwise it is not rendered.
      Only used when renderOnlyLeftTotalLabels is TRUE, this overrides the ColumnConfigurationInfo setting. Otherwise, the ColumnConfigurationInfo setting takes precedence.
    • getTotalLabel

      Label getTotalLabel()
      The total label to use when renderOnlyLeftTotalLabels is TRUE for total. This label will appear in the left most column.
      Returns:
      the totalLabel
    • setTotalLabel

      void setTotalLabel(Label totalLabel)
      Sets the total label to use when renderOnlyLeftTotalLabels is TRUE for total.
      Parameters:
      totalLabel -
    • getPageTotalLabel

      Label getPageTotalLabel()
      The pageTotal label to use when renderOnlyLeftTotalLabels is TRUE for total. This label will appear in the left most column.
      Returns:
      the totalLabel
    • setPageTotalLabel

      void setPageTotalLabel(Label pageTotalLabel)
      Sets the pageTotal label to use when renderOnlyLeftTotalLabels is TRUE for total.
      Parameters:
      pageTotalLabel -
    • getGroupTotalLabelPrototype

      Label getGroupTotalLabelPrototype()
      The groupTotal label to use when renderOnlyLeftTotalLabels is TRUE. This label will appear in the left most column.
      Returns:
      the totalLabel
    • setGroupTotalLabelPrototype

      void setGroupTotalLabelPrototype(Label groupTotalLabelPrototype)
      Sets the groupTotal label to use when renderOnlyLeftTotalLabels is TRUE.
      Parameters:
      groupTotalLabelPrototype -
    • getColumnCalculations

      List<ColumnCalculationInfo> getColumnCalculations()
      Gets the column calculations. This is a list of ColumnCalcuationInfo that when set provides calculations to be performed on the columns they specify. These calculations appear in the table's footer. This feature is only available when using richTable functionality.
      Returns:
      the columnCalculations to use
    • setColumnCalculations

      void setColumnCalculations(List<ColumnCalculationInfo> columnCalculations)
      Sets the columnCalculations.
      Parameters:
      columnCalculations -
    • isRenderOnlyLeftTotalLabels

      boolean isRenderOnlyLeftTotalLabels()
      When true, labels for the totals fields will only appear in the left most column. Showing of the totals is controlled by the settings on the TableLayoutManager itself when this property is true.
      Returns:
      true when rendering totals footer labels in the left-most column, false otherwise
    • setRenderOnlyLeftTotalLabels

      void setRenderOnlyLeftTotalLabels(boolean renderOnlyLeftTotalLabels)
      Set the renderOnlyLeftTotalLabels flag for rendring total labels in the left-most column
      Parameters:
      renderOnlyLeftTotalLabels -
    • getFooterCalculationComponents

      List<Component> getFooterCalculationComponents()
      Gets the footer calculation components to be used by the layout. These are set by the framework and cannot be set directly.
      Returns:
      the list of components for the footer
    • getGroupingPropertyNames

      List<String> getGroupingPropertyNames()
      Gets the list of property names to use for grouping.

      When this property is set, grouping for this collection will be enabled and the lines of the collection will be grouped by the propertyName(s) supplied. Supplying multiple property names will cause the grouping to be on multiple fields and ordered alphabetically on "propetyValue1, propertyValue2" (this is also how the group title will display for each group). The property names supplied must be relative to the line, so #lp SHOULD NOT be used (it is assumed automatically).

      Returns:
      propertyNames to group on
    • setGroupingPropertyNames

      void setGroupingPropertyNames(List<String> groupingPropertyNames)
      Sets the list of property names to use for grouping.
      Parameters:
      groupingPropertyNames -
    • getGroupingTitle

      String getGroupingTitle()
      Get the groupingTitle. The groupingTitle MUST contain a SpringEL expression to uniquely identify a group's line (ie it cannot be a static string because each group must be identified by some value). This overrides groupingPropertyNames(if set) because it provides full control of grouping value used by the collection. SpringEL defined here must use #lp if referencing values of the line.
      Returns:
      groupingTitle to be used
    • setGroupingTitle

      void setGroupingTitle(String groupingTitle)
      Set the groupingTitle. This will throw an exception if the title does not contain a SpringEL expression.
      Parameters:
      groupingTitle -
    • getGroupingPrefix

      String getGroupingPrefix()
      Get the groupingPrefix. The groupingPrefix is used to prefix the generated title (not used when groupingTitle is set directly) when using groupingPropertyNames.
      Returns:
      String
    • setGroupingPrefix

      void setGroupingPrefix(String groupingPrefix)
      Set the groupingPrefix. This is not used when groupingTitle is set directly.
      Parameters:
      groupingPrefix -
    • isRowDetailsOpen

      boolean isRowDetailsOpen()
      If true, all details will be opened by default when the table loads. Can only be used on tables that have row details setup.
      Returns:
      true if row details
    • setRowDetailsOpen

      void setRowDetailsOpen(boolean rowDetailsOpen)
      Set if row details should be open on table load
      Parameters:
      rowDetailsOpen -
    • isShowToggleAllDetails

      boolean isShowToggleAllDetails()
      If true, the toggleAllDetailsAction will be shown. This button allows all details to be open/closed simultaneously.
      Returns:
      true if the action button to toggle all row details opened/closed
    • setShowToggleAllDetails

      void setShowToggleAllDetails(boolean showToggleAllDetails)
      Set if the toggleAllDetailsAction should be shown
      Parameters:
      showToggleAllDetails -
    • getToggleAllDetailsAction

      Action getToggleAllDetailsAction()
      The toggleAllDetailsAction action component used to toggle all row details open/closed. This property is set by the default configuration and should not be reset in most cases.
      Returns:
      Action component to use for the toggle action button
    • setToggleAllDetailsAction

      void setToggleAllDetailsAction(Action toggleAllDetailsAction)
      Set the toggleAllDetailsAction action component used to toggle all row details open/closed. This property is set by the default configuration and should not be reset in most cases.
      Parameters:
      toggleAllDetailsAction -
    • isAjaxDetailsRetrieval

      boolean isAjaxDetailsRetrieval()
      If true, when a row details open action is performed, it will get the details content from the server the first time it is opened. The methodToCall will be a component "refresh" call by default (this can be set on expandDetailsActionPrototype) and the additional action parameters sent to the server will be those set on the expandDetailsActionPrototype (lineIndex will be sent by default).
      Returns:
      true if ajax row details retrieval will be used
    • setAjaxDetailsRetrieval

      void setAjaxDetailsRetrieval(boolean ajaxDetailsRetrieval)
      Set if row details content should be retrieved fromt he server
      Parameters:
      ajaxDetailsRetrieval -
    • getExpandDetailsActionPrototype

      Action getExpandDetailsActionPrototype()
      The Action prototype used for the row details expand link. Should be set to "Uif-ExpandDetailsAction" or "Uif-ExpandDetailsImageAction". Properties can be configured to allow for different methodToCall and actionParameters to be set for ajax row details retrieval.
      Returns:
      the Action details link prototype
    • getGroupingColumnIndex

      int getGroupingColumnIndex()
      Gets the grouping column index
      Returns:
      the grouping column index
    • setExpandDetailsActionPrototype

      void setExpandDetailsActionPrototype(Action expandDetailsActionPrototype)
      Set the expand details Action prototype link
      Parameters:
      expandDetailsActionPrototype -
    • getConditionalRowCssClasses

      Map<String,String> getConditionalRowCssClasses()
      The row css classes for the rows of this layout

      To set a css class on all rows, use "all" as a key. To set a class for even rows, use "even" as a key, for odd rows, use "odd". Use a one-based index to target a specific row by index. SpringEL can be used as a key and the expression will be evaluated; if evaluated to true, the class(es) specified will be applied.

      Returns:
      a map which represents the css classes of the rows of this layout
    • setConditionalRowCssClasses

      void setConditionalRowCssClasses(Map<String,String> conditionalRowCssClasses)
      Set the conditionalRowCssClasses
      Parameters:
      conditionalRowCssClasses -
    • getColumnCalculationComponents

      List<Component> getColumnCalculationComponents()
      Gets a list of column calculation components.
      Returns:
      list of column calculation components