Skip to Content
-1

SAPUI5 bind data from oData function import in my XML view

May 23, 2017 at 09:29 PM

172

avatar image
Former Member

Hello,

I'm new in SAP UI5 and Gateway, I'm using a function import that takes as import value the URLparams of my application and returns an entitySet. I need to bind this function import to my table created in the XML view, my question is how can I send the URLparam from my controller to my XML View. Someone has an idea ? or I have to take another route?

Many Thanks,

Kalthoum

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Akhilesh Upadhyay May 24, 2017 at 08:31 AM
0

once you get an entityset, bind it to table without any URLParameter. post bind you can filter the items as below if you need only filteration:

var filter1 = new sap.ui.model.Filter("param1", sap.ui.model.FilterOperator.EQ, "val1");
oTable.getBinding("items").filter([filter1]); // you can number of filters like [filter1, filter2,.........]

Or, if you need any more urlparameters like expand,select etc., then its good do read operation as below:

oModel.read("/entityset",{
  filters: aFilters,
  urlParameters:{"$expand": "Header2Items"},
  ...........
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member May 24, 2017 at 01:19 PM
0

Thank you for your feedback. I need to call a function import with parameter not to filter in an entityset. Actually, I bind items in my controller as I pass the urlParam to the function import. My question is if I can do more properly this with passing my param in the XML view and do the bind in XML?

Show 1 Share
10 |10000 characters needed characters left characters exceeded

i am not getting you.....

what i can suggest you as per my understanding is: you can not pass dynamic value for urlparameters from controller to xml view. only static values can be pass in xml.

I think you could post your query more precisely.

0