Software Archive
Read-only legacy content
17061 Discussions

Webservice call onClick list item

J_S_
Beginner
308 Views

Hi there, 

I’m getting stuck on how XDK handle controllers and web services calls when using visual designer.

I’m implementing, using Framework 7, a text search for a web service and can consume it, getting back the data and show in a item list (image_1 attached).

Now i’d like to handle the selected item, like ng-click, so that i’ve to pass the parameter ku_article (ex: 0042027 in image_1) to another web service in order to get back all the details of the article and display in another page.

Actually, seems there is a function in the code that is going to handle it, namely: select_entry($event, entry). 

Question is, how is possible to write my own function that call another web service taking as parameters the entry.sku_article clicked? where to implement it? should i modify select_entry($event, entry)?

Thanks again

 

0 Kudos
4 Replies
PaulF_IntelCorp
Employee
308 Views

There are some excellent webinars that were produced very recently that you might want to review. See this page > https://software.intel.com/en-us/xdk/docs/webinars-videos-links and the webinar by Anjali Gola.

0 Kudos
J_S_
Beginner
308 Views

 

Hi Paul,

I've seen all of that, the one you are suggesting have corrupted audio after minute 20 and it's not very clear.

 

 

 

 

 

0 Kudos
Chris_P_Intel
Employee
308 Views

If you are using the Design view, then see the information in this forum reply: https://software.intel.com/en-us/forums/intel-xdk/topic/606422#comment-1855985

 

The code in that reply shows you how to add an event listener to an item, and how to use that items click handler to get the data instance associated with it.   

var entry = data_support.entry_from_$this($(this));      //entry: {title: pubDate:}

 

 

0 Kudos
J_S_
Beginner
308 Views

Hi, 

thanks for the hint! it help a lot!!

Btw Framework7 is not showing interactivity actions for media items as well. Would be possible to add? 

Thx again!

 

 

 

0 Kudos
Reply