org.kuali.rice.krad.uif.layout
Class TableLayoutManager

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DictionaryBeanBase
      extended by org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
          extended by org.kuali.rice.krad.uif.layout.LayoutManagerBase
              extended by org.kuali.rice.krad.uif.layout.GridLayoutManager
                  extended by org.kuali.rice.krad.uif.layout.TableLayoutManager
All Implemented Interfaces:
Serializable, DictionaryBean, UifDictionaryBean, CollectionLayoutManager, LayoutManager

public class TableLayoutManager
extends GridLayoutManager
implements CollectionLayoutManager

Layout manager that works with CollectionGroup components and renders the collection as a Table

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:
Serialized Form

Constructor Summary
TableLayoutManager()
           
 
Method Summary
protected  void addActionHeader(int rowCount, String idSuffix, int cellPosition)
          Adds the action header
protected  void addHeaderField(Field field, String idSuffix, 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(View view, Object model, CollectionGroup collectionGroup, List<Field> lineFields, List<FieldGroup> subCollectionFields, String bindingPath, List<Action> actions, String idSuffix, Object currentLine, int lineIndex)
          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.
protected
<T> void
copyProperties(T layoutManager)
          Copies properties for copy()
 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.
 Group getAddLineGroup()
          When isSeparateAddLine() is true, this group will be used to render the add line
 List<Field> getAllRowFields()
          List of Field instances that make up all the table's rows of data
 List<ColumnCalculationInfo> getColumnCalculations()
          Gets the column calculations.
 List<String> getColumnsToCalculate()
          A list of all the columns to be calculated
 List<Component> getComponentPrototypes()
          List of components that are maintained by the layout manager as prototypes for creating other component instances
 List<Component> getComponentsForLifecycle()
          List of components that are contained within the layout manager that should be sent through the lifecycle
 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()
           
 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
 Group getRowDetailsGroup()
          The row details info group to use when using a TableLayoutManager with the a richTable.
 Field getSelectFieldPrototype()
          Field instance that serves as a prototype for creating the select field on each line when CollectionGroup.isIncludeLineSelectionField() is true
 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()
           
 FieldGroup getSubCollectionFieldGroupPrototype()
          Field group instance that is used as a prototype for creating the sub-collection field groups.
 Class<? extends Container> getSupportedContainer()
          Default Impl
 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 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 isUseShortLabels()
          Indicates whether the short label for the collection field should be used as the table header or the regular label
 void performApplyModel(View view, Object model, Container container)
          performApplyModel override.
 void performFinalize(View view, Object model, Container container)
          Sets up the final column count for rendering based on whether the sequence and action fields have been generated, sets up column calculations, and richTable rowGrouping options
 void performInitialization(View view, Object model, Container container)
          The following actions are performed: Sets sequence field prototype if auto sequence is true Initializes the prototypes
 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 setAddLineGroup(Group addLineGroup)
          Setter for the add line Group
 void setAjaxDetailsRetrieval(boolean ajaxDetailsRetrieval)
          Set if row details content should be retrieved fromt he server
 void setAllRowFields(List<Field> allRowFields)
          Set the row fields
 void setColumnCalculations(List<ColumnCalculationInfo> columnCalculations)
          Sets the columnCalculations.
 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
 void setFirstRowFields(List<Field> firstRowFields)
          Set the first row fields
 void setFooterCalculationComponents(List<Component> footerCalculationComponents)
          Set footer calculation components
 void setGenerateAutoSequence(boolean generateAutoSequence)
          Setter for the generate auto sequence field
 void setGenerateGroupTotalRows(boolean generateGroupTotalRows)
          Set flag generate group total rows
 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.
 void setHeaderAdded(boolean headerAdded)
          Set flag of whether a header is added
 void setHeaderLabelPrototype(Label headerLabelPrototype)
          Setter for the header field prototype
 void setHeaderLabels(List<Label> headerLabels)
          Set the header labels
 void setHiddenColumns(Set<String> hiddenColumns)
           
 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 setRowDetailsGroup(Group rowDetailsGroup)
          Set the row details info group
 void setRowDetailsOpen(boolean rowDetailsOpen)
          Set if row details should be open on table load
 void setSelectFieldPrototype(Field selectFieldPrototype)
          Setter for the prototype instance for select fields
 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)
           
 void setSubCollectionFieldGroupPrototype(FieldGroup subCollectionFieldGroupPrototype)
          Setter for the sub-collection field group prototype
 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(View view, Object model, Container container, int totalColumns)
          Setup the column calculations functionality and components
 void setupDetails(CollectionGroup collectionGroup, View view)
          Creates the details group for the line using the information setup through the setter methods of this interface.
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
 
