Class ColumnCalculationInfo
- All Implemented Interfaces:
Serializable,Cloneable,Copyable,DictionaryBean,UifDictionaryBean
- 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 TypeMethodDescriptionThis specifies extra data to be sent to the calculation function.Gets the js calculationFunctionName.Gets the column number.Gets the groupTotalFieldPrototype.Gets the pageTotalField.Get the propertyName of the field to do calculations.Gets the totalField.booleanIf true, the column is calculated when the user enters a character on each key up.booleanWhen set to false, calculations will not be fired for the totalField client-side.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.booleanGets showTotal. showTotal shows/calculates the total field when true, otherwise it is not rendered.voidsetCalculateOnKeyUp(boolean calculateOnKeyUp) Sets calculateOnKeyUp which controls the type of handler usedvoidsetCalculationFunctionExtraData(String calculationFunctionExtraData) Sets the calculationFunctionExtraData which specifies additional data to pass into the calculationFunction.voidsetCalculationFunctionName(String calculationFunctionName) Sets the calculationFunctionName to call when doing column calculationsvoidsetColumnNumber(Integer columnNumber) Sets the column number.voidsetGroupTotalFieldPrototype(MessageField groupTotalFieldPrototype) Sets the groupTotalFieldPrototype.voidsetPageTotalField(MessageField pageTotalField) Sets the pageTotalField.voidsetPropertyName(String propertyName) Set the propertyName of the field to do calculations onvoidsetRecalculateTotalClientSide(boolean recalculateTotalClientSide) Set the recalculateTotalClientSide flagvoidsetShowGroupTotal(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.voidsetShowTotal(boolean showTotal) Sets showTotal. showTotal shows/calculates the total field when true, otherwise it is not rendered.voidsetTotalField(MessageField totalField) Sets the totalField.Methods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressionsMethods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
clone, 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.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
-
Constructor Details
-
ColumnCalculationInfo
public ColumnCalculationInfo()
-
-
Method Details
-
getColumnNumber
Gets the column number. This should not be set through configuration as it is overridden by the propertyName's caclculated column number. Do not set through xml configuration- Returns:
- columnNumber to perform calculations on
-
setColumnNumber
Sets the column number. Do not set through xml configuration- Parameters:
columnNumber-
-
isShowTotal
public boolean isShowTotal()Gets showTotal. showTotal shows/calculates the total field when true, otherwise it is not rendered.- 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.- Parameters:
showTotal-
-
isShowPageTotal
public boolean isShowPageTotal()Gets showTotal. showTotal shows/calculates the total field when true, otherwise it is not rendered.- 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.- 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.- 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.- Parameters:
showGroupTotal-
-
getCalculationFunctionName
Gets the js calculationFunctionName. This is the name of the js function to use in column calculations.This must be ONLY the function by name (no parenthesis or params)
The actual js function declaration MUST take in an array of values as its first parameter. The values passed in will be all the relavant values for the calculation. Optionally, the function can also take a second parameter which can be specified by calculationFunctionExtraData. This parameter can take any valid javascript value (integer, string, JSON object, etc). In either case, the values parameter MUST be the first parameter.- Returns:
- calculatinoFunctionName to call for column calculations in js
-
setCalculationFunctionName
Sets the calculationFunctionName to call when doing column calculations- Parameters:
calculationFunctionName-
-
getTotalField
Gets the totalField. This field is the field which holds the total for the column and specifies its label. This SHOULD NOT BE SET except by the base bean (in MOST cases).- Returns:
- the totalField
-
setTotalField
Sets the totalField. This SHOULD NOT BE SET except by the base bean (in MOST cases). Setting this property without the appropriate settings WILL break functionality.- Parameters:
totalField-
-
getPageTotalField
Gets the pageTotalField. This field is the field which holds the pageTotal for the column and specifies its label. This SHOULD NOT BE SET except by the base bean (in MOST cases).- Returns:
- the pageTotalField
-
setPageTotalField
Sets the pageTotalField. This SHOULD NOT BE SET except by the base bean (in MOST cases). Setting this property without the appropriate settings WILL break functionality.- Parameters:
pageTotalField-
-
getGroupTotalFieldPrototype
Gets the groupTotalFieldPrototype. This field is copied and holds the groupTotal for the column and specifies its label. This SHOULD NOT BE SET except by the base bean (in MOST cases).- Returns:
- the groupTotalFieldPrototype
-
setGroupTotalFieldPrototype
Sets the groupTotalFieldPrototype. This SHOULD NOT BE SET except by the base bean (in MOST cases). Setting this property without the appropriate settings WILL break functionality.- Parameters:
groupTotalFieldPrototype-
-
isCalculateOnKeyUp
public boolean isCalculateOnKeyUp()If true, the column is calculated when the user enters a character on each key up. There is a small delay built in to prevent calculations from being fired for each key stroke.- Returns:
- true if calculated the column on key up, false if calculating on change (default)
-
setCalculateOnKeyUp
public void setCalculateOnKeyUp(boolean calculateOnKeyUp) Sets calculateOnKeyUp which controls the type of handler used- Parameters:
calculateOnKeyUp-
-
isRecalculateTotalClientSide
public boolean isRecalculateTotalClientSide()When set to false, calculations will not be fired for the totalField client-side. This ONLY effects the totalField. If page and group totals are still shown, they will (and can only) be calculated client-side.To use this particular feature: set this to false, and use springEL in the totalField's message.messageText to get a pre-calculated total from a field on the form. This will be refreshed when the table is refreshed, but will not be updated by client-side interactions - used for complex or special calculation mechanisms that may require server only information.
- Returns:
- true if calculating the totalField client-side, false otherwise
-
setRecalculateTotalClientSide
public void setRecalculateTotalClientSide(boolean recalculateTotalClientSide) Set the recalculateTotalClientSide flag- Parameters:
recalculateTotalClientSide-
-
getCalculationFunctionExtraData
This specifies extra data to be sent to the calculation function. This can be any valid javascript value (number, string, JSON - for passing multiple settings, etc).
The function specified by calculationFunctionName MUST take a second parameter when using this option.- Returns:
- the extra data to pass into the function specified by name in calculationFunctionName
-
setCalculationFunctionExtraData
Sets the calculationFunctionExtraData which specifies additional data to pass into the calculationFunction.- Parameters:
calculationFunctionExtraData-
-
getPropertyName
Get the propertyName of the field to do calculations. This field MUST exist as one of the fields of the collection. This property must be set or an exception will be thrown.- Returns:
- propertyName of the field(the column) to do calculations on
-
setPropertyName
Set the propertyName of the field to do calculations on- Parameters:
propertyName-
-