Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

How to invoke a service from another page

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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

How to invoke a service from another page

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?

Joe Sharples
Posts: 0
Joined: Mon Aug 18, 2014 1:31 pm

How to invoke a service from another page

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?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

How to invoke a service from another page

Hi Joe -

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

Return to “Issues”