Page 1 of 1

How to invoke a service from another page

Posted: Fri Sep 12, 2014 10:40 am
by Hawk

Hello,

I am following the tutorial (http://devcenter.appery.io/tutorials/...). Everything is fine up to (sending a photo from camera to database). In fact, even that is fine, up to the step (14: Click “Back to datasources” and open Events tab. Add the following event:
Component: create_service; Event: Success; Action: Invoke service; Datasource: list_service.).

The difference is, I added the (list, label) items in another page. That is:
1) pg431_submitPhoto: captureButton, SubmitPhotoButton, imagePreview in
2) pg530_MyPhotos: listItems and label and Imagelist

So in step 14 above, in page (pg431_submitPhoto), when I choose (create_service) service with event (success), I cannot find the datasource (list_service), as I added this service in page (pg530_MyPhotos).

Similarly, when I go to pg530_MyPhotos, I cannot find the service (create_service) as it's created in pg430_submitPhoto.

The reason I added service (list_service) in pg530_MyPhotos, is when I try to add to pg431_submitPhoto, I could not map it to the items that locate in pg530_MyPhotos.

Your help is deeply appreciated!

The following snapshots clarify the design and data tabs for both pages

Image

Image

Image

Image

Image


How to invoke a service from another page

Posted: Fri Sep 12, 2014 12:16 pm
by Evgene Karachevtsev

Hawk,

Do you really need to call list service which is on another page? You won't see the result of its execution anyway. Maybe it is better to make navigate to the page and on show of this page invoke the service?


How to invoke a service from another page

Posted: Mon Apr 13, 2015 3:55 pm
by Joe Sharples

I'm looking to invoke a service from another page.
how would I do this?
or is it just easier to create an identical service on the current page?


How to invoke a service from another page

Posted: Mon Apr 13, 2015 6:20 pm
by Illya Stepanov

Hi Joe -

Yes, it is better to create new service on the current page with appropriate mapping for it.


How to invoke a service from another page

Posted: Mon Apr 13, 2015 7:23 pm
by Joe Sharples

thanks