Class TableRowBuilder
java.lang.Object
org.kuali.rice.krad.uif.layout.collections.TableRowBuilder
- All Implemented Interfaces:
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassHelper class for collecting columsn that will make up a table row. -
Constructor Summary
ConstructorsConstructorDescriptionEmpty Constructor.TableRowBuilder(CollectionGroup collectionGroup, LineBuilderContext lineBuilderContext) Constructor taking the collection group instance and context for the line. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddGroupingColumn(TableRowBuilder.ColumnCollector columnCollector) Adds the grouping column to the given column collector.protected voidaddLineSelectColumn(TableRowBuilder.ColumnCollector columnCollector) Adds the line select column to the given column collector.protected voidaddSequenceColumn(TableRowBuilder.ColumnCollector columnCollector) Adds the sequence column to the given column collector.buildRow()Takes the context given for the line and builds out a table row instance.
-
Constructor Details
-
TableRowBuilder
public TableRowBuilder()Empty Constructor. -
TableRowBuilder
Constructor taking the collection group instance and context for the line.- Parameters:
collectionGroup- collection group the table row is being built forlineBuilderContext- components and other configuration for the line to build
-
-
Method Details
-
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
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
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
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
-