Methods inherited from class org.kuali.rice.krad.uif.layout.GridLayoutManager
getNumberOfColumns, getRowCssClasses, isApplyAlternatingRowStyles, isApplyDefaultCellWidths, isRenderAlternatingHeaderColumns, isRenderFirstRowHeader, isRenderRowFirstCellHeader, isSuppressLineWrapping, setApplyAlternatingRowStyles, setApplyDefaultCellWidths, setCellAttributes, setNumberOfColumns, setRenderAlternatingHeaderColumns, setRenderFirstRowHeader, setRenderRowFirstCellHeader, setRowCssClasses, setSuppressLineWrapping
 
Methods inherited from class org.kuali.rice.krad.uif.layout.LayoutManagerBase
addStyleClass, appendToStyle, copy, getAdditionalCssClasses, getContext, getCssClasses, getId, getLibraryCssClasses, getPropertyReplacers, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, pushObjectToContext, setAdditionalCssClasses, setContext, setCssClasses, setId, setLibraryCssClasses, setPropertyReplacers, setStyle, setStyleClasses, setTemplate, setTemplateName
 
Methods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.uif.layout.LayoutManager
addStyleClass, appendToStyle, copy, getAdditionalCssClasses, getContext, getCssClasses, getId, getLibraryCssClasses, getPropertyReplacers, getStyle, getTemplate, getTemplateName, pushObjectToContext, setAdditionalCssClasses, setContext, setCssClasses, setId, setLibraryCssClasses, setPropertyReplacers, setStyle, setTemplate, setTemplateName
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
getComponentCode, getNamespaceCode
 

Constructor Detail

TableLayoutManager

public TableLayoutManager()
Method Detail

performInitialization

public void performInitialization(View view,
                                  Object model,
                                  Container container)
The following actions are performed:

Specified by:
performInitialization in interface LayoutManager
Overrides:
performInitialization in class LayoutManagerBase
Parameters:
view - - View instance the layout manager is a part of
model - - the object instance containing the view data
container - - Container the layout manager applies to
See Also:
LayoutManagerBase.performInitialization(org.kuali.rice.krad.uif.view.View, java.lang.Object, org.kuali.rice.krad.uif.container.Container)

performApplyModel

public void performApplyModel(View view,
                              Object model,
                              Container container)
performApplyModel override. Takes expressions that may be set in the columnCalculation objects and populates them correctly into those component's propertyExpressions.

Specified by:
performApplyModel in interface LayoutManager
Overrides:
performApplyModel in class LayoutManagerBase
Parameters:
view - view instance to which the layout manager belongs
model - Top level object containing the data (could be the form or a top level business object, dto)
container -
See Also:
LayoutManager.performApplyModel(org.kuali.rice.krad.uif.view.View, java.lang.Object, org.kuali.rice.krad.uif.container.Container)

performFinalize

public void performFinalize(View view,
                            Object model,
                            Container container)
Sets up the final column count for rendering based on whether the sequence and action fields have been generated, sets up column calculations, and richTable rowGrouping options

Specified by:
performFinalize in interface LayoutManager
Overrides:
performFinalize in class GridLayoutManager
Parameters:
view - - view instance that should be finalized for rendering
model - - top level object containing the data
container - - Container the layout manager applies to
See Also:
LayoutManagerBase.performFinalize(org.kuali.rice.krad.uif.view.View, java.lang.Object, org.kuali.rice.krad.uif.container.Container)

setupColumnCalculations

protected void setupColumnCalculations(View view,
                                       Object model,
                                       Container container,
                                       int totalColumns)
Setup the column calculations functionality and components

Parameters:
view - the view
model - the model
container - the parent container
totalColumns - 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 setup
cInfo - ColumnCalculation info to use to setup the field
show - show the field (if renderOnlyLeftTotalLabels is true, otherwise uses value in cInfo)
leftLabel - the leftLabel, not used if renderOnlyLeftTotalLabels is false
type - type used to set the dataAttribute role - used by the js for selection
leftLabelColumnIndex - index of the leftLabelColumn (0 or 1 if grouping enabled - hidden column)
Returns:
the field with cInfo and tableLayoutManager settings applied as appropriate

buildLine

