Skip to Content
0

Two-way binding of a sap.m.Input numeric input field, language dependent

Aug 10, 2017 at 07:44 PM

38

avatar image
Former Member

Hello,

I need to bind a a sap.m.Input control with a field, which type is numeric.

Suppose we have the number 8000.5 in the model

we want in the view,

if the language is English, we show 8,000.50

if the language is German, we show 8.000,50 (point as separator and comma before decimal)

If the user type "8.000,49" in German, we get the 8000.49 in the model.

In general, we need to have two decimal and easy-to-read representation in the view with two way binding.

Is there any recommended way for doing this?

Thank You.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Srikanth KV Aug 10, 2017 at 08:00 PM
0

https://sapui5.hana.ondemand.com/explored.html#/sample/sap.ui.core.sample.TypeFloat/preview

Use Data types and formatter options for more detailed control

Share
10 |10000 characters needed characters left characters exceeded
Sharath M G Aug 11, 2017 at 08:18 AM
0

First, read the language of the user/profile/browser in your code.

Based on the language - DE/EN/FR, define the number to displayed in the custom formatter function for the input field.

Regards,

Sharath

Share
10 |10000 characters needed characters left characters exceeded