Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9063

Re: SAPUI5 table binding is showing no content

$
0
0

Hello Dennis,

 

The following is failing - please notice my comments in bold letters.

 

   /* =================================== */

 

    /* Obtain Json object filled with Data*                            

 

    /* =================================== */

 

var xmlHttp = new XMLHttpRequest();

 

            var xmlDom;

 

           xmlHttp.open( "GET", "/XMII/Runner?Transaction=ProjectsStatus/Transactions/ProjectsStatus&OutputParameter=JSONData&Content-Type=text/xml", false );

 

 

 

            xmlHttp.send();

 

           // xmlDom= xmlHttp.responseXML;

 

  xmlDom = xmlHttp.responseText;

 

 

 

    

 

        // create a JSONModel, fill in the data and bind the Table to this model

 

   // var oModel = new sap.ui.model.json.JSONModel();  >>>>> I would like to use JSONModel() - but when I use it - I do even get the table headings.

 

      var oModel = new sap.ui.model.xml.XMLModel();  >>>>>> This display the table but with no data

 

        //oModel.setData({modelData: xmlDom});

 

        oModel.setXML(xmlDom);

 

        oTable.setModel(oModel);

 

        oTable.bindRows("/element"); //where element is the node that represents that data which forms each row of the table

 

    

 

        // finally place the Table into the UI

 

        oTable.placeAt("content1");


Viewing all articles
Browse latest Browse all 9063

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>