public void buildLine(View view,
                      Object model,
                      CollectionGroup collectionGroup,
                      List<Field> lineFields,
                      List<FieldGroup> subCollectionFields,
                      String bindingPath,
                      List<Action> actions,
                      String idSuffix,
                      Object currentLine,
                      int lineIndex)
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.

Specified by:
buildLine in interface CollectionLayoutManager
Parameters:
view - - view instance the collection belongs to
model - - object containing the data
collectionGroup - - collection group the layout manager applies to
lineFields - - the field instances for the collection line which were copied from the collection groups items, id and binding already updated
subCollectionFields - - group field instances for each sub collection of the current line
bindingPath - - binding path for the groups items (if DataBinding)
actions - - list of action instances for the collection line, with id and binding updated
idSuffix - - suffix to use for any generated items
currentLine - - object instance for the current line, or null if add line
lineIndex - - index of the collection line being iterated over, or -1 if the add line
See Also:
CollectionLayoutManager.buildLine(org.kuali.rice.krad.uif.view.View, java.lang.Object, org.kuali.rice.krad.uif.container.CollectionGroup, java.util.List, java.util.List, java.lang.String, java.util.List, java.lang.String, java.lang.Object, int)

buildTableHeaderRows

protected void buildTableHeaderRows(CollectionGroup collectionGroup,
                                    List<Field> lineFields)
Create the 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

Parameters:
collectionGroup - CollectionGroup container the table applies to
lineFields - fields for the data columns from which the headers are pulled

addActionHeader

protected void addActionHeader(int rowCount,
                               String idSuffix,
                               int cellPosition)
Adds the action header

Parameters:
rowCount -
idSuffix - suffix for the header id, also column will be added
cellPosition -

addHeaderField

