public class TableLayoutManagerBase extends CollectionLayoutManagerBase implements TableLayoutManager
Based on the fields defined, the TableLayoutManager
will dynamically create instances of
the fields for each collection row. In addition, the manager can create standard fields like the
action and sequence fields for each row. The manager supports options inherited from the
GridLayoutManager
such as rowSpan, colSpan, and cell width settings.
componentCode, namespaceCode
Constructor and Description |
---|
TableLayoutManagerBase() |
Modifier and Type | Method and Description |
---|---|
protected void |
addActionColumn(CollectionGroup collectionGroup,
String idSuffix,
Object currentLine,
int lineIndex,
int rowSpan,
List<? extends Component> actions)
Creates a field group wrapper for the given actions based on
getActionFieldPrototype() . |
protected void |
addActionHeader(int rowCount,
int cellPosition)
Adds the action header
|
protected void |
addHeaderField(Field field,
int column)
Creates a new instance of the header field prototype and then sets the label to the short (if
useShortLabels is set to true) or long label of the given component.
|
void |
buildLine(LineBuilderContext lineBuilderContext)
Assembles the field instances for the collection line.
|
protected void |
buildTableHeaderRows(CollectionGroup collectionGroup,
List<Field> lineFields)
Create the
Label instances that will be used to render the table header |
protected int |
calculateNumberOfRows(List<? extends Field> items)
Calculates how many rows will be needed per collection line to display the list of fields.
|
void |
completeValidation(ValidationTrace tracer)
Validates different requirements of component compiling a series of reports detailing
information on errors found in the component.
|
int |
getActionColumnIndex()
Indicates the index of the action column
|
String |
getActionColumnPlacement()
Indicates the actions column placement
|
FieldGroup |
getActionFieldPrototype()
FieldGroup instance to serve as a prototype for the actions column. |
List<Field> |
getAllRowFields()
List of
Field instances that make up all the table's rows of data |
List<Component> |
getColumnCalculationComponents()
Gets a list of column calculation components.
|
List<ColumnCalculationInfo> |
getColumnCalculations()
Gets the column calculations.
|
List<String> |
getColumnsToCalculate()
A list of all the columns to be calculated
|
Map<String,String> |
getConditionalRowCssClasses()
The row css classes for the rows of this layout
|
Action |
getExpandDetailsActionPrototype()
The Action prototype used for the row details expand link.
|
List<Field> |
getFirstRowFields()
List of
Field instances that make us the table's first row of data |
List<Component> |
getFooterCalculationComponents()
Gets the footer calculation components to be used by the layout.
|
int |
getGroupingColumnIndex()
Gets the grouping column index
|
String |
getGroupingPrefix()
Get the groupingPrefix.
|
List<String> |
getGroupingPropertyNames()
Gets the list of property names to use for grouping.
|
String |
getGroupingTitle()
Get the groupingTitle.
|
Label |
getGroupTotalLabelPrototype()
The groupTotal label to use when renderOnlyLeftTotalLabels is TRUE.
|
Label |
getHeaderLabelPrototype()
Label instance to use as a prototype for creating the tables header fields. |
List<Label> |
getHeaderLabels()
List of
Label instances that should be rendered to make up the tables header |
Set<String> |
getHiddenColumns()
Gets a set of property names defining hidden columns.
|
int |
getNumberOfColumns()
Indicates the number of columns that should make up one row of data.
|
int |
getNumberOfDataColumns() |
Label |
getPageTotalLabel()
The pageTotal label to use when renderOnlyLeftTotalLabels is TRUE for total.
|
RichTable |
getRichTable()
Widget associated with the table to add functionality such as sorting, paging, and export
|
List<String> |
getRowCssClasses()
List of styles for each row.
|
List<String> |
getRowDataAttributes()
List of data attributes for each row.
|
Group |
getRowDetailsGroup()
The row details info group to use when using a TableLayoutManager with the a richTable.
|
Field |
getSequenceFieldPrototype()
Field instance to serve as a prototype for the sequence field. |
String |
getSequencePropertyName()
Attribute name to use as sequence value.
|
Set<String> |
getSortableColumns()
Gets a set of property names defining sortable columns.
|
Class<? extends Container> |
getSupportedContainer()
Default Impl
Determines what
Container classes are supported by the
LayoutManager |
Action |
getToggleAllDetailsAction()
The toggleAllDetailsAction action component used to toggle all row details open/closed.
|
Label |
getTotalLabel()
The total label to use when renderOnlyLeftTotalLabels is TRUE for total.
|
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.
|
boolean |
isApplyAlternatingRowStyles()
Indicates whether alternating row styles should be applied.
|
boolean |
isApplyDefaultCellWidths()
Indicates whether the manager should default the cell widths.
|
Boolean |
isAutoTruncateColumns()
Indicates whether the column text should be truncated when the table cell
is to small to display the text without wrapping.
|
boolean |
isGenerateAutoSequence()
Indicates whether the sequence field should be generated with the current line number
|
boolean |
isRenderOnlyLeftTotalLabels()
When true, labels for the totals fields will only appear in the left most column.
|
boolean |
isRenderSequenceField()
Indicates whether the sequence field should be rendered for the collection
|
boolean |
isRepeatHeader()
Indicates whether the header should be repeated before each collection row.
|
boolean |
isRowDetailsOpen()
If true, all details will be opened by default when the table loads.
|
boolean |
isSeparateAddLine()
Indicates whether the add line should be rendered in a separate group, or as part of the
table (first line)
|
boolean |
isShowGroupTotal()
Gets showGroupTotal.
|
boolean |
isShowPageTotal()
Gets showTotal.
|
boolean |
isShowToggleAllDetails()
If true, the toggleAllDetailsAction will be shown.
|
boolean |
isShowTotal()
Gets showTotal.
|
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.
|
boolean |
isUseShortLabels()
Indicates whether the short label for the collection field should be used as the table header
or the regular label
|
void |
performApplyModel(Object model,
LifecycleElement parent)
Takes expressions that may be set in the columnCalculation
objects and populates them correctly into those component's propertyExpressions.
|
void |
performFinalize(Object model,
LifecycleElement parent)
The last phase before the view is rendered
|
void |
performInitialization(Object model)
Initializes the component
|
void |
processPagingRequest(Object model,
CollectionGroup collectionGroup)
Invokes instance of
DataTablesPagingHelper to carry out
the paging request using data tables API. |
protected void |
setActionColumnIndex(int actionColumnIndex)
Sets action column index
|
void |
setActionColumnPlacement(String actionColumnPlacement)
Setter for the action column placement
|
void |
setActionFieldPrototype(FieldGroup actionFieldPrototype)
Setter for the action field prototype
|
void |
setAjaxDetailsRetrieval(boolean ajaxDetailsRetrieval)
Set if row details content should be retrieved fromt he server
|
protected void |
setAllRowFields(List<Field> allRowFields)
Set the row fields
|
void |
setApplyAlternatingRowStyles(boolean applyAlternatingRowStyles) |
void |
setApplyDefaultCellWidths(boolean applyDefaultCellWidths) |
void |
setAutoTruncateColumns(Boolean autoTruncateColumns) |
protected void |
setCellAttributes(Component component)
Moves the width, align, and valign settings of the component to the corresponding cell properties (if not
already configured)
|
void |
setColumnCalculations(List<ColumnCalculationInfo> columnCalculations)
Sets the columnCalculations.
|
protected void |
setColumnsToCalculate(List<String> columnsToCalculate)
Set columns to calculate
|
void |
setConditionalRowCssClasses(Map<String,String> conditionalRowCssClasses)
Set the conditionalRowCssClasses
|
void |
setExpandDetailsActionPrototype(Action expandDetailsActionPrototype)
Set the expand details Action prototype link
|
protected void |
setFirstRowFields(List<Field> firstRowFields)
Set the first row fields
|
protected void |
setFooterCalculationComponents(List<Component> footerCalculationComponents)
Set footer calculation components
|
void |
setGenerateAutoSequence(boolean generateAutoSequence)
Setter for the generate auto sequence field
|
protected void |
setGenerateGroupTotalRows(boolean generateGroupTotalRows)
Set flag generate group total rows
|
protected void |
setGroupingColumnIndex(int groupingColumnIndex)
Set grouping column index
|
void |
setGroupingPrefix(String groupingPrefix)
Set the groupingPrefix.
|
void |
setGroupingPropertyNames(List<String> groupingPropertyNames)
Sets the list of property names to use for grouping.
|
void |
setGroupingTitle(String groupingTitle)
Set the groupingTitle.
|
void |
setGroupTotalLabelPrototype(Label groupTotalLabelPrototype)
Sets the groupTotal label to use when renderOnlyLeftTotalLabels is TRUE.
|
protected void |
setHeaderAdded(boolean headerAdded)
Set flag of whether a header is added
|
void |
setHeaderLabelPrototype(Label headerLabelPrototype)
Setter for the header field prototype
|
protected void |
setHeaderLabels(List<Label> headerLabels)
Set the header labels
|
void |
setHiddenColumns(Set<String> hiddenColumns)
Setter for
TableLayoutManager.getHiddenColumns() . |
void |
setNumberOfColumns(int numberOfColumns) |
void |
setNumberOfDataColumns(int numberOfDataColumns) |
void |
setPageTotalLabel(Label pageTotalLabel)
Sets the pageTotal label to use when renderOnlyLeftTotalLabels is TRUE for total.
|
void |
setRenderOnlyLeftTotalLabels(boolean renderOnlyLeftTotalLabels)
Set the renderOnlyLeftTotalLabels flag for rendring total labels in the left-most column
|
void |
setRenderSequenceField(boolean renderSequenceField)
Setter for the render sequence field indicator
|
void |
setRepeatHeader(boolean repeatHeader)
Setter for the repeat header indicator
|
void |
setRichTable(RichTable richTable)
Setter for the rich table widget
|
void |
setRowCssClasses(List<String> rowCssClasses) |
void |
setRowDataAttributes(List<String> rowDataAttributes) |
void |
setRowDetailsGroup(Group rowDetailsGroup)
Set the row details info group
|
void |
setRowDetailsOpen(boolean rowDetailsOpen)
Set if row details should be open on table load
|
void |
setSeparateAddLine(boolean separateAddLine)
Setter for the separate add line indicator
|
void |
setSequenceFieldPrototype(Field sequenceFieldPrototype)
Setter for the sequence field prototype
|
void |
setSequencePropertyName(String sequencePropertyName)
Setter for the sequence property name
|
void |
setShowGroupTotal(boolean showGroupTotal)
Sets showGroupTotal.
|
void |
setShowPageTotal(boolean showPageTotal)
Sets showPageTotal.
|
void |
setShowToggleAllDetails(boolean showToggleAllDetails)
Set if the toggleAllDetailsAction should be shown
|
void |
setShowTotal(boolean showTotal)
Sets showTotal.
|
void |
setSortableColumns(Set<String> sortableColumns)
Setterfor
TableLayoutManager.getSortableColumns() . |
void |
setSuppressLineWrapping(boolean suppressLineWrapping) |
void |
setToggleAllDetailsAction(Action toggleAllDetailsAction)
Set the toggleAllDetailsAction action component used to toggle all row details open/closed.
|
void |
setTotalLabel(Label totalLabel)
Sets the total label to use when renderOnlyLeftTotalLabels is TRUE for total.
|
protected void |
setupColumnCalculations(Object model,
Container container,
int totalColumns)
Setup the column calculations functionality and components
|
void |
setupDetails(CollectionGroup collectionGroup)
Creates the details group for the line using the information setup through the setter methods
of this interface.
|
protected void |
setupGrouping(Object model,
CollectionGroup collectionGroup)
Sets up the grouping MessageField to be used in the first column of the table layout for
grouping collection content into groups based on values of the line's fields.
|
protected Field |
setupTotalField(Field totalField,
ColumnCalculationInfo cInfo,
boolean show,
Label leftLabel,
String type,
int leftLabelColumnIndex)
Setup the totalField with the columnCalculationInfo(cInfo) passed in.
|
void |
setUseShortLabels(boolean useShortLabels)
Setter for the use short label indicator
|
addEnterKeyDataAttributeToGroup, getAddLineGroup, getPagerWidget, getSelectFieldPrototype, getSubCollectionFieldGroupPrototype, setAddLineGroup, setPagerWidget, setSelectFieldPrototype, setSubCollectionFieldGroupPrototype
addStyleClass, appendToStyle, checkMutable, clone, getAdditionalCssClasses, getContainerIdSuffix, getContext, getCssClasses, getId, getLibraryCssClasses, getPhasePathMapping, getPropertyReplacers, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, pushAllToContext, pushObjectToContext, setAdditionalCssClasses, setContainerIdSuffix, setContext, setCssClasses, setId, setLibraryCssClasses, setPhasePathMapping, setPropertyReplacers, setRender, setStyle, setStyleClasses, setTemplate, setTemplateName, setViewPath, setViewStatus, skipLifecycle
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAddLineGroup, getPagerWidget, getSelectFieldPrototype, getSubCollectionFieldGroupPrototype, setAddLineGroup, setPagerWidget, setSelectFieldPrototype, setSubCollectionFieldGroupPrototype
addStyleClass, appendToStyle, getAdditionalCssClasses, getCssClasses, getLibraryCssClasses, getPropertyReplacers, getStyle, getTemplate, getTemplateName, setAdditionalCssClasses, setCssClasses, setLibraryCssClasses, setPropertyReplacers, setStyle, setTemplate, setTemplateName
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
checkMutable, getContainerIdSuffix, getContext, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, pushAllToContext, pushObjectToContext, setContainerIdSuffix, setContext, setId, setPhasePathMapping, setRender, setViewPath, setViewStatus, skipLifecycle
public TableLayoutManagerBase()
public void performInitialization(Object model)
Where components can set defaults and setup other necessary state. The initialize method should only be called once per component lifecycle and is invoked within the initialize phase of the view lifecylce.
performInitialization
in interface LifecycleElement
performInitialization
in class LayoutManagerBase
model
- - object instance containing the view dataComponentDefaultInitializeTask
public void performApplyModel(Object model, LifecycleElement parent)
Where components can perform conditional logic such as dynamically generating new fields or setting field state based on the given data
performApplyModel
in interface LifecycleElement
performApplyModel
in class LayoutManagerBase
model
- - Top level object containing the data (could be the form or a
top level business object, dto)parent
- parent lifecycle elementpublic void performFinalize(Object model, LifecycleElement parent)
Here final preparations can be made based on the updated view state.
performFinalize
in interface LifecycleElement
performFinalize
in class LayoutManagerBase
model
- - top level object containing the dataparent
- - parent componentprotected void setupGrouping(Object model, CollectionGroup collectionGroup)
model
- The model for the active lifecyclecollectionGroup
- collection group for this layoutprotected void setupColumnCalculations(Object model, Container container, int totalColumns)
model
- the modelcontainer
- the parent containertotalColumns
- total number of columns in the tableprotected Field setupTotalField(Field totalField, ColumnCalculationInfo cInfo, boolean show, Label leftLabel, String type, int leftLabelColumnIndex)
totalField
- the field to setupcInfo
- ColumnCalculation info to use to setup the fieldshow
- show the field (if renderOnlyLeftTotalLabels is true, otherwise uses value in
cInfo)leftLabel
- the leftLabel, not used if renderOnlyLeftTotalLabels is falsetype
- type used to set the dataAttribute role - used by the js for selectionleftLabelColumnIndex
- index of the leftLabelColumn (0 or 1 if grouping enabled - hidden
column)public void buildLine(LineBuilderContext lineBuilderContext)
The given sequence field prototype is copied for the line sequence field. Likewise a copy of the actionFieldPrototype is made and the given actions are set as the items for the action field. Finally the generated items are assembled together into the allRowFields list with the given lineFields.
Call to the layout manager to build the components necessary for the given collection line, within an active view lifecycle.As the collection is being iterated over by the CollectionGroupLineBuilder
this method is invoked for each line. The builder will create copies of the configured fields and actions for
the line and pass into the layout manager so they can be assembled
buildLine
in interface CollectionLayoutManager
lineBuilderContext
- context for the line to be builtprotected void addActionColumn(CollectionGroup collectionGroup, String idSuffix, Object currentLine, int lineIndex, int rowSpan, List<? extends Component> actions)
getActionFieldPrototype()
.collectionGroup
- collection group being builtidSuffix
- id suffix for the action fieldcurrentLine
- line object for the current line being builtlineIndex
- index of the line being builtrowSpan
- number of rows the action field should spanactions
- action components that should be to the field groupprotected void buildTableHeaderRows(CollectionGroup collectionGroup, List<Field> lineFields)
Label
instances that will be used to render the table header
For each column, a copy of headerLabelPrototype is made that determines the label configuration. The actual label text comes from the field for which the header applies to. The first column is always the sequence (if enabled) and the last column contains the actions. Both the sequence and action header fields will span all rows for the header.
The headerLabels list will contain the final list of header fields built
collectionGroup
- CollectionGroup container the table applies tolineFields
- fields for the data columns from which the headers are pulledprotected void addActionHeader(int rowCount, int cellPosition)
protected void addHeaderField(Field field, int column)
After created the header field is added to the list making up the table header
field
- field instance the header field is being created forcolumn
- column number for the header, used for setting the idprotected int calculateNumberOfRows(List<? extends Field> items)
items
- list of items that make up one collection lineprotected void setCellAttributes(Component component)
component
- instance to adjust settings forpublic void processPagingRequest(Object model, CollectionGroup collectionGroup)
DataTablesPagingHelper
to carry out
the paging request using data tables API.
There are two types of paging supported in the table layout, one that uses data tables paging API, and one that handles basic table paging.
Invoked when a paging request occurs to carry out the paging request.processPagingRequest
in interface CollectionLayoutManager
model
- object containing the view's datacollectionGroup
- collection group the request was made forpublic Class<? extends Container> getSupportedContainer()
Container
classes are supported by the
LayoutManager
getSupportedContainer
in interface LayoutManager
getSupportedContainer
in class LayoutManagerBase
public List<Component> getColumnCalculationComponents()
getColumnCalculationComponents
in interface TableLayoutManager
public int getNumberOfColumns()
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).
getNumberOfColumns
in interface TableLayoutManager
public void setNumberOfColumns(int numberOfColumns)
setNumberOfColumns
in interface TableLayoutManager
TableLayoutManager.getNumberOfColumns()
public boolean isSuppressLineWrapping()
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
isSuppressLineWrapping
in interface TableLayoutManager
public void setSuppressLineWrapping(boolean suppressLineWrapping)
setSuppressLineWrapping
in interface TableLayoutManager
TableLayoutManager.isSuppressLineWrapping()
public Boolean isAutoTruncateColumns()
A tooltip is added to the table cell which displays the text before truncation.
isAutoTruncateColumns
in interface TableLayoutManager
public void setAutoTruncateColumns(Boolean autoTruncateColumns)
setAutoTruncateColumns
in interface TableLayoutManager
TableLayoutManager.isAutoTruncateColumns()
public boolean isApplyAlternatingRowStyles()
Indicator to layout manager templates to apply alternating row styles. See the configured template for the actual style classes used
isApplyAlternatingRowStyles
in interface TableLayoutManager
public void setApplyAlternatingRowStyles(boolean applyAlternatingRowStyles)
setApplyAlternatingRowStyles
in interface TableLayoutManager
TableLayoutManager.isApplyAlternatingRowStyles()
public boolean isApplyDefaultCellWidths()
If true, the manager will set the cell width by equally dividing by the number of columns
isApplyDefaultCellWidths
in interface TableLayoutManager
public void setApplyDefaultCellWidths(boolean applyDefaultCellWidths)
setApplyDefaultCellWidths
in interface TableLayoutManager
TableLayoutManager.isApplyDefaultCellWidths()
public List<String> getRowCssClasses()
Each entry in the list gives the style for the row with the same index. This style will be added to the
getRowCssClasses
in interface TableLayoutManager
public void setRowCssClasses(List<String> rowCssClasses)
setRowCssClasses
in interface TableLayoutManager
TableLayoutManager.getRowCssClasses()
public List<String> getRowDataAttributes()
Each entry in the list gives the data attributes for the row with the same index. These data attributes will be added to the
getRowDataAttributes
in interface TableLayoutManager
public void setRowDataAttributes(List<String> rowDataAttributes)
setRowDataAttributes
in interface TableLayoutManager
TableLayoutManager.getRowDataAttributes()
public boolean isUseShortLabels()
isUseShortLabels
in interface TableLayoutManager
public void setUseShortLabels(boolean useShortLabels)
setUseShortLabels
in interface TableLayoutManager
public boolean isRepeatHeader()
isRepeatHeader
in interface TableLayoutManager
public void setRepeatHeader(boolean repeatHeader)
setRepeatHeader
in interface TableLayoutManager
@ViewLifecycleRestriction(value="INITIALIZE") public 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 necessarygetHeaderLabelPrototype
in interface TableLayoutManager
public void setHeaderLabelPrototype(Label headerLabelPrototype)
setHeaderLabelPrototype
in interface TableLayoutManager
public List<Label> getHeaderLabels()
Label
instances that should be rendered to make up the tables headergetHeaderLabels
in interface TableLayoutManager
public boolean isRenderSequenceField()
isRenderSequenceField
in interface TableLayoutManager
public void setRenderSequenceField(boolean renderSequenceField)
setRenderSequenceField
in interface TableLayoutManager
public String getSequencePropertyName()
getSequencePropertyName
in interface TableLayoutManager
public void setSequencePropertyName(String sequencePropertyName)
setSequencePropertyName
in interface TableLayoutManager
public boolean isGenerateAutoSequence()
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
isGenerateAutoSequence
in interface TableLayoutManager
public void setGenerateAutoSequence(boolean generateAutoSequence)
setGenerateAutoSequence
in interface TableLayoutManager
@ViewLifecycleRestriction(value="INITIALIZE") public Field getSequenceFieldPrototype()
Field
instance to serve as a prototype for the sequence field. For each collection
line this instance is copied and adjusted as necessarygetSequenceFieldPrototype
in interface TableLayoutManager
public void setSequenceFieldPrototype(Field sequenceFieldPrototype)
setSequenceFieldPrototype
in interface TableLayoutManager
@ViewLifecycleRestriction(value="INITIALIZE") public 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 headergetActionFieldPrototype
in interface TableLayoutManager
public void setActionFieldPrototype(FieldGroup actionFieldPrototype)
setActionFieldPrototype
in interface TableLayoutManager
public boolean isSeparateAddLine()
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.
isSeparateAddLine
in interface TableLayoutManager
public void setSeparateAddLine(boolean separateAddLine)
setSeparateAddLine
in interface TableLayoutManager
public List<Field> getAllRowFields()
Field
instances that make up all the table's rows of datagetAllRowFields
in interface TableLayoutManager
@ViewLifecycleRestriction public List<Field> getFirstRowFields()
Field
instances that make us the table's first row of datagetFirstRowFields
in interface TableLayoutManager
public RichTable getRichTable()
getRichTable
in interface TableLayoutManager
public void setRichTable(RichTable richTable)
setRichTable
in interface TableLayoutManager
public int getNumberOfDataColumns()
getNumberOfDataColumns
in interface TableLayoutManager
public void setNumberOfDataColumns(int numberOfDataColumns)
setNumberOfDataColumns
in interface TableLayoutManager
numberOfDataColumns
- the numberOfDataColumns to setpublic Set<String> getHiddenColumns()
getHiddenColumns
in interface TableLayoutManager
RichTable.getHiddenColumns()
public void setHiddenColumns(Set<String> hiddenColumns)
TableLayoutManager.getHiddenColumns()
.setHiddenColumns
in interface TableLayoutManager
hiddenColumns
- set of property namespublic Set<String> getSortableColumns()
getSortableColumns
in interface TableLayoutManager
RichTable.getSortableColumns()
public void setSortableColumns(Set<String> sortableColumns)
TableLayoutManager.getSortableColumns()
.setSortableColumns
in interface TableLayoutManager
sortableColumns
- set of property namespublic int getActionColumnIndex()
getActionColumnIndex
in interface TableLayoutManager
public String getActionColumnPlacement()
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.
getActionColumnPlacement
in interface TableLayoutManager
public void setActionColumnPlacement(String actionColumnPlacement)
setActionColumnPlacement
in interface TableLayoutManager
actionColumnPlacement
- action column placement string@ViewLifecycleRestriction(value="PRE_PROCESS") public Group getRowDetailsGroup()
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.
getRowDetailsGroup
in interface TableLayoutManager
public void setRowDetailsGroup(Group rowDetailsGroup)
TableLayoutManager
setRowDetailsGroup
in interface TableLayoutManager
rowDetailsGroup
- row details groupgetRowDetailsGroup()
public void setupDetails(CollectionGroup collectionGroup)
collectionGroup
- the CollectionGroup for this TableLayoutManagerpublic List<String> getColumnsToCalculate()
The list must contain valid column indexes. The indexes takes all displayed columns into account.
getColumnsToCalculate
in interface TableLayoutManager
public boolean isShowTotal()
isShowTotal
in interface TableLayoutManager
public void setShowTotal(boolean showTotal)
setShowTotal
in interface TableLayoutManager
public boolean isShowPageTotal()
isShowPageTotal
in interface TableLayoutManager
public void setShowPageTotal(boolean showPageTotal)
setShowPageTotal
in interface TableLayoutManager
public boolean isShowGroupTotal()
isShowGroupTotal
in interface TableLayoutManager
public void setShowGroupTotal(boolean showGroupTotal)
setShowGroupTotal
in interface TableLayoutManager
public Label getTotalLabel()
getTotalLabel
in interface TableLayoutManager
public void setTotalLabel(Label totalLabel)
setTotalLabel
in interface TableLayoutManager
public Label getPageTotalLabel()
getPageTotalLabel
in interface TableLayoutManager
public void setPageTotalLabel(Label pageTotalLabel)
setPageTotalLabel
in interface TableLayoutManager
public Label getGroupTotalLabelPrototype()
getGroupTotalLabelPrototype
in interface TableLayoutManager
public void setGroupTotalLabelPrototype(Label groupTotalLabelPrototype)
setGroupTotalLabelPrototype
in interface TableLayoutManager
public List<ColumnCalculationInfo> getColumnCalculations()
getColumnCalculations
in interface TableLayoutManager
public void setColumnCalculations(List<ColumnCalculationInfo> columnCalculations)
setColumnCalculations
in interface TableLayoutManager
public boolean isRenderOnlyLeftTotalLabels()
isRenderOnlyLeftTotalLabels
in interface TableLayoutManager
public void setRenderOnlyLeftTotalLabels(boolean renderOnlyLeftTotalLabels)
setRenderOnlyLeftTotalLabels
in interface TableLayoutManager
public List<Component> getFooterCalculationComponents()
getFooterCalculationComponents
in interface TableLayoutManager
public List<String> getGroupingPropertyNames()
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).
getGroupingPropertyNames
in interface TableLayoutManager
public void setGroupingPropertyNames(List<String> groupingPropertyNames)
setGroupingPropertyNames
in interface TableLayoutManager
public String getGroupingTitle()
getGroupingTitle
in interface TableLayoutManager
public void setGroupingTitle(String groupingTitle)
setGroupingTitle
in interface TableLayoutManager
public String getGroupingPrefix()
getGroupingPrefix
in interface TableLayoutManager
public void setGroupingPrefix(String groupingPrefix)
setGroupingPrefix
in interface TableLayoutManager
public boolean isRowDetailsOpen()
isRowDetailsOpen
in interface TableLayoutManager
public void setRowDetailsOpen(boolean rowDetailsOpen)
setRowDetailsOpen
in interface TableLayoutManager
public boolean isShowToggleAllDetails()
isShowToggleAllDetails
in interface TableLayoutManager
public void setShowToggleAllDetails(boolean showToggleAllDetails)
setShowToggleAllDetails
in interface TableLayoutManager
public Action getToggleAllDetailsAction()
getToggleAllDetailsAction
in interface TableLayoutManager
public void setToggleAllDetailsAction(Action toggleAllDetailsAction)
setToggleAllDetailsAction
in interface TableLayoutManager
public boolean isAjaxDetailsRetrieval()
isAjaxDetailsRetrieval
in interface TableLayoutManager
public void setAjaxDetailsRetrieval(boolean ajaxDetailsRetrieval)
setAjaxDetailsRetrieval
in interface TableLayoutManager
@ViewLifecycleRestriction(value="INITIALIZE") public Action getExpandDetailsActionPrototype()
getExpandDetailsActionPrototype
in interface TableLayoutManager
public int getGroupingColumnIndex()
getGroupingColumnIndex
in interface TableLayoutManager
public void setExpandDetailsActionPrototype(Action expandDetailsActionPrototype)
setExpandDetailsActionPrototype
in interface TableLayoutManager
protected void setHeaderLabels(List<Label> headerLabels)
protected void setAllRowFields(List<Field> allRowFields)
protected void setFirstRowFields(List<Field> firstRowFields)
protected void setHeaderAdded(boolean headerAdded)
protected void setActionColumnIndex(int actionColumnIndex)
protected void setGroupingColumnIndex(int groupingColumnIndex)
protected void setGenerateGroupTotalRows(boolean generateGroupTotalRows)
protected void setColumnsToCalculate(List<String> columnsToCalculate)
protected void setFooterCalculationComponents(List<Component> footerCalculationComponents)
public Map<String,String> getConditionalRowCssClasses()
TableLayoutManager
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.
getConditionalRowCssClasses
in interface TableLayoutManager
TableLayoutManager.getConditionalRowCssClasses()
public void setConditionalRowCssClasses(Map<String,String> conditionalRowCssClasses)
TableLayoutManager
setConditionalRowCssClasses
in interface TableLayoutManager
TableLayoutManager.setConditionalRowCssClasses(java.util.Map)
public void completeValidation(ValidationTrace tracer)
tracer
- record of component's locationCopyright © 2005–2016 The Kuali Foundation. All rights reserved.