Quantcast
Channel: SCN: Message List - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 8124

Re: How to bind the data to the table in mobile?

$
0
0

Hi,

 

Thanks for your reply.

Still I am facing same issue. I am getting the following error message .

 

GET https://sapes1.sapdevcenter.com/sap/opu/odata/sap/ZGWSAMPLE_SRV/SalesOrders?$skip=0&$top=107&$inlinecount=allpages 404 (Not Found) datajs.js:17

  1. 2013-11-21 12:47:37 The following problem occurred: HTTP request failed404,Not Found,{"error":{"code":"005056A509B11EE1B9A8FEC11C21D78E","message":{"lang":"en","value":"Resource not found for the segment 'SalesOrders'."}}} - 


When I changed that code from

 

oHelpTable1.bindAggregation("rows", "/SalesOrders");      to


oHelpTable1.bindAggregation("rows", "/BusinessPartnerCollection('0100000000')/SalesOrders");

 

then I am getting Items list  like below.

split.jpg

 

I am trying to bind the Table data in Detail.controller.js file like below.

 

_refresh : function (channelId, eventId, data) {

 

                                                    if (data && data.context) {

 

                                                              var currentRowContext = data.context.sPath;

                                                               this.getView().setBindingContext(data.context);

                                                               var tableid = sap.ui.getCore().byId("t1");

                                                               var url = currentRowContext + "/SalesOrders";


                                                               tableid.bindRows(url);  (or)


                                             /*    tableid.bindAggregation("rows", url); */


 

                                                               var context = this.getView().getBindingContext();

                                                               var oModel = new sap.ui.model.json.JSONModel({

                                                                                       actionsEnabled : context && !!context.getObject()

                                                                                  });

                                                             this.getView().setModel(oModel, "cfg");

                                                         }

                                               },

 

 

Then I am getting output like below.

split2.jpg

 

In this way I can bind the rows but I can not bind the property.

 

How can we bind property in controller file?


 

Thank&Regards

Sridevi


Viewing all articles
Browse latest Browse all 8124

Trending Articles



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