Skip to Content
0

Uncaught TypeError: I.fFunction.call is not a function for sap.m.table

Dec 12, 2017 at 10:48 PM

415

avatar image

I've been trying to figure this out for a while and I'm hoping someone out there can help me. I have a table layout, that has dynamic columns. I can't seem to get rid of the i.fFunction.call error. It shows up everytime I scroll or change screens. I'm including a subset of my controller. The last line is where the debugger is flagging the issue. I have tried commenting out my toolbar, but still can't rid of the error.

Thanks,

Mike

onInit: function() {
var self = this;

var oViewModel,
iOriginalBusyDelay;

// Model used to manipulate control states
oViewModel = new JSONModel({
worklistTableTitle: this.getResourceBundle().getText("worklistTableTitle"),
saveAsTileTitle: this.getResourceBundle().getText("worklistViewTitle"),
shareOnJamTitle: this.getResourceBundle().getText("worklistViewTitle"),
shareSendEmailSubject: this.getResourceBundle().getText("shareSendEmailWorklistSubject"),
shareSendEmailMessage: this.getResourceBundle().getText("shareSendEmailWorklistMessage", [location.href]),
tableNoDataText: this.getResourceBundle().getText("tableNoDataText"),
tableBusyDelay: 0
});
this.setModel(oViewModel, "worklistView");

var oTableHdr = new sap.m.Table({
showNoData: false,
// mode: "MultiSelect",
fixedLayout: false
});
var oNotTab = new sap.m.Table({
id: "NotExec",
width: "100%",
mode: "MultiSelect",
// class: "sapUiResponsiveMargin",
// noDataText: "{worklistView>/tableNoDataText}",
// busyIndicatorDelay:"{worklistView>/tableBusyDelay}",
growing: true,
growingScrollToLoad: true,
fixedColumnCount: 1,
fixedLayout: false,
// itemPress: function(oEvent) {
// self.onPress(oEvent);
// },
updateFinished: "onUpdateFinished"
});
var colItems = new sap.m.ColumnListItem("colItems", {
type: "Navigation",
press: function(oEvent) {
self.onPress(oEvent);
}
});

var oToolLabel = new sap.m.Label({
text: "{worklistView>/worklistTableTitle}"
// this.getModel("worklistView").getProperty("/worklistTableTitle")
});

var oButtRefresh = new sap.m.Button({
id: "BtRefresh",
type: "Transparent",
press: function() {
self.onRefresh();
},
icon: "sap-icon://refresh"
});

var oButtSettings = new sap.m.Button({
id: "BtSettings",
type: "Transparent",
press: function() {
self.handleSettings();
},
text: "Selections Screen"
});

var oSearch = new sap.m.SearchField({
id: "searchField",
tooltip: "{i18n>worklistSearchTooltip}",
search: function(oEvent) {
self.onSearch(oEvent);
},
width: "auto"
});

var oTool = new sap.m.Toolbar({
content: [oToolLabel, oSearch, oButtRefresh, oButtSettings]
});

oTableHdr.setHeaderToolbar(oTool);

oNotTab.bindAggregation("items", "/", colItems);
var val;
var oModel = sap.ui.getCore().getModel("config").getProperty("/results");
var oModelNot = new sap.ui.model.json.JSONModel();
oModelNot.setData(sap.ui.getCore().getModel("notifs").getProperty("/results")); // instantiate the table
// j = 1;
if (oModel.length > 0) {
for (var i = 0; i < oModel.length; i++) {
if (oModel[i].GwField !== "") {
if (oModel[i].Object === "NOT EXEC LIST") {
val = "{" + oModel[i].GwField + "}";
if (oModel[i].Type === "TEXT" || oModel[i].Type === "DROPDOWN" || oModel[i].Type === "CHECK") {
oNotTab.addColumn(new sap.m.Column({
autoResizable: true,
width: "auto",
demandPopin: true,
header: new sap.m.Label({
text: oModel[i].ShortDescr
}),
}));
var txtNAME = new sap.m.Text(oModel[i].GwField, {
text: {
path: oModel[i].GwField,
formatter: formatter.leadZero
}
});
colItems.addCell(txtNAME);
}
if (oModel[i].Type === "DATE") {}
if (oModel[i].Type === "TIME") {}
}
}
}
}
oNotTab.setModel(oModelNot);

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers