Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
19 Views

Binding OData RestAPI to Intel XDK

In the API Explorer Sandbox I tried the REST API for a
OData Service. I can create a Service binding but How do I proceed to map the service to the UI in Intel XDK? I tried to bind the Service to a List Item (Controller Type multiple ) but it just returns the GET response in JSON. The version I have is 3759.

Tags (2)
0 Kudos
5 Replies
Highlighted
19 Views

I'll ask one of the experts on that topic to respond.

0 Kudos
Highlighted
Employee
19 Views

My apologies for the delay in replying. I accidentally marked this as completed.

So, what sort of response do you get from the OData service? If you want to bind to the controls in the App Designer it would have to be JSON.    If you are getting raw text, XML, or something else, that may not function so well. Many of the services convert XML to JSON, but for the base RESTAPI one, I believe it's response is taken as delivered.

 

0 Kudos
Highlighted
Beginner
19 Views

Thank you Chris for taking this question. I am trying to bring data from a ODATA service. As mentioned I have the service bindings which seems to provide a JSON Response. My difficulty is in mapping this to the controls in the designer. I was looking for a generic help as to how to bind controls to service and I could not find. I just tried the List Control as in the attached image and depending on the control type (single/multiple) I get all or one row of raw data as shown.

I appreciate your help. Thanks

0 Kudos
Highlighted
Employee
19 Views

When you create the data binding are you selecting the response fields that you want to use? Clicking the checkmarks next to them? It's not required, but it makes things a lot easier.

If you've done that, then when you are back in App Designer, choose the DataPath and you should then see those things you checked appear as tokens you can use.  There used to be videos that demonstrated this, but the links seem not to be working. https://software.intel.com/en-us/xdk/videos/intel-xdk-app-designer

 

 

0 Kudos
Highlighted
Beginner
19 Views

 

Hi Chris

Thanks. I chose the fields from the response and Saved the service. It took me to the editor and I see only one service method under the service in CONTROLS.

In my index.html page in design I had just one page with a header. The Service method when I hover over the method shows a dark arrow pointing to the header, or if I have a list item control (after removing two from the default of three list item controls) the dark arrow points to it. Where can I find the data path? Is there a more detailed description somewhere? As you mentioned the link is not working. Is it possible to reinstate the video? 

 

 

0 Kudos