Class TableRowBuilder

java.lang.Object
org.kuali.rice.krad.uif.layout.collections.TableRowBuilder
All Implemented Interfaces:
Serializable

public class TableRowBuilder extends Object implements Serializable
Builds out a collection line into a table row. TODO: This have duplicate logic from table layout manager, the goal is to move all logic from the layout manager to this class
Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Constructor Details

    • TableRowBuilder

      public TableRowBuilder()
      Empty Constructor.
    • TableRowBuilder

      public TableRowBuilder(CollectionGroup collectionGroup, LineBuilderContext lineBuilderContext)
      Constructor taking the collection group instance and context for the line.
      Parameters:
      collectionGroup - collection group the table row is being built for
      lineBuilderContext - components and other configuration for the line to build
  • Method Details

    • buildRow

      public TableRow buildRow()
      Takes the context given for the line and builds out a table row instance.

      The row is built out based on a determined order of special columns (sequence, line selection) and then each field from the configured items list. Since the placement of the action column is configurable, it is handled by the TableRowBuilder.ColumnCollector

      Returns:
      table row instance for the line
    • addSequenceColumn

      protected void addSequenceColumn(TableRowBuilder.ColumnCollector columnCollector)
      Adds the sequence column to the given column collector.

      Sequence column is created with a new message component for the add line, and by copying TableLayoutManager.getSequenceFieldPrototype() for existing rows.

      Parameters:
      columnCollector - object collecting the columns for the row
    • addLineSelectColumn

      protected void addLineSelectColumn(TableRowBuilder.ColumnCollector columnCollector)
      Adds the line select column to the given column collector.

      The line select column is used to select rows for an action (such as lookup return).

      Parameters:
      columnCollector - object collecting the columns for the row
    • addGroupingColumn

      protected void addGroupingColumn(TableRowBuilder.ColumnCollector columnCollector)
      Adds the grouping column to the given column collector.

      The grouping column is used when table grouping is on to render a header for the group. The data tables plugin will pull the value from this column and render the header row.

      Parameters:
      columnCollector - object collecting the columns for the row