Child pages
  • Server Side Scripting

Versions Compared

Key

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

...

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);
}

 Private handlers which are callable only serverside can be used to implement secure complex web components; for instance a Navigation Menu component which has a collection of MenuItems custom type. When the whole menu is disabled you can use the protecting properties (see Protecting Properties at Specification (.spec file)) to block certain handlers to be triggered; however when a single MenuItem is disabled and the navigation menu is enabled meanwhile, to securely prevent the handler to be executed for the disabled MenuItem (e.g. onMenuItemClick should be executed only if the menu item is enabled), you should call a server side script which verifies the MenuItem is actually enabled and triggers the private handler from the server side script.

Logging

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:

...