Child pages
  • Online Mobile

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This allows to work with live data on the server, like foundsets with a million records

Concept

The Servoy find/search concept is extended to start with a local find and utilize a server side search.

Usage

...

Client Side

In the mobile solution you set a foundset into find mode and then add some criteria then instead of calling search() on the foundset, call remoteSearch on the mobile plugin:

...

Code Block
/**
 * @param {JSFoundSet} the foundset that was given to remoteSearch
 */
function successCallback(foundset) 
{
   if (foundset.getSize() >0) {
     // something found on the server show it in the current form
	controller.showRecords(foundset);
   }
}
/**
 * @param {Number} statusCode The http status code 
 * @param {String} message The message of the error
 * @param {JSFoundSet} foundset The foundset that was passed to remoteSearch
 */
function errorCallback(statusCode, message, foundset) 
{
	//do what ever is needed, like showing alert
}

 

Needs

...

Server Side

The plugins.mobile.remoteSearch() will call the service solutions 'offline_data' form 'ws_create()' method with the following signature:

...