Child pages
  • Server Side Scripting

Versions Compared

Key

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


 

A component or service can have a serverside part, so logic is executed on the server, in the spec file this is configured like:

...

What can also be done (Servoy 8.0.2+) is that clientside scripting can call the server part. These function has to be defined on the $scope object, as an example: 


Code Block
languagejs
titleserverside script
$scope.mycallback = function(name,type) {
	return "something";
}

For information about documenting API functions see the documenting api functions example. For information about documenting model properties and handlers please have a look at Documenting what properties do / Documenting handlers and handler templates.

Since Servoy 8.2 you must also define these functions in a special Api category of the spec, internalApi. In prior versions define these in api section instead.

...