Skip to Content
avatar image
Former Member

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Aug 10, 2017 at 08:00 PM

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

    Use Data types and formatter options for more detailed control

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 11, 2017 at 08:18 AM

    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

    Add comment
    10|10000 characters needed characters exceeded