Class TableLayoutManagerBase
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean,CollectionLayoutManager,LayoutManager,TableLayoutManager,LifecycleElement
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.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Field Summary
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddActionColumn(CollectionGroup collectionGroup, String idSuffix, Object currentLine, int lineIndex, int rowSpan, List<? extends Component> actions) Creates a field group wrapper for the given actions based ongetActionFieldPrototype().protected voidaddActionHeader(int rowCount, int cellPosition) Adds the action headerprotected voidaddHeaderField(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.voidbuildLine(LineBuilderContext lineBuilderContext) Assembles the field instances for the collection line.protected voidbuildTableHeaderRows(CollectionGroup collectionGroup, List<Field> lineFields) Create theLabelinstances that will be used to render the table headerprotected intcalculateNumberOfRows(List<? extends Field> items) Calculates how many rows will be needed per collection line to display the list of fields.voidcompleteValidation(ValidationTrace tracer) Validates different requirements of component compiling a series of reports detailing information on errors found in the component.intIndicates the index of the action columnIndicates the actions column placementFieldGroupinstance to serve as a prototype for the actions column.List ofFieldinstances that make up all the table's rows of dataGets a list of column calculation components.Gets the column calculations.A list of all the columns to be calculatedThe row css classes for the rows of this layoutThe Action prototype used for the row details expand link.List ofFieldinstances that make us the table's first row of dataGets the footer calculation components to be used by the layout.intGets the grouping column indexGet the groupingPrefix.Gets the list of property names to use for grouping.Get the groupingTitle.The groupTotal label to use when renderOnlyLeftTotalLabels is TRUE.Labelinstance to use as a prototype for creating the tables header fields.List ofLabelinstances that should be rendered to make up the tables headerGets a set of property names defining hidden columns.intIndicates the number of columns that should make up one row of data.intThe pageTotal label to use when renderOnlyLeftTotalLabels is TRUE for total.Widget associated with the table to add functionality such as sorting, paging, and exportList of styles for each row.List of data attributes for each row.The row details info group to use when using a TableLayoutManager with the a richTable.Fieldinstance to serve as a prototype for the sequence field.Attribute name to use as sequence value.Gets a set of property names defining sortable columns.Default Impl Determines whatContainerclasses are supported by theLayoutManagerThe toggleAllDetailsAction action component used to toggle all row details open/closed.The total label to use when renderOnlyLeftTotalLabels is TRUE for total.booleanIf true, when a row details open action is performed, it will get the details content from the server the first time it is opened.booleanIndicates whether alternating row styles should be applied.booleanIndicates whether the manager should default the cell widths.Indicates whether the column text should be truncated when the table cell is to small to display the text without wrapping.booleanIndicates whether the sequence field should be generated with the current line numberbooleanWhen true, labels for the totals fields will only appear in the left most column.booleanIndicates whether the sequence field should be rendered for the collectionbooleanIndicates whether the header should be repeated before each collection row.booleanIf true, all details will be opened by default when the table loads.booleanIndicates whether the add line should be rendered in a separate group, or as part of the table (first line)booleanGets 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.booleanGets showTotal. showTotal shows/calculates the total field when true, otherwise it is not rendered.booleanIf true, the toggleAllDetailsAction will be shown.booleanGets showTotal. showTotal shows/calculates the total field when true, otherwise it is not rendered.booleanIndicates 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.booleanIndicates whether the short label for the collection field should be used as the table header or the regular labelvoidperformApplyModel(Object model, LifecycleElement parent) Takes expressions that may be set in the columnCalculation objects and populates them correctly into those component's propertyExpressions.voidperformFinalize(Object model, LifecycleElement parent) The last phase before the view is renderedvoidperformInitialization(Object model) Initializes the componentvoidprocessPagingRequest(Object model, CollectionGroup collectionGroup) Invokes instance ofDataTablesPagingHelperto carry out the paging request using data tables API.protected voidsetActionColumnIndex(int actionColumnIndex) Sets action column indexvoidsetActionColumnPlacement(String actionColumnPlacement) Setter for the action column placementvoidsetActionFieldPrototype(FieldGroup actionFieldPrototype) Setter for the action field prototypevoidsetAjaxDetailsRetrieval(boolean ajaxDetailsRetrieval) Set if row details content should be retrieved fromt he serverprotected voidsetAllRowFields(List<Field> allRowFields) Set the row fieldsvoidsetApplyAlternatingRowStyles(boolean applyAlternatingRowStyles) voidsetApplyDefaultCellWidths(boolean applyDefaultCellWidths) voidsetAutoTruncateColumns(Boolean autoTruncateColumns) protected voidsetCellAttributes(Component component) Moves the width, align, and valign settings of the component to the corresponding cell properties (if not already configured)voidsetColumnCalculations(List<ColumnCalculationInfo> columnCalculations) Sets the columnCalculations.protected voidsetColumnsToCalculate(List<String> columnsToCalculate) Set columns to calculatevoidsetConditionalRowCssClasses(Map<String, String> conditionalRowCssClasses) Set the conditionalRowCssClassesvoidsetExpandDetailsActionPrototype(Action expandDetailsActionPrototype) Set the expand details Action prototype linkprotected voidsetFirstRowFields(List<Field> firstRowFields) Set the first row fieldsprotected voidsetFooterCalculationComponents(List<Component> footerCalculationComponents) Set footer calculation componentsvoidsetGenerateAutoSequence(boolean generateAutoSequence) Setter for the generate auto sequence fieldprotected voidsetGenerateGroupTotalRows(boolean generateGroupTotalRows) Set flag generate group total rowsprotected voidsetGroupingColumnIndex(int groupingColumnIndex) Set grouping column indexvoidsetGroupingPrefix(String groupingPrefix) Set the groupingPrefix.voidsetGroupingPropertyNames(List<String> groupingPropertyNames) Sets the list of property names to use for grouping.voidsetGroupingTitle(String groupingTitle) Set the groupingTitle.voidsetGroupTotalLabelPrototype(Label groupTotalLabelPrototype) Sets the groupTotal label to use when renderOnlyLeftTotalLabels is TRUE.protected voidsetHeaderAdded(boolean headerAdded) Set flag of whether a header is addedvoidsetHeaderLabelPrototype(Label headerLabelPrototype) Setter for the header field prototypeprotected voidsetHeaderLabels(List<Label> headerLabels) Set the header labelsvoidsetHiddenColumns(Set<String> hiddenColumns) Setter forTableLayoutManager.getHiddenColumns().voidsetNumberOfColumns(int numberOfColumns) voidsetNumberOfDataColumns(int numberOfDataColumns) voidsetPageTotalLabel(Label pageTotalLabel) Sets the pageTotal label to use when renderOnlyLeftTotalLabels is TRUE for total.voidsetRenderOnlyLeftTotalLabels(boolean renderOnlyLeftTotalLabels) Set the renderOnlyLeftTotalLabels flag for rendring total labels in the left-most columnvoidsetRenderSequenceField(boolean renderSequenceField) Setter for the render sequence field indicatorvoidsetRepeatHeader(boolean repeatHeader) Setter for the repeat header indicatorvoidsetRichTable(RichTable richTable) Setter for the rich table widgetvoidsetRowCssClasses(List<String> rowCssClasses) voidsetRowDataAttributes(List<String> rowDataAttributes) voidsetRowDetailsGroup(Group rowDetailsGroup) Set the row details info groupvoidsetRowDetailsOpen(boolean rowDetailsOpen) Set if row details should be open on table loadvoidsetSeparateAddLine(boolean separateAddLine) Setter for the separate add line indicatorvoidsetSequenceFieldPrototype(Field sequenceFieldPrototype) Setter for the sequence field prototypevoidsetSequencePropertyName(String sequencePropertyName) Setter for the sequence property namevoidsetShowGroupTotal(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.voidsetShowPageTotal(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.voidsetShowToggleAllDetails(boolean showToggleAllDetails) Set if the toggleAllDetailsAction should be shownvoidsetShowTotal(boolean showTotal) Sets showTotal. showTotal shows/calculates the total field when true, otherwise it is not rendered.voidsetSortableColumns(Set<String> sortableColumns) SetterforTableLayoutManager.getSortableColumns().voidsetSuppressLineWrapping(boolean suppressLineWrapping) voidsetToggleAllDetailsAction(Action toggleAllDetailsAction) Set the toggleAllDetailsAction action component used to toggle all row details open/closed.voidsetTotalLabel(Label totalLabel) Sets the total label to use when renderOnlyLeftTotalLabels is TRUE for total.protected voidsetupColumnCalculations(Object model, Container container, int totalColumns) Setup the column calculations functionality and componentsvoidsetupDetails(CollectionGroup collectionGroup) Creates the details group for the line using the information setup through the setter methods of this interface.protected voidsetupGrouping(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 FieldsetupTotalField(Field totalField, ColumnCalculationInfo cInfo, boolean show, Label leftLabel, String type, int leftLabelColumnIndex) Setup the totalField with the columnCalculationInfo(cInfo) passed in.voidsetUseShortLabels(boolean useShortLabels) Setter for the use short label indicatorMethods inherited from class org.kuali.rice.krad.uif.layout.collections.CollectionLayoutManagerBase
addEnterKeyDataAttributeToGroup, getAddLineGroup, getPagerWidget, getSelectFieldPrototype, getSubCollectionFieldGroupPrototype, setAddLineGroup, setPagerWidget, setSelectFieldPrototype, setSubCollectionFieldGroupPrototypeMethods inherited from class org.kuali.rice.krad.uif.layout.LayoutManagerBase
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, skipLifecycleMethods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressionsMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCodeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.kuali.rice.krad.uif.layout.CollectionLayoutManager
getAddLineGroup, getPagerWidget, getSelectFieldPrototype, getSubCollectionFieldGroupPrototype, setAddLineGroup, setPagerWidget, setSelectFieldPrototype, setSubCollectionFieldGroupPrototypeMethods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCodeMethods inherited from interface org.kuali.rice.krad.uif.layout.LayoutManager
addStyleClass, appendToStyle, getAdditionalCssClasses, getCssClasses, getLibraryCssClasses, getPropertyReplacers, getStyle, getTemplate, getTemplateName, setAdditionalCssClasses, setCssClasses, setLibraryCssClasses, setPropertyReplacers, setStyle, setTemplate, setTemplateNameMethods inherited from interface org.kuali.rice.krad.uif.util.LifecycleElement
checkMutable, getContainerIdSuffix, getContext, getId, getPhasePathMapping, getViewPath, getViewStatus, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, pushAllToContext, pushObjectToContext, setContainerIdSuffix, setContext, setId, setPhasePathMapping, setRender, setViewPath, setViewStatus, skipLifecycleMethods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
-
Constructor Details
-
TableLayoutManagerBase
public TableLayoutManagerBase()
-
-
Method Details
-
performInitialization
Initializes the componentWhere 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.
- Specified by:
performInitializationin interfaceLifecycleElement- Overrides:
performInitializationin classLayoutManagerBase- Parameters:
model- - object instance containing the view data- See Also:
-
performApplyModel
Takes expressions that may be set in the columnCalculation objects and populates them correctly into those component's propertyExpressions. Called after the initialize phase to perform conditional logic based on the model dataWhere components can perform conditional logic such as dynamically generating new fields or setting field state based on the given data
- Specified by:
performApplyModelin interfaceLifecycleElement- Overrides:
performApplyModelin classLayoutManagerBase- Parameters:
model- - Top level object containing the data (could be the form or a top level business object, dto)parent- parent lifecycle element
-
performFinalize
The last phase before the view is renderedHere final preparations can be made based on the updated view state.
- Specified by:
performFinalizein interfaceLifecycleElement- Overrides:
performFinalizein classLayoutManagerBase- Parameters:
model- - top level object containing the dataparent- - parent component
-
setupGrouping
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.- Parameters:
model- The model for the active lifecyclecollectionGroup- collection group for this layout
-
setupColumnCalculations
Setup the column calculations functionality and components- Parameters:
model- the modelcontainer- the parent containertotalColumns- total number of columns in the table
-
setupTotalField
protected Field setupTotalField(Field totalField, ColumnCalculationInfo cInfo, boolean show, Label leftLabel, String type, int leftLabelColumnIndex) Setup the totalField with the columnCalculationInfo(cInfo) passed in. Param show represents the tableLayoutManager's setting for the type of total being processed.- Parameters:
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)- Returns:
- the field with cInfo and tableLayoutManager settings applied as appropriate
-
buildLine
Assembles the field instances for the collection line.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
CollectionGroupLineBuilderthis 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- Specified by:
buildLinein interfaceCollectionLayoutManager- Parameters:
lineBuilderContext- context for the line to be built
-
addActionColumn
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 ongetActionFieldPrototype().- Parameters:
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 group
-
buildTableHeaderRows
Create theLabelinstances that will be used to render the table headerFor 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
- Parameters:
collectionGroup- CollectionGroup container the table applies tolineFields- fields for the data columns from which the headers are pulled
-
addActionHeader
protected void addActionHeader(int rowCount, int cellPosition) Adds the action header -
addHeaderField
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.After created the header field is added to the list making up the table header
- Parameters:
field- field instance the header field is being created forcolumn- column number for the header, used for setting the id
-
calculateNumberOfRows
Calculates how many rows will be needed per collection line to display the list of fields. Assumption is made that the total number of cells the fields take up is evenly divisible by the configured number of columns- Parameters:
items- list of items that make up one collection line- Returns:
- number of rows
-
setCellAttributes
Moves the width, align, and valign settings of the component to the corresponding cell properties (if not already configured)- Parameters:
component- instance to adjust settings for
-
processPagingRequest
Invokes instance ofDataTablesPagingHelperto 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.- Specified by:
processPagingRequestin interfaceCollectionLayoutManager- Parameters:
model- object containing the view's datacollectionGroup- collection group the request was made for
-
getSupportedContainer
Default Impl Determines whatContainerclasses are supported by theLayoutManager- Specified by:
getSupportedContainerin interfaceLayoutManager- Overrides:
getSupportedContainerin classLayoutManagerBase- Returns:
- Classinvalid input: '<'? extends Container> container class supported
-
getColumnCalculationComponents
Gets a list of column calculation components.- Specified by:
getColumnCalculationComponentsin interfaceTableLayoutManager- Returns:
- list of column calculation components
-
getNumberOfColumns
public 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).
- Specified by:
getNumberOfColumnsin interfaceTableLayoutManager- Returns:
- int number of columns
-
setNumberOfColumns
public void setNumberOfColumns(int numberOfColumns) - Specified by:
setNumberOfColumnsin interfaceTableLayoutManager- See Also:
-
isSuppressLineWrapping
public 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
- Specified by:
isSuppressLineWrappingin interfaceTableLayoutManager- Returns:
- true if the column count should match the container's field count, false to use the configured number of columns
-
setSuppressLineWrapping
public void setSuppressLineWrapping(boolean suppressLineWrapping) - Specified by:
setSuppressLineWrappingin interfaceTableLayoutManager- See Also:
-
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.
- Specified by:
isAutoTruncateColumnsin interfaceTableLayoutManager- Returns:
- true if the column should be truncated
-
setAutoTruncateColumns
- Specified by:
setAutoTruncateColumnsin interfaceTableLayoutManager- See Also:
-
isApplyAlternatingRowStyles
public 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
- Specified by:
isApplyAlternatingRowStylesin interfaceTableLayoutManager- Returns:
- true if alternating styles should be applied, false if all rows should have the same style
-
setApplyAlternatingRowStyles
public void setApplyAlternatingRowStyles(boolean applyAlternatingRowStyles) - Specified by:
setApplyAlternatingRowStylesin interfaceTableLayoutManager- See Also:
-
isApplyDefaultCellWidths
public 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
- Specified by:
isApplyDefaultCellWidthsin interfaceTableLayoutManager- Returns:
- true if default cell widths should be applied, false if no defaults should be applied
-
setApplyDefaultCellWidths
public void setApplyDefaultCellWidths(boolean applyDefaultCellWidths) - Specified by:
setApplyDefaultCellWidthsin interfaceTableLayoutManager- See Also:
-
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.
- Specified by:
getRowCssClassesin interfaceTableLayoutManager- Returns:
- list of styles for the rows
-
setRowCssClasses
- Specified by:
setRowCssClassesin interfaceTableLayoutManager- See Also:
-
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.
- Specified by:
getRowDataAttributesin interfaceTableLayoutManager- Returns:
- list of styles for the rows
-
setRowDataAttributes
- Specified by:
setRowDataAttributesin interfaceTableLayoutManager- See Also:
-
isUseShortLabels
public boolean isUseShortLabels()Indicates whether the short label for the collection field should be used as the table header or the regular label- Specified by:
isUseShortLabelsin interfaceTableLayoutManager- Returns:
- true if short label should be used, false if long label should be used
-
setUseShortLabels
public void setUseShortLabels(boolean useShortLabels) Setter for the use short label indicator- Specified by:
setUseShortLabelsin interfaceTableLayoutManager- Parameters:
useShortLabels-
-
isRepeatHeader
public 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- Specified by:
isRepeatHeaderin interfaceTableLayoutManager- Returns:
- true if header should be repeated, false if it should only be rendered once
-
setRepeatHeader
public void setRepeatHeader(boolean repeatHeader) Setter for the repeat header indicator- Specified by:
setRepeatHeaderin interfaceTableLayoutManager- Parameters:
repeatHeader-
-
getHeaderLabelPrototype
Labelinstance to use as a prototype for creating the tables header fields. For each header field the prototype will be copied and adjusted as necessary- Specified by:
getHeaderLabelPrototypein interfaceTableLayoutManager- Returns:
- Label instance to serve as prototype
-
setHeaderLabelPrototype
Setter for the header field prototype- Specified by:
setHeaderLabelPrototypein interfaceTableLayoutManager- Parameters:
headerLabelPrototype-
-
getHeaderLabels
List ofLabelinstances that should be rendered to make up the tables header- Specified by:
getHeaderLabelsin interfaceTableLayoutManager- Returns:
- List of label field instances
-
isRenderSequenceField
public boolean isRenderSequenceField()Indicates whether the sequence field should be rendered for the collection- Specified by:
isRenderSequenceFieldin interfaceTableLayoutManager- Returns:
- true if sequence field should be rendered, false if not
-
setRenderSequenceField
public void setRenderSequenceField(boolean renderSequenceField) Setter for the render sequence field indicator- Specified by:
setRenderSequenceFieldin interfaceTableLayoutManager- Parameters:
renderSequenceField-
-
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- Specified by:
getSequencePropertyNamein interfaceTableLayoutManager- Returns:
- sequence property name
-
setSequencePropertyName
Setter for the sequence property name- Specified by:
setSequencePropertyNamein interfaceTableLayoutManager- Parameters:
sequencePropertyName-
-
isGenerateAutoSequence
public boolean isGenerateAutoSequence()Indicates whether the sequence field should be generated with the current line numberIf 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
- Specified by:
isGenerateAutoSequencein interfaceTableLayoutManager- Returns:
- true if the sequence field should be generated from the line number, false if not
-
setGenerateAutoSequence
public void setGenerateAutoSequence(boolean generateAutoSequence) Setter for the generate auto sequence field- Specified by:
setGenerateAutoSequencein interfaceTableLayoutManager- Parameters:
generateAutoSequence-
-
getSequenceFieldPrototype
Fieldinstance to serve as a prototype for the sequence field. For each collection line this instance is copied and adjusted as necessary- Specified by:
getSequenceFieldPrototypein interfaceTableLayoutManager- Returns:
- Attribute field instance
-
setSequenceFieldPrototype
Setter for the sequence field prototype- Specified by:
setSequenceFieldPrototypein interfaceTableLayoutManager- Parameters:
sequenceFieldPrototype-
-
getActionFieldPrototype
FieldGroupinstance 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- Specified by:
getActionFieldPrototypein interfaceTableLayoutManager- Returns:
- GroupField instance
-
setActionFieldPrototype
Setter for the action field prototype- Specified by:
setActionFieldPrototypein interfaceTableLayoutManager- Parameters:
actionFieldPrototype-
-
isSeparateAddLine
public 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 toCollectionGroup.getAddLabel()and the add line actions will be placed into the group's footer.- Specified by:
isSeparateAddLinein interfaceTableLayoutManager- Returns:
- true if add line should be separated, false if it should be placed into the table
-
setSeparateAddLine
public void setSeparateAddLine(boolean separateAddLine) Setter for the separate add line indicator- Specified by:
setSeparateAddLinein interfaceTableLayoutManager- Parameters:
separateAddLine-
-
getAllRowFields
List ofFieldinstances that make up all the table's rows of data- Specified by:
getAllRowFieldsin interfaceTableLayoutManager- Returns:
- table body fields
-
getFirstRowFields
List ofFieldinstances that make us the table's first row of data- Specified by:
getFirstRowFieldsin interfaceTableLayoutManager- Returns:
- list of field instances
-
getRichTable
Widget associated with the table to add functionality such as sorting, paging, and export- Specified by:
getRichTablein interfaceTableLayoutManager- Returns:
- RichTable instance
-
setRichTable
Setter for the rich table widget- Specified by:
setRichTablein interfaceTableLayoutManager- Parameters:
richTable-
-
getNumberOfDataColumns
public int getNumberOfDataColumns()- Specified by:
getNumberOfDataColumnsin interfaceTableLayoutManager- Returns:
- the numberOfDataColumns
-
setNumberOfDataColumns
public void setNumberOfDataColumns(int numberOfDataColumns) - Specified by:
setNumberOfDataColumnsin interfaceTableLayoutManager- Parameters:
numberOfDataColumns- the numberOfDataColumns to set
-
getHiddenColumns
Gets a set of property names defining hidden columns.- Specified by:
getHiddenColumnsin interfaceTableLayoutManager- Returns:
- set of property names
- See Also:
-
setHiddenColumns
Setter forTableLayoutManager.getHiddenColumns().- Specified by:
setHiddenColumnsin interfaceTableLayoutManager- Parameters:
hiddenColumns- set of property names
-
getSortableColumns
Gets a set of property names defining sortable columns.- Specified by:
getSortableColumnsin interfaceTableLayoutManager- Returns:
- set of property names
- See Also:
-
setSortableColumns
SetterforTableLayoutManager.getSortableColumns().- Specified by:
setSortableColumnsin interfaceTableLayoutManager- Parameters:
sortableColumns- set of property names
-
getActionColumnIndex
public int getActionColumnIndex()Indicates the index of the action column- Specified by:
getActionColumnIndexin interfaceTableLayoutManager- Returns:
- the action column index
-
getActionColumnPlacement
Indicates the actions column placementValid 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.
- Specified by:
getActionColumnPlacementin interfaceTableLayoutManager- Returns:
- the action column placement
-
setActionColumnPlacement
Setter for the action column placement- Specified by:
setActionColumnPlacementin interfaceTableLayoutManager- Parameters:
actionColumnPlacement- action column placement string
-
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.
- Specified by:
getRowDetailsGroupin interfaceTableLayoutManager- Returns:
- rowDetailsGroup component
-
setRowDetailsGroup
Description copied from interface:TableLayoutManagerSet the row details info group- Specified by:
setRowDetailsGroupin interfaceTableLayoutManager- Parameters:
rowDetailsGroup- row details group- See Also:
-
setupDetails
Creates the details group for the line using the information setup through the setter methods of this interface. Line details are currently only supported in TableLayoutManagers which use richTable.- Parameters:
collectionGroup- the CollectionGroup for this TableLayoutManager
-
getColumnsToCalculate
A list of all the columns to be calculatedThe list must contain valid column indexes. The indexes takes all displayed columns into account.
- Specified by:
getColumnsToCalculatein interfaceTableLayoutManager- Returns:
- the total columns list
-
isShowTotal
public 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.- Specified by:
isShowTotalin interfaceTableLayoutManager- Returns:
- true if showing the total, false otherwise.
-
setShowTotal
public 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.- Specified by:
setShowTotalin interfaceTableLayoutManager
-
isShowPageTotal
public 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.- Specified by:
isShowPageTotalin interfaceTableLayoutManager- Returns:
- true if showing the page total, false otherwise.
-
setShowPageTotal
public 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.- Specified by:
setShowPageTotalin interfaceTableLayoutManager- Parameters:
showPageTotal-
-
isShowGroupTotal
public 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.- Specified by:
isShowGroupTotalin interfaceTableLayoutManager- Returns:
- true if showing the group total, false otherwise.
-
setShowGroupTotal
public 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.- Specified by:
setShowGroupTotalin interfaceTableLayoutManager
-
getTotalLabel
The total label to use when renderOnlyLeftTotalLabels is TRUE for total. This label will appear in the left most column.- Specified by:
getTotalLabelin interfaceTableLayoutManager- Returns:
- the totalLabel
-
setTotalLabel
Sets the total label to use when renderOnlyLeftTotalLabels is TRUE for total.- Specified by:
setTotalLabelin interfaceTableLayoutManager- Parameters:
totalLabel-
-
getPageTotalLabel
The pageTotal label to use when renderOnlyLeftTotalLabels is TRUE for total. This label will appear in the left most column.- Specified by:
getPageTotalLabelin interfaceTableLayoutManager- Returns:
- the totalLabel
-
setPageTotalLabel
Sets the pageTotal label to use when renderOnlyLeftTotalLabels is TRUE for total.- Specified by:
setPageTotalLabelin interfaceTableLayoutManager- Parameters:
pageTotalLabel-
-
getGroupTotalLabelPrototype
The groupTotal label to use when renderOnlyLeftTotalLabels is TRUE. This label will appear in the left most column.- Specified by:
getGroupTotalLabelPrototypein interfaceTableLayoutManager- Returns:
- the totalLabel
-
setGroupTotalLabelPrototype
Sets the groupTotal label to use when renderOnlyLeftTotalLabels is TRUE.- Specified by:
setGroupTotalLabelPrototypein interfaceTableLayoutManager- Parameters:
groupTotalLabelPrototype-
-
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.- Specified by:
getColumnCalculationsin interfaceTableLayoutManager- Returns:
- the columnCalculations to use
-
setColumnCalculations
Sets the columnCalculations.- Specified by:
setColumnCalculationsin interfaceTableLayoutManager- Parameters:
columnCalculations-
-
isRenderOnlyLeftTotalLabels
public 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.- Specified by:
isRenderOnlyLeftTotalLabelsin interfaceTableLayoutManager- Returns:
- true when rendering totals footer labels in the left-most column, false otherwise
-
setRenderOnlyLeftTotalLabels
public void setRenderOnlyLeftTotalLabels(boolean renderOnlyLeftTotalLabels) Set the renderOnlyLeftTotalLabels flag for rendring total labels in the left-most column- Specified by:
setRenderOnlyLeftTotalLabelsin interfaceTableLayoutManager- Parameters:
renderOnlyLeftTotalLabels-
-
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).
- Specified by:
getGroupingPropertyNamesin interfaceTableLayoutManager- Returns:
- propertyNames to group on
-
setGroupingPropertyNames
Sets the list of property names to use for grouping.- Specified by:
setGroupingPropertyNamesin interfaceTableLayoutManager- Parameters:
groupingPropertyNames-
-
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.- Specified by:
getGroupingTitlein interfaceTableLayoutManager- Returns:
- groupingTitle to be used
-
setGroupingTitle
Set the groupingTitle. This will throw an exception if the title does not contain a SpringEL expression.- Specified by:
setGroupingTitlein interfaceTableLayoutManager- Parameters:
groupingTitle-
-
getGroupingPrefix
Get the groupingPrefix. The groupingPrefix is used to prefix the generated title (not used when groupingTitle is set directly) when using groupingPropertyNames.- Specified by:
getGroupingPrefixin interfaceTableLayoutManager- Returns:
- String
-
setGroupingPrefix
Set the groupingPrefix. This is not used when groupingTitle is set directly.- Specified by:
setGroupingPrefixin interfaceTableLayoutManager- Parameters:
groupingPrefix-
-
isRowDetailsOpen
public 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.- Specified by:
isRowDetailsOpenin interfaceTableLayoutManager- Returns:
- true if row details
-
setRowDetailsOpen
public void setRowDetailsOpen(boolean rowDetailsOpen) Set if row details should be open on table load- Specified by:
setRowDetailsOpenin interfaceTableLayoutManager- Parameters:
rowDetailsOpen-
-
isShowToggleAllDetails
public boolean isShowToggleAllDetails()If true, the toggleAllDetailsAction will be shown. This button allows all details to be open/closed simultaneously.- Specified by:
isShowToggleAllDetailsin interfaceTableLayoutManager- Returns:
- true if the action button to toggle all row details opened/closed
-
setShowToggleAllDetails
public void setShowToggleAllDetails(boolean showToggleAllDetails) Set if the toggleAllDetailsAction should be shown- Specified by:
setShowToggleAllDetailsin interfaceTableLayoutManager- Parameters:
showToggleAllDetails-
-
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.- Specified by:
getToggleAllDetailsActionin interfaceTableLayoutManager- Returns:
- Action component to use for the toggle action button
-
setToggleAllDetailsAction
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.- Specified by:
setToggleAllDetailsActionin interfaceTableLayoutManager- Parameters:
toggleAllDetailsAction-
-
isAjaxDetailsRetrieval
public 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).- Specified by:
isAjaxDetailsRetrievalin interfaceTableLayoutManager- Returns:
- true if ajax row details retrieval will be used
-
setAjaxDetailsRetrieval
public void setAjaxDetailsRetrieval(boolean ajaxDetailsRetrieval) Set if row details content should be retrieved fromt he server- Specified by:
setAjaxDetailsRetrievalin interfaceTableLayoutManager- Parameters:
ajaxDetailsRetrieval-
-
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.- Specified by:
getExpandDetailsActionPrototypein interfaceTableLayoutManager- Returns:
- the Action details link prototype
-
getGroupingColumnIndex
public int getGroupingColumnIndex()Gets the grouping column index- Specified by:
getGroupingColumnIndexin interfaceTableLayoutManager- Returns:
- the grouping column index
-
setExpandDetailsActionPrototype
Set the expand details Action prototype link- Specified by:
setExpandDetailsActionPrototypein interfaceTableLayoutManager- Parameters:
expandDetailsActionPrototype-
-
setHeaderLabels
Set the header labels -
setAllRowFields
Set the row fields -
setFirstRowFields
Set the first row fields -
setHeaderAdded
protected void setHeaderAdded(boolean headerAdded) Set flag of whether a header is added -
setActionColumnIndex
protected void setActionColumnIndex(int actionColumnIndex) Sets action column index -
setGroupingColumnIndex
protected void setGroupingColumnIndex(int groupingColumnIndex) Set grouping column index -
setGenerateGroupTotalRows
protected void setGenerateGroupTotalRows(boolean generateGroupTotalRows) Set flag generate group total rows -
setColumnsToCalculate
Set columns to calculate -
getConditionalRowCssClasses
Description copied from interface:TableLayoutManagerThe row css classes for the rows of this layoutTo 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.
- Specified by:
getConditionalRowCssClassesin interfaceTableLayoutManager- Returns:
- a map which represents the css classes of the rows of this layout
- See Also:
-
setConditionalRowCssClasses
Description copied from interface:TableLayoutManagerSet the conditionalRowCssClasses- Specified by:
setConditionalRowCssClassesin interfaceTableLayoutManager- Parameters:
conditionalRowCssClasses-- See Also:
-
completeValidation
Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.- Parameters:
tracer- record of component's location
-