Enhancement request: Get value of control's property inside expression binding
See original GitHub issueHi,
When I’m defining a new control inside an XML-View , I’d like to be able to use the reference to that control and use the value of its certain property inside the expression binding.
Something like this:
...
property="{= thisControl.valueState === 'Error' ? _doThis_ : _doThat_ }"
...
Of course, I could just define an extra JSONModel and store the controls properties there in order to use it later in the expression binding, but that concept doesn’t work when I’m working with aggregation binding.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Expression Binding - Documentation - Demo Kit - SAPUI5 SDK
The embedded binding ${binding} delivers a value formatted according to the target type of the control property the expression binding applies to, ...
Read more >Expression Binding - SAP Help Portal
Expression binding is an enhancement of the SAPUI5 binding syntax, which allows for providing expressions instead of custom formatter functions.
Read more >How to bind a SAPUI5 control property with data out of a ...
From time to time I have the requirement to bind a control property to based on data out of model A to ...
Read more >Tag Bindings in Perspective - Ignition User Manual 8.1
A direct binding binds a component property to a Tag path. Every time the Tag's value changes, the binding is evaluated and the...
Read more >Using Bindings and Creating Data Controls - Oracle Help Center
For more information on data binding and data controls, see the following: ... of the Expression Language (EL) in its ADF Mobile AMX...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, I agree. Your pull request provides an answer to Boghyon’s question.
As I already commented, your suggestion is a general “enhancement to basic binding concepts which of course can be used inside expression binding, but not only there”. This is a good thing! But it means the tests are misplaced and we need other people’s approval as well, not just mine.
I like the idea of binding to another (or the own) control’s properties via a syntax similar to “model>path”. But: “@” is not a reserved character within a model name, e.g. “@i18n” is a perfectly valid model name as of today. I fear this change is somewhat incompatible. We need to find a better syntax.
Isn’t this very similar to the Pull Request https://github.com/SAP/openui5/pull/727 ?