on 05-15-2015 9:10 AM
Hi UI5 experts,
I have a very simple scenario where I want to show a total entries of a collection without doing aggregation binding on a list/something similar.
e.g. I want to show summary page with total Products (the list with all products will be in another page)
Is there a way to get this value via databinding syntax such as
<Text text="{/Products/$count}"/>
Please note that:
I want to avoid calling OData request directly to get the $count and then programmatically set it to the Text control.
I also want to avoid having to bind the /Products collection to a list first and then get the total length, because like I said, all I want to show is count, so retrieving the whole collections seems like an overkill.
If it's not possible to do this via databinding, then why is it not supported? this seems like quite simple scenario that makes me wonder why it's not supported?
I have actually tried Expression Binding on the newest SAPUI5 1.28.5 but it doesn't support it on collection level
i.e. {= ${/Products}.length} doesn't work
Regards
Ming
Don't think there is a declarative way to do it, only programmatically. And to try to answer "why", I would guess because it is DATA binding, not METADATA binding.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
10 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.