Next Thing
Posts: 0
Joined: Sun Sep 14, 2014 5:44 am

Adding new DB Sevice on existing template is not available/executing in child pages

Hi

I have an Page template in my app. If i do any UI related changes in the template then it gets reflected in all the pages but if I add a DB service to the template it does get added on the child pages.

IT IS A BUG!!

When I tried "Breaking Apart the template" on one of the pages or added a new page with the template then that page seems to work. However the existing pages still don't work.

Next Thing
Posts: 0
Joined: Sun Sep 14, 2014 5:44 am

Adding new DB Sevice on existing template is not available/executing in child pages

Hi Alena,

This is the generic document. Request you to go through my question again. When I am adding a new DB service on my Screen Template (this service should fire when the Panel, again on the template itself, opens). This newly added service is not available on child pages

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Adding new DB Sevice on existing template is not available/executing in child pages

As I understand you add Service after page is created, these changes won't be applied.

[quote:]Note: You also cannot edit events and services added to the screen template on the page created from the template. They will not appear on the Events or Data tabs of your page, but they will still work. You also cannot add events to the components from the template.[/quote]

Next Thing
Posts: 0
Joined: Sun Sep 14, 2014 5:44 am

Adding new DB Sevice on existing template is not available/executing in child pages

So how can I add a new DB service now on the Panel.
I have a panel on the Page template and now I want to add a new DB service that gets invoked when the panel is opened from any page

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Adding new DB Sevice on existing template is not available/executing in child pages

Hi Next,

You can use following code to invoke your service(from template) on the page based on this template:

pre

//Note you need replace "templatePageService4" with datasource name from template data tab.
templatePageService4.execute()

/pre

Regards.

Carlota
Posts: 0
Joined: Mon Aug 04, 2014 8:10 am

Adding new DB Sevice on existing template is not available/executing in child pages

Yurii
From the description on this thread I think have similar problems.

In my app (http://appery.io/app/mobile-frame?src...) I have a template handling a panel menu. If I click specific option in this menu ("Cumpleaños" in my example), I show a hidden text and two buttons. When clicking on Confirm button ("Siii!" in my example) a JS is executed, showing an alert and then executing a service called birthday_poll. Both The JS and the datasource-service mapping are defined at template level.
I Save and Test.
From any of the pages created from the Template, I open the panel menu (button on the top left corner), follow all the steps descripbed above and verify the behaviour in the console logs. What I see is
Uncaught ReferenceError: birthday_poll is not defined

How shall I proceed?
Shall I define the datasource-service mapping at template level before creating template-based pages?
Shall I define the datasource-service mapping at page level (I have several template-based pages)?

Thank you in advance!
Carlota F:

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Adding new DB Sevice on existing template is not available/executing in child pages

Hi Carlota,

Did you edit(add service) template after create page from this template?

If so - please take a look here: http://devcenter.appery.io/documentat...

Details: http://prntscr.com/4vmiyj/direct

Regards.

Return to “Issues”