Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

No data sap ui5 table display /view navigation

$
0
0

Hi All,

 

Having the problem in displaying the data in the table in view.(No data). But I can see the value's coming from back end(sap)

 

Am using the function import to get the component details and try to set the oData.results to model with the name "compModel"

 

and get the model value in the next view to bind to table. But am not getting the value in the table display.

 

Please find the code,

 

oModel.callFunction("Get_Component_Details",

  "GET", {

     ProductOrd: prodNumber.value,

  Component: Comp.value

  },

  null,

  function(oData, oResponse){

  if (oData.results instanceof Array && oData.results.length > 0) {

  self.setComponentDetails(self, oData);

}

         jQuery.sap.require("sap.m.MessageToast");

                sap.m.MessageToast.show("Continues to select the component selection...");

             sap.ui.getCore().byId("idapp").to("idCompDetailsPage");

 

},

//call back function of success

  function(oError){

  sap.m.MessageBox.alert("Error");

  }

  );

   

  },

 

  setComponentDetails: function(self, results) {

       var oModel = new sap.ui.model.json.JSONModel();

        oModel.setData(results);

   //     sap.ui.getCore().setModel(oModel, "compModel");

    },

 

 

in my CompDetailsPage"view controller

 

onBeforeRendering: function() {

   var compModel = sap.ui.getCore().getModel("compModel");

   this.getView().setModel(compModel);

     var oTable = this.byId("idComponentTable");

                     oTable.setModel(compModel);

 

},

 

View: am giving the path as like this. But it is not working.

 

 

<Table id="idComponentTable"

 

mode="MultiSelect"

inset="false"

items="{

path: '/results' }">

 

any help on this?


Viewing all articles
Browse latest Browse all 3523

Trending Articles



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