Creates a new instance of an UIState class.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.ui.comp.state.UIState(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | ID for the new control, generated automatically if no ID is given |
|
mSettings? | object | initial settings for the new control |
Name | Type | Default Value | Description |
---|---|---|---|
presentationVariant | object | Object representing the presentation variant. The structure looks like:
Note:
|
|
selectionVariant | object | Object representing the selection variant. The structure looks like: Visibility: public |
|
semanticDates | object | Structure containing Date range semantic data of the filter value. Visibility: public |
|
valueTexts | object | Structure containing filter value keys and its corresponding descriptions. Visibility: public |
|
variantName | string | Variant name. Visibility: public |
Method | Description |
---|---|
sap.ui.comp.state.UIState.calcSemanticDates |
Constructs the value state out of a given selection variant and the current model data |
sap.ui.comp.state.UIState.calculateValueTexts |
Constructs the value state out of a given selection variant and the current model data |
sap.ui.comp.state.UIState.createFromSelectionAndPresentationVariantAnnotation |
Converts PresentationVariant annotation to UIState object. |
sap.ui.comp.state.UIState.determineFiltersWithOnlyKeyValues |
Determines the filter names with value keys where the description is not available. |
sap.ui.comp.state.UIState.enrichWithSemanticDates |
Enriches the internal filter bar value format with the information from the value state. |
sap.ui.comp.state.UIState.enrichWithValueTexts |
Enriches the internal filter bar value format with the information from the value state. |
sap.ui.comp.state.UIState.extend |
Creates a new subclass of class sap.ui.comp.state.UIState with name
|
sap.ui.comp.state.UIState.getMetadata |
Returns a metadata object for class sap.ui.comp.state.UIState. |
getPresentationVariant |
Gets current value of property presentationVariant. Object representing the presentation variant. The structure looks like:
Note:
|
getSelectionVariant |
Gets current value of property selectionVariant. Object representing the selection variant. The structure looks like:
|
getSemanticDates |
Gets current value of property semanticDates. Structure containing Date range semantic data of the filter value.
|
getValueTexts |
Gets current value of property valueTexts. Structure containing filter value keys and its corresponding descriptions.
|
getVariantName |
Gets current value of property variantName. Variant name. |
setPresentationVariant |
Sets a new value for property presentationVariant. Object representing the presentation variant. The structure looks like:
Note:
When called with a value of |
setSelectionVariant |
Sets a new value for property selectionVariant. Object representing the selection variant. The structure looks like:
When called with a value of |
setSemanticDates |
Sets a new value for property semanticDates. Structure containing Date range semantic data of the filter value.
When called with a value of |
setValueTexts |
Sets a new value for property valueTexts. Structure containing filter value keys and its corresponding descriptions.
When called with a value of |
setVariantName |
Sets a new value for property variantName. Variant name. When called with a value of |
Constructs the value state out of a given selection variant and the current model data
Param | Type | DefaultValue | Description |
---|---|---|---|
oSelectionVariant | object |
selection variant object |
|
mData | Object<string,any> |
the filter provider model data |
Constructs the value state out of a given selection variant and the current model data
Param | Type | DefaultValue | Description |
---|---|---|---|
oSelectionVariant | object |
selection variant object |
|
mData | Object<string,any> |
the filter provider model data |
Converts PresentationVariant annotation to UIState object.
Param | Type | DefaultValue | Description |
---|---|---|---|
sVariantName | string |
Name of the variant |
|
oSelectionVariantAnnotation | object |
Object representing the com.sap.vocabularies.UI.v1.SelectionVariant annotation provided by MetadataAnalyser |
|
oPresentationVariantAnnotation | object |
Object representing the com.sap.vocabularies.UI.v1.PresentationVariant annotation provided by MetadataAnalyser |
Determines the filter names with value keys where the description is not available.
Param | Type | DefaultValue | Description |
---|---|---|---|
oValueTexts | object |
Containing the value description for filters |
|
oSelectionVariant | object |
The selection variant containing filters and value keys |
|
aIgnoreSelOptionName | array |
Filter names to ignore |
Enriches the internal filter bar value format with the information from the value state.
Param | Type | DefaultValue | Description |
---|---|---|---|
sPayload | string |
the filter bar inner data format |
|
oValueTexts | object |
the value texts format containing the eventual descriptions. |
Enriches the internal filter bar value format with the information from the value state.
Param | Type | DefaultValue | Description |
---|---|---|---|
sPayload | string |
the filter bar inner data format |
|
oValueTexts | object |
the value texts format containing the eventual descriptions. |
Creates a new subclass of class sap.ui.comp.state.UIState with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.base.ManagedObject.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Returns a metadata object for class sap.ui.comp.state.UIState.
Gets current value of property presentationVariant.
Object representing the presentation variant. The structure looks like:
{
ContextUrl: {string},
MaxItems: {int},
SortOrder: [],
GroupBy: [],
Total: [],
RequestAtLeast: [],
Visualizations: []
}
Note:
PresentationVariantID
property is not providedText
property is not provided because it is translated textTotalBy
is not supported yetIncludeGrandTotal
is not supported yetInitialExpansionLevel
is not supported yetTitle
of Visualizations.Content
property is not provided because it is translated textDescription
of Visualizations.Content
property is not provided because it is translated textVariantName
property is not part of specified DataSuiteFormat yet Gets current value of property selectionVariant.
Object representing the selection variant. The structure looks like:
{
SelectionVariant: {
SelectionVariantID: {string},
Parameters: [],
SelectOptions: []
}
Gets current value of property semanticDates.
Structure containing Date range semantic data of the filter value.
{
Dates: [
{
PropertyName: string,
Data: {
calendarType: string,
key: string,
operation: string,
value1: int,
value2: int
}
}
]
}
Gets current value of property valueTexts.
Structure containing filter value keys and its corresponding descriptions.
{
Texts: [
{
Language: string,
ContextUrl: string,
PropertyTexts: [
{
PropertyName: string,
ValueTexts: [
{
PropertyValue: string,
Text: string
}
]
}
]
}
]
}
Sets a new value for property presentationVariant.
Object representing the presentation variant. The structure looks like:
{
ContextUrl: {string},
MaxItems: {int},
SortOrder: [],
GroupBy: [],
Total: [],
RequestAtLeast: [],
Visualizations: []
}
Note:
PresentationVariantID
property is not providedText
property is not provided because it is translated textTotalBy
is not supported yetIncludeGrandTotal
is not supported yetInitialExpansionLevel
is not supported yetTitle
of Visualizations.Content
property is not provided because it is translated textDescription
of Visualizations.Content
property is not provided because it is translated textVariantName
property is not part of specified DataSuiteFormat yet When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
oPresentationVariant | object |
New value for property |
Sets a new value for property selectionVariant.
Object representing the selection variant. The structure looks like:
{
SelectionVariant: {
SelectionVariantID: {string},
Parameters: [],
SelectOptions: []
}
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSelectionVariant | object |
New value for property |
Sets a new value for property semanticDates.
Structure containing Date range semantic data of the filter value.
{
Dates: [
{
PropertyName: string,
Data: {
calendarType: string,
key: string,
operation: string,
value1: int,
value2: int
}
}
]
}
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSemanticDates | object |
New value for property |
Sets a new value for property valueTexts.
Structure containing filter value keys and its corresponding descriptions.
{
Texts: [
{
Language: string,
ContextUrl: string,
PropertyTexts: [
{
PropertyName: string,
ValueTexts: [
{
PropertyValue: string,
Text: string
}
]
}
]
}
]
}
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
oValueTexts | object |
New value for property |
Sets a new value for property variantName.
Variant name.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sVariantName | string |
New value for property |