Hi
I cant seem to create a Table inside a Mobile Page - sap.m.Page
since there is no table in the mobile package, I used the desktop version - but can't seem to create. It errors out saying the following
< Uncaught TypeError: Cannot read property 'Table' of undefined >
following is the code -
var oFlexBox = new sap.m.FlexBox({
displayInline : true,
fitContainer : true,
justifyContent : sap.m.FlexJustifyContent.Start,
});
var oTable = new sap.ui.table.Table({
title: "MY table",
rowHeight : "20px",
columnHeaderHeight : "20px",
columnHeaderVisible : true,
visibleRowCount : 10,
firstVisibleRow : 0,
selectionMode : sap.ui.table.SelectionMode.Single,
selectionBehavior : sap.ui.table.SelectionBehavior.Row,
editable : false,
navigationMode : sap.ui.table.NavigationMode.Scrollbar,
threshold : 100,
enableGrouping : true,
showColumnVisibilityMenu :true,
showNoData : true
});
oFlexBox.addItem(oTable);
var oPage = new sap.m.Page({
content: oFlexBox,
});
The page errors out at the line where I construct the Table - var oTable = new sap.ui.table.Table({
I noticed the similar issue if I use any of the other UI Elements from the core or commons package
like
var oTextView = new sap.ui.commons.TextView();
It will error out saying -
Uncaught TypeError: Cannot read property 'TextView' of undefined
Attaching an image of the error while creating the table
Thanks
Sandip