Skip to content

Commit

Permalink
OpenUI5 Documentation Update 24.09.2024
Browse files Browse the repository at this point in the history
  • Loading branch information
openui5bot committed Sep 24, 2024
1 parent 5f1cfc2 commit 6e90e42
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/Data_Aggregation_and_Recursive_Hierarchy_7d91431.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Use the `grandTotalAtBottomOnly` or `subtotalsAtBottomOnly` property with values
***
<a name="loio7d914317c0b64c23824bf932cc8a4ae1__section_igs_pyd_tkb"/>
<a name="loio7d914317c0b64c23824bf932cc8a4ae1__section_DAF"/>
### Filtering
Expand Down
8 changes: 8 additions & 0 deletions docs/Deprecated_jQuery_sap_API_Replacement_a075ed8.md
Original file line number Diff line number Diff line change
Expand Up @@ -2397,6 +2397,10 @@ Complex Replacement
</td>
<td valign="top">

Register your local UI5 components and UI5 libraries in the manifest.json under `sap.ui5/dependencies`. For more information, see [Descriptor for Applications, Components, and Libraries \(manifest.json\)](Descriptor_for_Applications_Components_and_Libraries_manifest_json_be0cf40.md).

To load resources from a third-party server, use

```
sap.ui.loader.config({paths:{"myPath": "some/path"}});
```
Expand All @@ -2423,6 +2427,10 @@ Complex Replacement
</td>
<td valign="top">

Register your local UI5 components and UI5 libraries in the manifest.json under `sap.ui5/dependencies`. For more information, see [Descriptor for Applications, Components, and Libraries \(manifest.json\)](Descriptor_for_Applications_Components_and_Libraries_manifest_json_be0cf40.md).

To load resources from a third-party server, use

```
sap.ui.loader.config({paths:{"myPath": "some/path"}});
```
Expand Down
10 changes: 4 additions & 6 deletions docs/Number_Format_91f2f28.md
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ To control the start the starting point of numbers which should be displyed in c

<a name="loio91f2f2866f4d1014b6dd926db0e91070__section_NFP"/>

### Parsing
### Parsing and Validation of User Input

You can parse a formatted number, which can contain locale-dependent grouping separators, a locale-dependent decimal separator or a percentage sign, into a number object using `sap.ui.core.format.NumberFormat`. Such a number string may not be correctly parsed by using `parseInt` or `parseFloat` in JavaScript.

Expand All @@ -496,16 +496,14 @@ oFloatFormat.parse("1,234.567"); // returns 1234.567
oFloatFormat.parse("12.34%"); // returns 0.1234
```

To verify the correct parsing of formatted numbers, two different mechanisms exist: Decimal separator validation and strict grouping validation.
When users switch between multiple UIs, websites or editors, they may encounter different characters being used as decimal and grouping separators. This can lead to incorrect numerical input if the user assumes a locale different from the one actually used by the UI. For example, in English locales the grouping separator is a comma \(","\) and the decimal separator is a dot \("."\), whereas in German locales it is the other way around.

To prevent an accidental mix-up of decimal and grouping separator in the user input, we have introduced a stricter parsing logic of `sap.ui.core.format.NumberFormat` by using **decimal separator validation** with an optional **strict grouping validation**. Instead of ignoring the grouping separators when parsing user input, several checks are now carried out on the grouping to identify potential input errors.

***

#### Decimal Separator Validation

Nowadays, users often switch between multiple UIs, websites or editors that may use different characters as decimal and grouping separators. This can lead to wrong numerical input if the user assumes a locale different from the one actually used by the UI.

UI5 therefore uses **decimal separator validation** to prevent input errors resulting from an accidental mix-up of decimal separator and grouping separator. Instead of ignoring the grouping separators when parsing user input, several checks are now carried out to identify potential input errors.

If not otherwise mentioned, the examples below are based on the US locale standard settings \(en-US\):

```js
Expand Down

0 comments on commit 6e90e42

Please sign in to comment.