Page 1 of 1

2 services mapped to component. Toggle between the 2 getting appropriate data shown in component

Posted: Mon Sep 30, 2013 3:16 pm
by Pete Nellmapius

I have a RestService mapped to an component.
In Javascript I do: service_name1.execute({}); which works fine.
I then want to Close that Service and Execute another one that is also connected to the component.
In JS I do: service_name2.execute({}); but nothing happens.
How do I close the first service before executing the 2nd one or refresh the HTML component?


2 services mapped to component. Toggle between the 2 getting appropriate data shown in component

Posted: Mon Sep 30, 2013 4:29 pm
by Maryna Brodina

Hello! You can't close the service - you invoke it and it's running. Ones you receive the data results are mapped and service events invoked (success|error and complete). If you need to invoke second service you can do that on success or complete event of the first one.


2 services mapped to component. Toggle between the 2 getting appropriate data shown in component

Posted: Tue Oct 01, 2013 8:08 am
by Pete Nellmapius

Thanks Marina