对于openui5组件,我需要绑定多个模型,并且正在研究最好的方法是什么。
模型既有JSONModel也有XMLModel。
背景是,我希望为自定义openui5-spitz-reader组件https://github.com/elsewhat/openui5-spritz-reader提供多个源的用户选择
用户可以进行的每个选择(BBC World News,Reddit /r/worldnews)都有一个填充的模型。
在运行时,我需要组合用户选择的所有模型,并将组合后的内容绑定到openui5-spitz-reader组件的项目聚合。
发布于 2014-03-02 18:29:06
您可以在聚合上使用命名模型,请参阅Multimodel Support - example using multiple models an element JSBin OData Model dynamic column and data binding
我不确定您是否可以在单个聚合上绑定来自两个模型的数据,您也许可以使用带有聚合的factory function或模型binding - using a generic binding to sum aggregation上的处理程序来实现
https://stackoverflow.com/questions/22126075
复制相似问题