Package com.smartgwt.client.widgets
Class DataContextCriteriaSettings
java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.widgets.DataContextCriteriaSettings
- All Implemented Interfaces:
HasHandlers
A contribution to the
shared criteria of a Canvas.dataContext, published with Canvas.setDataContextCriteria(): up to three sets of criteria, the DataSources they apply to, and an envelope describing the contributor.- See Also:
-
Field Summary
Fields inherited from class com.smartgwt.client.core.DataClass
factoryCreated, factoryProperties -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionCriteria on totals, applied asDSRequest.afterCriteriaby each component the contribution applies to whose request can interpret them.Criteria on the records, applied by each component the contribution applies to asDSRequest.beforeCriteria.Unique identifier for the criteria source.Ordinary criteria, combined into the criteria of each component the contribution applies to.ID of the DataSource the contribution applies to, or an Array of IDs.String[]ID of the DataSource the contribution applies to, or an Array of IDs.When true, components bound to DataSources that have aDataSourceField.foreignKeyrelationship to the target DataSource are also filtered, via avalueQuerysub-criterion on their foreign-key column: the contribution'scriteriaandbeforeCriteriabecome criteria of the same kind there.static DataContextCriteriaSettingsgetOrCreateRef(JavaScriptObject jsObj) setAfterCriteria(Criteria afterCriteria) Criteria on totals, applied asDSRequest.afterCriteriaby each component the contribution applies to whose request can interpret them.setBeforeCriteria(Criteria beforeCriteria) Criteria on the records, applied by each component the contribution applies to asDSRequest.beforeCriteria.setContributorID(String contributorID) Unique identifier for the criteria source.setCriteria(Criteria criteria) Ordinary criteria, combined into the criteria of each component the contribution applies to.setDataSource(String dataSource) ID of the DataSource the contribution applies to, or an Array of IDs.setDataSource(String... dataSource) ID of the DataSource the contribution applies to, or an Array of IDs.setFilterRelated(Boolean filterRelated) When true, components bound to DataSources that have aDataSourceField.foreignKeyrelationship to the target DataSource are also filtered, via avalueQuerysub-criterion on their foreign-key column: the contribution'scriteriaandbeforeCriteriabecome criteria of the same kind there.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
-
DataContextCriteriaSettings
public DataContextCriteriaSettings() -
DataContextCriteriaSettings
-
-
Method Details
-
getOrCreateRef
-
setAfterCriteria
Criteria on totals, applied asDSRequest.afterCriteriaby each component the contribution applies to whose request can interpret them. SeeCanvas.setDataContextCriteria().- Parameters:
afterCriteria- New afterCriteria value. Default value is null- Returns:
DataContextCriteriaSettingsinstance, for chaining setter calls
-
getAfterCriteria
Criteria on totals, applied asDSRequest.afterCriteriaby each component the contribution applies to whose request can interpret them. SeeCanvas.setDataContextCriteria().- Returns:
- Current afterCriteria value. Default value is null
-
setBeforeCriteria
Criteria on the records, applied by each component the contribution applies to asDSRequest.beforeCriteria. SeeCanvas.setDataContextCriteria().- Parameters:
beforeCriteria- New beforeCriteria value. Default value is null- Returns:
DataContextCriteriaSettingsinstance, for chaining setter calls
-
getBeforeCriteria
Criteria on the records, applied by each component the contribution applies to asDSRequest.beforeCriteria. SeeCanvas.setDataContextCriteria().- Returns:
- Current beforeCriteria value. Default value is null
-
setContributorID
Unique identifier for the criteria source. When multiple independent components (such as Slicers) each publish criteria for the same DataSource, pass a distinctcontributorIDper source; all contributors' criteria are AND-combined automatically. Without one, each call toCanvas.setDataContextCriteria()replaces the previous anonymous contribution for the same DataSources. Applies only to contributions that name adataSource; with none, criteria go to the single global slot and thecontributorIDis ignored.- Parameters:
contributorID- New contributorID value. Default value is null- Returns:
DataContextCriteriaSettingsinstance, for chaining setter calls
-
getContributorID
Unique identifier for the criteria source. When multiple independent components (such as Slicers) each publish criteria for the same DataSource, pass a distinctcontributorIDper source; all contributors' criteria are AND-combined automatically. Without one, each call toCanvas.setDataContextCriteria()replaces the previous anonymous contribution for the same DataSources. Applies only to contributions that name adataSource; with none, criteria go to the single global slot and thecontributorIDis ignored.- Returns:
- Current contributorID value. Default value is null
-
setCriteria
Ordinary criteria, combined into the criteria of each component the contribution applies to. SeeCanvas.setDataContextCriteria()for how they differ frombeforeCriteriaandafterCriteria.- Parameters:
criteria- New criteria value. Default value is null- Returns:
DataContextCriteriaSettingsinstance, for chaining setter calls
-
getCriteria
Ordinary criteria, combined into the criteria of each component the contribution applies to. SeeCanvas.setDataContextCriteria()for how they differ frombeforeCriteriaandafterCriteria.- Returns:
- Current criteria value. Default value is null
-
setDataSource
ID of the DataSource the contribution applies to, or an Array of IDs. When omitted, the contribution'scriteriaapply to every DataSource by field-name match - seeCanvas.setDataContextCriteria().- Parameters:
dataSource- New dataSource value. Default value is null- Returns:
DataContextCriteriaSettingsinstance, for chaining setter calls
-
getDataSource
ID of the DataSource the contribution applies to, or an Array of IDs. When omitted, the contribution'scriteriaapply to every DataSource by field-name match - seeCanvas.setDataContextCriteria().- Returns:
- Current dataSource value. Default value is null
-
setDataSource
ID of the DataSource the contribution applies to, or an Array of IDs. When omitted, the contribution'scriteriaapply to every DataSource by field-name match - seeCanvas.setDataContextCriteria().- Parameters:
dataSource- New dataSource value. Default value is null- Returns:
DataContextCriteriaSettingsinstance, for chaining setter calls
-
getDataSourceAsStringArray
ID of the DataSource the contribution applies to, or an Array of IDs. When omitted, the contribution'scriteriaapply to every DataSource by field-name match - seeCanvas.setDataContextCriteria().- Returns:
- Current dataSource value. Default value is null
-
setFilterRelated
When true, components bound to DataSources that have aDataSourceField.foreignKeyrelationship to the target DataSource are also filtered, via avalueQuerysub-criterion on their foreign-key column: the contribution'scriteriaandbeforeCriteriabecome criteria of the same kind there. ItsafterCriteriatest totals of the target DataSource's fields, which a related component does not produce, so they do not cascade. Only supported whendataSourcenames a single DataSource.- Parameters:
filterRelated- New filterRelated value. Default value is false- Returns:
DataContextCriteriaSettingsinstance, for chaining setter calls
-
getFilterRelated
When true, components bound to DataSources that have aDataSourceField.foreignKeyrelationship to the target DataSource are also filtered, via avalueQuerysub-criterion on their foreign-key column: the contribution'scriteriaandbeforeCriteriabecome criteria of the same kind there. ItsafterCriteriatest totals of the target DataSource's fields, which a related component does not produce, so they do not cascade. Only supported whendataSourcenames a single DataSource.- Returns:
- Current filterRelated value. Default value is false
-