Child pages
  • Server Side Scripting

Versions Compared

Key

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

...

Internal API can also be used for API that is defined on client, but can only be called from server side scripting. This API shouldn't be called from Servoy Developer scripting and won't show in code completion.

Since Servoy 8.3 server side scripting also has access to the handlers a developer has assigned in the designer through $scope.handlers. Together with the new "private:true" configuration on a handler definition in the spec file, you can make handlers that are not directly callable from the client but only through server side scripting.

Code Block
languagejs
$scope.mycallback = function(name,type) {
    // call a hanlder directly with the arguments are return the value the handler gives
	return $scope.handlers.onAction(name,type);
}

 

Inside the server side scripting file of a component/service you can log messages using "console", not application,output. The output will appear in developer's console view as well as in the application server log file (depending on configured logging levels). For example:

...