on 02-13-2018 8:18 PM
Hi all,
I'm not getting to make the following formatter function work:
MyApp/models.Formatter.js
sap.ui.define([], function () {
"use strict";
return {
formatPO: function (sEbeln, sEbelp) {
console.log("calling...");
return sEbeln + "/" + sEbelp;
}
};
});
MyApp/controller/Master.controller.js
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/m/MessageBox",
"sap/m/MessageToast",
"MyApp/functions/Functions",
"MyApp/models/Formatter"
], function (Controller, MessageBox, MessageToast, Functions, formatter) {
"use strict";
return Controller.extend("MyApp.controller.Master", {
formatter: formatter,
MyApp/fragments/ListaPO.fragment.xml
<ObjectIdentifier
title="{ parts:[{path: 'mdlOpenPO>Ebeln'},
{path: 'mdlOpenPO>Ebelp'}],
formatter: '.formatter.formatPO' }"
text="{mdlOpenPO>Txz01}"/>
MyApp/view/Master.view.xml
<Page title="{i18n>masterTitle}" level="H1">
<content>
<core:Fragment fragmentName="MyApp.fragments.ListaPO" type="XML"/>
</content>
</Page>
Does not return any errors, simply does not work.
Does anybody could help me to find the cause of this issue?
Thanks in advance
Thanks for the answer. I solved the problem by inserting the following line code in bootstrap:
data-sap-ui-xx-bindingSyntax="complex"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<core:Fragment fragmentName="MyApp.fragments.ListaPO" type="XML" oController="yourcontroller"/>
not sure if it will work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.