ang .
Posts: 0
Joined: Thu Jan 09, 2014 3:13 am

Custom component unable to invoke database service

I have a custom component, with a panel containing 3 buttons.
On button click, I would like to invoke database service which will query database.
But when I click it, the browser console gives me the error "nameofservice is not undefined"

Is there restriction that custom component cannot invoke service?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Custom component unable to invoke database service

Hi,

This should work. Please check other actions, for example run JS:prealert("test event");/pre

ang .
Posts: 0
Joined: Thu Jan 09, 2014 3:13 am

Custom component unable to invoke database service

Hi,

run javascript is running fine.
only fail on invoke database service.

I found that the service is not defined as other database service
code
/*
* Nonvisual components
*/
var datasources = [];

Code: Select all

 getGames = new Appery.DataSource(WarehouseDB_GameList_list_service, { 
     'onComplete': function(jqXHR, textStatus) { 

         $t.refreshScreenFormElements("Home"); 
     }, 
     'onSuccess': function(data) {}, 
     'onError': function(jqXHR, textStatus, errorThrown) {}, 
     'responseMapping': [{ 
         'PATH': ['$'], 
         'ID': 'listitem_games', 
         'SET': [{ 

etc etc....
/code

ang .
Posts: 0
Joined: Thu Jan 09, 2014 3:13 am

Custom component unable to invoke database service

Hi,

Anyway, I have workaround by defining the service myself, inspired by your thread here: https://getsatisfaction.com/apperyio/...

You may close this issue now.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Custom component unable to invoke database service

Thank you for the update!

Return to “Issues”