setTextFromCurrencyReal

setTextFromCurrencyReal(real: Real);

The setTextFromCurrencyReal method sets the text from the text property of a TextBox control to a Real value converted to a string in the format of the locale under which the control is running (for details, see the languageId property).

When the EnhancedLocaleSupport parameter in the [JadeEnvironment] section of the JADE initialization file is not defined or it is set to false, inconsistent results could be returned to the application server when running in JADE thin client mode and there are regional overrides, as all overrides on the application server are suppressed if enhanced locale support is not enabled. By default, formatting of locale data is done on the application server, based on the locale of the corresponding presentation client.

The setTextFromCurrencyReal method of a TextBox control sets the text property value to a Real value converted to a string in the format of the locale of the user application. The number of decimal places displayed is determined by the value of the decimals property and the Real number is rounded to that precision. (Note that an exception is raised if the resulting string exceeds the maxLength property value of the text box.)

A numeric TextBox control expects the negative sign and decimal place characters to be in the form defined for the locale under which the user is running. This applies when accessing the text property and when the user enters data. Setting the text by using the setTextFromCurrencyReal method converts the number into the appropriate string for that locale. Retrieving the Decimal value by using the getTextAsCurrencyReal method does the reverse. You can therefore use the getTextAsCurrencyReal and setTextFromCurrencyReal methods to access numeric text so that JADE handles the locale format for you.

The position of a negative sign indicated by the locale is honored by a leading or trailing numeric in the TextBox control. However, locales that specify a negative value expressed by parentheses (for example, (123)) are treated as a leading dash symbol (-). In addition, locales that have a leading or trailing space associated with a negative sign are treated as the equivalent format without the space (for example, - 123 will be -123 and 123 - will be 123-).