UI5: How to pass filter values to sap.m.Table in X

2019-06-05 15:17发布

I am developing an app using worklist template of Web IDE. I got stuck in with an issue in binding filter values to items attribute of sap.m.Table along with OData - EntitySet path. As you can see in below screen shot, value1 needs to get value of property "name". I guess the syntax that I am using might be wrong.

Please suggest on how to pass dynamic values to filter.

Object.view.xml

With the above code in XML view I am seeing below show values in back end. enter image description here

1条回答
\"骚年 ilove
2楼-- · 2019-06-05 16:16

Unfortunately, UI5 doesn't support binding syntax for filters and sorter yet. The strings in value1 (and value2) will not be parsed but taken literally. And it looks like such bindings won't be supported in near future either despite being on the backlock and one of the highly requested features.

Until then, we've to use bindItems, set sap.ui.model.Filter instances on the filters property of the binding info object, and get the filter values from the desired model manually instead of using binding syntax.

Example: https://embed.plnkr.co/AoIZI4/

查看更多
登录 后发表回答