Formatter Function Not Found - SAP UI5 [closed]

北战南征 提交于 2019-12-13 11:22:02

问题


I am facing an issue in formatter. I have a function inside a formatter. When I call the function, it says " .formatter.checkFunc() not found.!. I have included all necessary files in the controller. But not able to find the cause of the issue.

View :

<Text text="{parts: ['value'], formatter: '.formatter.checkFunc'}"/>

Controller :

sap.ui.define([
"XX/controller/BaseController",
"sap/ui/core/mvc/Controller",
"sap/ui/model/Filter",
"sap/ui/model/FilterOperator",
"XX/model/formatter" ],
function(BaseController, Controller, Filter, FilterOperator,formatter)
{ "use strict"; return BaseController.extend("XXXX.controller.Sourcing",
{

formatter: formatter,


回答1:


Looks like that you call the formatter instead of specifying it:

it shoudl be ".formatter.checkFunc", but not ".formatter.checkFunc()"



来源:https://stackoverflow.com/questions/48116082/formatter-function-not-found-sap-ui5

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!