protected void addHeaderField(Field field,
                              String idSuffix,
                              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. 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 for
idSuffix - suffix for the header id, also column will be added
column - column number for the header, used for setting the id

calculateNumberOfRows

protected int calculateNumberOfRows(List<? extends Field> items)
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

getSupportedContainer

public Class<? extends Container> getSupportedContainer()
Description copied from class: LayoutManagerBase
Default Impl

Specified by:
getSupportedContainer in interface LayoutManager
Overrides:
getSupportedContainer in class GridLayoutManager
Returns:
Class container class supported
See Also:
LayoutManager.getSupportedContainer()

getComponentsForLifecycle

public List<Component> getComponentsForLifecycle()
Description copied from interface: LayoutManager
List of components that are contained within the layout manager that should be sent through the lifecycle

Used by ViewHelperService for the various lifecycle callbacks

Specified by:
getComponentsForLifecycle in interface LayoutManager
Overrides:
getComponentsForLifecycle in class LayoutManagerBase
Returns:
List child components
See Also:
LayoutManagerBase.getComponentsForLifecycle()

getComponentPrototypes

public List<Component> getComponentPrototypes()
Description copied from interface: LayoutManager
List of components that are maintained by the layout manager as prototypes for creating other component instances

Prototypes are held for configuring how a component should be created during the lifecycle. An example of this are the fields in a collection group that are created for each collection record. They only participate in the initialize phase.

Specified by:
getComponentPrototypes in interface LayoutManager
Overrides:
getComponentPrototypes in class LayoutManagerBase
Returns:
List child component prototypes
See Also:
LayoutManager.getComponentPrototypes()

isUseShortLabels

public 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

public void setUseShortLabels(boolean useShortLabels)
Setter for the use short label indicator

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

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

Parameters:
repeatHeader -

getHeaderLabelPrototype

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 necessary

Returns:
Label instance to serve as prototype

setHeaderLabelPrototype

public void setHeaderLabelPrototype(Label headerLabelPrototype)
Setter for the header field prototype

Parameters:
headerLabelPrototype -

getHeaderLabels

public List<Label> getHeaderLabels()
List of Label instances that should be rendered to make up the tables header

Returns:
List of label field instances

isRenderSequenceField

public 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

public void setRenderSequenceField(boolean renderSequenceField)
Setter for the render sequence field indicator

Parameters:
renderSequenceField -

getSequencePropertyName

public 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

public void setSequencePropertyName(String sequencePropertyName)
Setter for the sequence property name

Parameters:
sequencePropertyName -

isGenerateAutoSequence

public 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

public void setGenerateAutoSequence(boolean generateAutoSequence)
Setter for the generate auto sequence field

Parameters:
generateAutoSequence -

getSequenceFieldPrototype

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 necessary

Returns:
Attribute field instance

setSequenceFieldPrototype

public void setSequenceFieldPrototype(Field sequenceFieldPrototype)
Setter for the sequence field prototype

Parameters:
sequenceFieldPrototype -

getActionFieldPrototype

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 header

Returns:
GroupField instance

setActionFieldPrototype

public void setActionFieldPrototype(FieldGroup actionFieldPrototype)
Setter for the action field prototype

Parameters:
actionFieldPrototype -

getSubCollectionFieldGroupPrototype

public FieldGroup getSubCollectionFieldGroupPrototype()
Description copied from interface: CollectionLayoutManager
Field group instance that is used as a prototype for creating the sub-collection field groups. For each sub-collection a copy of the prototype is made and the list will be passed to the layout manager buildLine method

Specified by:
getSubCollectionFieldGroupPrototype in interface CollectionLayoutManager
Returns:
GroupField instance to use as prototype
See Also:
CollectionLayoutManager.getSubCollectionFieldGroupPrototype()

setSubCollectionFieldGroupPrototype

public void setSubCollectionFieldGroupPrototype(FieldGroup subCollectionFieldGroupPrototype)
Setter for the sub-collection field group prototype

Parameters:
subCollectionFieldGroupPrototype -

getSelectFieldPrototype

public Field getSelectFieldPrototype()
Field instance that serves as a prototype for creating the select field on each line when CollectionGroup.isIncludeLineSelectionField() is true

This prototype can be used to set the control used for the select field (generally will be a checkbox control) in addition to styling and other setting. The binding path will be formed with using the CollectionGroup.getLineSelectPropertyName() or if not set the framework will use UifFormBase.getSelectedCollectionLines()

Returns:
select field prototype instance

setSelectFieldPrototype

public void setSelectFieldPrototype(Field selectFieldPrototype)
Setter for the prototype instance for select fields

Parameters:
selectFieldPrototype -

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 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

public void setSeparateAddLine(boolean separateAddLine)
Setter for the separate add line indicator

Parameters:
separateAddLine -

getAddLineGroup

public Group getAddLineGroup()
When isSeparateAddLine() is true, this group will be used to render the add line

This group can be used to configure how the add line will be rendered. For example the layout manager configured on the group will be used to rendered the add line fields. If the header (title) is not set on the group, it will be set from CollectionGroup.getAddLabel(). In addition, CollectionGroup.getAddLineActions() will be added to the group footer items.

Returns:
Group instance for the collection add line

setAddLineGroup

public void setAddLineGroup(Group addLineGroup)
Setter for the add line Group

Parameters:
addLineGroup -

getAllRowFields

public List<Field> getAllRowFields()
List of Field instances that make up all the table's rows of data

Returns:
table body fields

getFirstRowFields

public List<Field> getFirstRowFields()
List of Field instances that make us the table's first row of data

Returns:
list of field instances

getRichTable

public RichTable getRichTable()
Widget associated with the table to add functionality such as sorting, paging, and export

Returns:
RichTable instance

setRichTable

public void setRichTable(RichTable richTable)
Setter for the rich table widget

Parameters:
richTable -

getNumberOfDataColumns

public int getNumberOfDataColumns()
Returns:
the numberOfDataColumns

setNumberOfDataColumns

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

getHiddenColumns

public Set<String> getHiddenColumns()
See Also:
RichTable.getHiddenColumns()

setHiddenColumns

public void setHiddenColumns(Set<String> hiddenColumns)
See Also:
org.kuali.rice.krad.uif.widget.RichTable#setHiddenColumns(java.util.Set)

getSortableColumns

public Set<String> getSortableColumns()
See Also:
RichTable.getSortableColumns()

setSortableColumns

public void setSortableColumns(Set<String> sortableColumns)
See Also:
org.kuali.rice.krad.uif.widget.RichTable#setSortableColumns(java.util.Set)

getActionColumnIndex

public int getActionColumnIndex()
Indicates the index of the action column

Returns:
the action column index

getActionColumnPlacement

public 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

public void setActionColumnPlacement(String actionColumnPlacement)
Setter for the action column placement

Parameters:
actionColumnPlacement - action column placement string

getRowDetailsGroup

public 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

public void setRowDetailsGroup(Group rowDetailsGroup)
Set the row details info group

Parameters:
rowDetailsGroup - row details group

setupDetails

public void setupDetails(CollectionGroup collectionGroup,
                         View view)
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
view - the current view

getColumnsToCalculate

public 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

completeValidation

public void completeValidation(ValidationTrace tracer)
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

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.

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.

Parameters:
showTotal -

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.

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.

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.

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.

Parameters:
showGroupTotal -

getTotalLabel

public 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

public void setTotalLabel(Label totalLabel)
Sets the total label to use when renderOnlyLeftTotalLabels is TRUE for total.

Parameters:
totalLabel -

getPageTotalLabel

public 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

public void setPageTotalLabel(Label pageTotalLabel)
Sets the pageTotal label to use when renderOnlyLeftTotalLabels is TRUE for total.

Parameters:
pageTotalLabel -

getGroupTotalLabelPrototype

public Label getGroupTotalLabelPrototype()
The groupTotal label to use when renderOnlyLeftTotalLabels is TRUE. This label will appear in the left most column.

Returns:
the totalLabel

setGroupTotalLabelPrototype

public void setGroupTotalLabelPrototype(Label groupTotalLabelPrototype)
Sets the groupTotal label to use when renderOnlyLeftTotalLabels is TRUE.

Parameters:
groupTotalLabelPrototype -

getColumnCalculations

public 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

public void setColumnCalculations(List<ColumnCalculationInfo> columnCalculations)
Sets the columnCalculations.

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.

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

Parameters:
renderOnlyLeftTotalLabels -

getFooterCalculationComponents

public 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

public 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

public void setGroupingPropertyNames(List<String> groupingPropertyNames)
Sets the list of property names to use for grouping.

Parameters:
groupingPropertyNames -

getGroupingTitle

public 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

public void setGroupingTitle(String groupingTitle)
Set the groupingTitle. This will throw an exception if the title does not contain a SpringEL expression.

Parameters:
groupingTitle -

getGroupingPrefix

public 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

public void setGroupingPrefix(String groupingPrefix)
Set the groupingPrefix. This is not used when groupingTitle is set directly.

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.

Returns:
true if row details

setRowDetailsOpen

public void setRowDetailsOpen(boolean rowDetailsOpen)
Set if row details should be open on table load

Parameters:
rowDetailsOpen -

isShowToggleAllDetails

public 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

public void setShowToggleAllDetails(boolean showToggleAllDetails)
Set if the toggleAllDetailsAction should be shown

Parameters:
showToggleAllDetails -

getToggleAllDetailsAction

public 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

public 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

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).

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

