在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