question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enhancement request: Get value of control's property inside expression binding

See original GitHub issue

Hi,

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:open
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ThomasChadzelekcommented, Aug 8, 2016

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.

0reactions
monavari-lebrechtcommented, Aug 8, 2016

Isn’t this very similar to the Pull Request https://github.com/SAP/openui5/pull/727 ?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found