cancel
Showing results for 
Search instead for 
Did you mean: 

how can i get the absolute path for odata binding??

former_member592880
Participant
0 Kudos

hello,

I am trying to attach a models to a view, but it is not getting an absolute path and therefore not showing the output

how do I fix this??

XML

 <IconTabFilter id="fltComments" text="Comments" icon="sap-icon://comment" key="Comments" iconColor="Critical">
      <content>
       <FeedListItem text="{spCom>SPcomment}" icon="sap-icon://personnel-view" info="{spCom>appLvl}" sender="{spCom>userName}"/>
      </content>
     </IconTabFilter>

JS

 oModel.read(comments, {
     success: function (oData, response) {
      if (oData.results !== "undefined" || oData.results !== null) {
       var UsageModel = new sap.ui.model.json.JSONModel({
        "spData": oData.results
       });
       that.getView().setModel(UsageModel, "spCom");
      }
     },
     error: function (error) {
      var message = "Error";
      sap.m.MessageBox.show(message, sap.m.MessageBox.Icon.ERROR, "Error");
     }
    });

UI5 Diagnosis

regards

Siddharth

junwu
Active Contributor
0 Kudos

why you need that?

former_member592880
Participant
0 Kudos

I need it cause without that the object shows no data. The FeedListItem comes off as blank

former_member592880
Participant
0 Kudos

nabheet.madan3 that it!!!! that's what I wanted. thank you so much for your help 🙂

former_member592880
Participant
0 Kudos

nabheet.madan3 you want to copy your comment as an answer so ill make it right?? I reckon you get scores for that.

Accepted Solutions (1)

Accepted Solutions (1)

nabheetscn
Active Contributor

Siddharth what does your Odata call return can you please attach that screen shots also? If your feed list items are multiple which normally is then you should use List as parent control of this item with items binded via absolute path as aggregation. Then in feed you can refer via relative path as done here

maheshpalavalli
Active Contributor

Welcome back nabheet, missed you in the activity feed 😛

nabheetscn
Active Contributor

Mahesh Kumar Palavalli feeling is mutual bro... Management stuff kills me:)

Answers (0)