on 2021 Aug 11 7:21 AM
I want to use a static value on xml, to use it in formatter. I found this comment on stackoverflow but this doesn't work for me.
I use the version 1.70, i see the feature is after 1.61 available.
My code:
{ parts: [
{path: 'modelName>/processState'},
{value: 'german'}
], formatter: '.translation'}
In my app i dont get any text.
EDIT:
You know the code above don't work.
If i change to this:
{ parts: [
{path: 'modelName>/processState'},
{path: 'modelName>/german'}
], formatter: '.translation'}
But in this solution i must set the property "german" to german in JS.
This is my formatter
translation: function(sKey, sLanguage){
return this.text(sKey, sLanguage)
}
My OpenUI5 Version was 1.78.8
Request clarification before answering.
It's a bug in UI5 which was reported last year and has been fixed since version 1.80. See the GitHub issue "CompositeBinding parts mixed with named models and StaticBindings incompatible when creating ...
Until the app can run with a newer version, you can circumvent the bug with the following temporary solution:
{
parts: [
{ path: 'modelName>/processState' },
{ value: 'german', model: 'modelName' }
],
formatter: '.translation'
}
Simply add the model name from one of the parts to the value binding info.
You might get an error log in the console but that can be ignored. Better update the UI5 version ASAP and remove the above workaround since SAPUI5 1.78 is already "out of maintenance".
____
Same issue: https://stackoverflow.com/q/61816223/5846045
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello boghyon.hoffmann ,
Thank You for the greate Answer. It works with the temporary solution
But u have right, i increase the version!
Thank you very much. U made my day 🙂
Greetz
User | Count |
---|---|
62 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.