SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.94k stars 1.23k forks source link

jQuery.sap.formatMessage in Topic "Using the title Property in Targets" Is Never Called #1877

Closed boghyon closed 6 years ago

boghyon commented 6 years ago

URL: https://openui5.hana.ondemand.com/#/topic/1238d706b130433c9bd6b85cfb77cece

I came across the same issue as https://github.com/SAP/openui5/issues/1301 when I tried to bind title according to the snippet from the above mentioned topic:

"title": {
  "parts": ["helperModel>/PRODUCTS_TITLE", "myModel>productName"],
  "formatter": "jQuery.sap.formatMessage"
}

When evaluated, the formatter in BindingInfo is just a string literal ("jQuery.sap.formatMessage") instead of the function which fails formatting the data silently.

According to https://github.com/SAP/openui5/commit/823111c1377363c5d40009e62675d920644bf807, the binding definition should be therefore:

"title": "{ parts: ['helperModel>/PRODUCTS_TITLE', 'myModel>productName'], formatter: 'jQuery.sap.formatMessage' }"
Shtilianova commented 6 years ago

Hello @boghyon , Could you please provide a reproducible example of your issue as JSBin http://jsbin.com/fotetomeji/edit?html,js,output Regards, Diana

boghyon commented 6 years ago

Hi @Shtilianova,

The example is provided by @serban-petrescu in the mentioned issue https://github.com/SAP/openui5/issues/1301. It's the same issue.

Edit: To avoid misunderstanding; My issue here is about the incorrectness in the documentation.

gerym commented 6 years ago

Hello @boghyon , Thank you for sharing this finding. I've created an internal incident 1870091321. The status of the issue will be updated here in GitHub.

Regards, Gery

boghyon commented 6 years ago

I see that the documentation is updated now. Thanks for fixing it. Closing..