Skip to Content

sap.ui.table doesn't show data

Hi altogether,

I am still writing a custom application, showing a table based reporting. For the first attempts I worked with sap.m.table from the SAP Web IDE standard controls.

My app was working correctly and my data was shown as expected.

Now I changed to sap.ui.table because of sorting functionality. In the example of SAPUI5 SDK (CLICK), it seems very easy and simple to use.

Now I have the problem, that nothing is shown. My coding can be seein in the attached txt-file. Besides the non showing content (header of opened app is shown correctly) variable this is undefined inside the oModel.read-function. So I made a that variable. Working with sap.m.table I didn't have this problem.

I also attached my XML-view. Don't mind about the commented lines. These are the working ones, using sap.m.table.

Data is correctly written to variable oJsonModel. What is wrong with my coding in the controller?

Thanks in advance and best regards

Christian

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 08 at 04:06 PM

    Hi,

    in your controller, you are creating a new sap.ui.table.Table:

    var oTable = new sap.ui.table.Table();

    shouldn't it be:

    var oTable = oView.byId("zbkTable");

    Because otherwise your table remains with list binding to /TimeEntrySet, but you are loading the data in root path of the JSON model.


    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      try to change your view tag with height="100%" and your page tag with enableScrolling="false", like in the sample:

      <mvc:View
       controllerName="sap.ui.table.sample.Basic.Controller"
       xmlns="sap.ui.table"
       xmlns:mvc="sap.ui.core.mvc"
       xmlns:u="sap.ui.unified"
       xmlns:c="sap.ui.core"
       xmlns:m="sap.m"
          height="100%">
       <m:Page
        showHeader="false"
        enableScrolling="false"
        class="sapUiContentPadding">