This reference describes the JavaScript™ language elements, Application Programming Interfaces (APIs), and other artifacts that you need to create scripts, plus the XPages simple actions.
The JavaScript™ language elements are based on the ECMAScript Language Specification Standard ECMA-262 (see http://www.ecma-international.org/publications/standards/Ecma-262.htm). The JavaScript described here applies to the server-side interpreter. Client-side scripts are interpreted by the browser.
Java™ code can be embedded directly into JavaScript™ code.
JavaScript™ statements consist of keywords and syntax.
Top-level functions are not associated with an object. In the ECMA specification, these functions are properties and methods of the global object.
@Functions emulate their counterparts in Notes®.
You can associate a variable with a data type to document your code and direct content assist.
Java™ classes can be accessed from JavaScript™ code by specifying the fully qualified name, for example, java.lang.Class or java.util.Random. The package containing the class must be available as a shared library on the server. The standard Java packages are available on all servers; other packages must be installed.
java.lang.Class
java.util.Random
User Java™ classes can be created in an application using the Domino® or Java perspective, and called in JavaScript™ by specifying the fully qualified name. The class must belong to a package (not the default package).
Java™ arrays can be embedded in the JavaScript™ code without prior declarations or inclusions. This provides the ability to create multi-dimension arrays and to pass them as parameters to Java methods included in the JavaScript code.
A JavaScript™ object (when created with new Object()) is automatically converted to a map of properties when used as an argument to a Java™ method. A map is a Java interface that provides a list of name/value pairs. For example, you should pass a map when you call an XML adapter.
Object()
JavaScript™ parameters are passed by value (JavaScript arrays and objects used as parameters are not modified by the Java™ code).
You cannot use JavaScript™ keywords in Java™ syntax even if the word is legal in Java.
A simple action performs a pre-programmed activity that can be modified by arguments.
Global objects provide entry points to server-side scripts. Entering the name of a global object instantiates it.
Represents a document in XML Document Object Model format.
This library provides access to the HCL Domino® back-end.
The Runtime library contains classes that provide useful methods for globalization.
The Standard library contains classes for manipulating data of different types and performing common operations.
The XSP library contains classes that access the browser context.