Parameters:
ajaxDetailsRetrieval -

getExpandDetailsActionPrototype

public 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

public int getGroupingColumnIndex()
Gets the grouping column index

Returns:
the grouping column index

setExpandDetailsActionPrototype

public void setExpandDetailsActionPrototype(Action expandDetailsActionPrototype)
Set the expand details Action prototype link

Parameters:
expandDetailsActionPrototype -

setHeaderLabels

public void setHeaderLabels(List<Label> headerLabels)
Set the header labels

Parameters:
headerLabels -

setAllRowFields

public void setAllRowFields(List<Field> allRowFields)
Set the row fields

Parameters:
allRowFields -

setFirstRowFields

public void setFirstRowFields(List<Field> firstRowFields)
Set the first row fields

Parameters:
firstRowFields -

setHeaderAdded

public void setHeaderAdded(boolean headerAdded)
Set flag of whether a header is added

Parameters:
headerAdded -

setActionColumnIndex

public void setActionColumnIndex(int actionColumnIndex)
Sets action column index

Parameters:
actionColumnIndex -

setGroupingColumnIndex

public void setGroupingColumnIndex(int groupingColumnIndex)
Set grouping column index

Parameters:
groupingColumnIndex -

setGenerateGroupTotalRows

public void setGenerateGroupTotalRows(boolean generateGroupTotalRows)
Set flag generate group total rows

Parameters:
generateGroupTotalRows -

setColumnsToCalculate

public void setColumnsToCalculate(List<String> columnsToCalculate)
Set columns to calculate

Parameters:
columnsToCalculate -

setFooterCalculationComponents

public void setFooterCalculationComponents(List<Component> footerCalculationComponents)
Set footer calculation components

Parameters:
footerCalculationComponents -

getConditionalRowCssClasses

public 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

public void setConditionalRowCssClasses(Map<String,String> conditionalRowCssClasses)
Set the conditionalRowCssClasses

Parameters:
conditionalRowCssClasses -

copyProperties

protected <T> void copyProperties(T layoutManager)
Description copied from class: DictionaryBeanBase
Copies properties for copy()

Overrides:
copyProperties in class GridLayoutManager
Parameters:
layoutManager - base bean
See Also:
ComponentBase.copy()


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.