在1.26中出现了为参数映射的test
属性指定函数的功能。在以前的版本1.24中,这是不可能的。从你的评论你运行1.24,因此错误。
FWIW,这里是从SAP/UI /模型/ Filter.js在1.24 VS 1.26的细节:
1.24: /** * Constructor for Filter * You can either pass an object with the filter parameters or use the function arguments * * Using object: * new sap.ui.model.Filter({ * path: "...", * operator: "...", * value1: "...", * value2: "..." * }) * * OR: * new sap.ui.model.Filter({ * filters: [...], * and: true|false * })
1.26: /** * Constructor for Filter * You can either pass an object with the filter parameters or use the function arguments * * Using object: * new sap.ui.model.Filter({ * path: "...", * operator: "...", * value1: "...", * value2: "..." * }) * * OR: * new sap.ui.model.Filter({ * path: "...", * test: function(oValue) { * } * }) * * OR: * new sap.ui.model.Filter({ * filters: [...], * and: true|false * })
什么版本UI5您使用的是? – qmacro 2015-03-02 13:44:55
1.24.3这是一个版本问题? – padibro 2015-03-02 15:54:00
ui5bp.modelManager解决了什么问题?它是否在'simpleTable'函数的上下文中可见? – Qualiture 2015-03-04 08:42:12