Namespace sap.ui.core.ValueStateSupportModule: sap/ui/core/ValueStateSupport


Helper functionality for value state support.

Method Summary
sap.ui.core.ValueStateSupport.enrichTooltip(oElement, sTooltipText)Appends a generic success, warning or error message to the given tooltip text if the given Element has a property "valueState" with one of these three states.
sap.ui.core.ValueStateSupport.formatValueState(iState)Returns a ValueState object based on the given integer value

0 : ValueState.None 1 : ValueState.Warning 2 : ValueState.Success 3 : ValueState.Error

sap.ui.core.ValueStateSupport.getAdditionalText(vValue)Returns a generic success, warning or error message if the given Element has a property "valueState" with one of these three states or the given ValueState represents one of these states.
Method Detail
sap.ui.core.ValueStateSupport.enrichTooltip(oElement, sTooltipText): string
Appends a generic success, warning or error message to the given tooltip text if the given Element has a property "valueState" with one of these three states.
Parameters:
{sap.ui.core.Element}oElement the Element of which the tooltip needs to be modified
{string}sTooltipText the original tooltip text (may be null)
Returns:
{string} the given text, with appended success/warning/error text, if appropriate
sap.ui.core.ValueStateSupport.formatValueState(iState): sap.ui.core.ValueState
Returns a ValueState object based on the given integer value

0 : ValueState.None 1 : ValueState.Warning 2 : ValueState.Success 3 : ValueState.Error

Parameters:
{int}iState the state as an integer
Since:
1.25.0
Returns:
{sap.ui.core.ValueState} the corresponding ValueState object
sap.ui.core.ValueStateSupport.getAdditionalText(vValue): string
Returns a generic success, warning or error message if the given Element has a property "valueState" with one of these three states or the given ValueState represents one of these states.
Parameters:
{sap.ui.core.Element|sap.ui.core.ValueState}vValue the Element of which the valueState needs to be checked, or the ValueState explicitly
Returns:
{string} the success/warning/error text, if appropriate; otherwise null