Class UserSummary
- All Implemented Interfaces:
HasHandlers
ListGrid
s additionally allow
the summary to be user-modifiable, with the summary created and edited with a SummaryBuilder, either directly or via the
ListGrid.canAddSummaryFields
behavior.
-
Field Summary
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties
-
Constructor Summary
ConstructorDescriptionUserSummary
(JavaScriptObject jsObj) UserSummary
(String text) UserSummary
(String text, Map summaryVars) -
Method Summary
Modifier and TypeMethodDescriptionstatic UserSummary
getOrCreateRef
(JavaScriptObject jsObj) Map from the single capital letters used as summary variables in theUserSummary
String to the field names these variables should represent.getText()
Summary to be evaluated.setSummaryVars
(Map summaryVars) Map from the single capital letters used as summary variables in theUserSummary
String to the field names these variables should represent.Summary to be evaluated.Methods inherited from class com.smartgwt.client.core.DataClass
applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated
-
Constructor Details
-
UserSummary
public UserSummary() -
UserSummary
-
UserSummary
-
UserSummary
-
-
Method Details
-
getOrCreateRef
-
setSummaryVars
Map from the single capital letters used as summary variables in theUserSummary
String to the field names these variables should represent.When used in the context of grid or detail viewer fields, field names are evaluated against the record.
Summaries built by a SummaryBuilder for a
ListGrid
will normally not define this property and the field names will be used directly, unless useSingleLetterKey istrue
. This property is also not used for summary mapping inFormItem.textFormula
orListGridField.editorTextFormula
. Instead, field names are evaluated directly against the currentrule context
.- Parameters:
summaryVars
- New summaryVars value. Default value is null- Returns:
UserSummary
instance, for chaining setter calls
-
getSummaryVars
Map from the single capital letters used as summary variables in theUserSummary
String to the field names these variables should represent.When used in the context of grid or detail viewer fields, field names are evaluated against the record.
Summaries built by a SummaryBuilder for a
ListGrid
will normally not define this property and the field names will be used directly, unless useSingleLetterKey istrue
. This property is also not used for summary mapping inFormItem.textFormula
orListGridField.editorTextFormula
. Instead, field names are evaluated directly against the currentrule context
.- Returns:
- Current summaryVars value. Default value is null
-
setText
Summary to be evaluated.There are two contexts where a
UserSummary
is used:ListGridField.userSummary
/DetailViewerField.userSummary
andFormItem.textFormula
orListGridField.editorTextFormula
. For the grid/detail viewer field summary, all variables used by the summary must be single capital letters surrounded by braces and escaped with a # sign (e.g. #{A}). These are derived from field values for the record in question - seesummaryVars
.In the context of forms and editing, variables are dot-separated (.) names representing the nested hierarchy path to the desired value within the
rule context
. No mapping withsummaryVars
is needed.This attribute is writable only in
ListGrid
s. Applications must call eitherListGrid.setUserSummary()
orListGrid.setUserSummaryText()
to re-evaluate the summary.- Parameters:
text
- New text value. Default value is null- Returns:
UserSummary
instance, for chaining setter calls
-
getText
Summary to be evaluated.There are two contexts where a
UserSummary
is used:ListGridField.userSummary
/DetailViewerField.userSummary
andFormItem.textFormula
orListGridField.editorTextFormula
. For the grid/detail viewer field summary, all variables used by the summary must be single capital letters surrounded by braces and escaped with a # sign (e.g. #{A}). These are derived from field values for the record in question - seesummaryVars
.In the context of forms and editing, variables are dot-separated (.) names representing the nested hierarchy path to the desired value within the
rule context
. No mapping withsummaryVars
is needed.This attribute is writable only in
ListGrid
s. Applications must call eitherListGrid.setUserSummary()
orListGrid.setUserSummaryText()
to re-evaluate the summary.- Returns:
- Current text value. Default value is null
-