PROGRAMMING OVERVIEW AND USER INTERFACE


Using Script Libraries
Script libraries can contain LotusScript, Java, or JavaScript. A script library allows you to store classes, functions, and variables for common use within an application. A script library is either a Client Library or a Server Library.

The scope of a script library is the current application. All scripts in a database can avail themselves of the LotusScript, JavaScript, or Java in a library in that database. However, the library is lost to scripts outside the database. For example, if a button in a document uses a script library and you mail the document to or paste it into another database that does not have the same script library, the script fails. If a script attempts to use a library not in the current database, the error message, "Error loading USE or USELSX module" displays.

Note In release 8.0, Domino web services were made available to applications through web service enabled script libraries. With release 8.5, web service consumers are a separate element from script libraries.

To create a script library from the Applications Navigator

1. In the Applications Navigator, expand an application name.

2. Double-click Code > Script Libraries.

3. Click one of the following buttons depending on the type of library you wish to create: New LotusScript Library, New JavaScript Library, or New Server JavaScript Library.

4. Do the following in the New LotusScript Library, New JavaScript Library, or New Server JavaScript Library dialog box:

5. Click OK.

To create a script library from the menu

1. Choose File - New - <type> Script Library. Choose one of the following types:


2. Do the following in the New LotusScript Library, New JavaScript Library, or New Server JavaScript Library dialog box: 3. Click OK.

Note For more complete information on using script libraries in Domino Designer, refer to the Lotus Domino XPages User Guide help plugin that ships with this plugin. To access this information, select Help-Help Contents from the Domino Designer menu to launch the Eclipse Help System. Plugins are accessed from the left-hand Contents panel.

See the following topics for instructions on incorporating a library:


To access an existing script library

1. From the Applications Navigator, expand Code-Script Libraries.


2. Select the script library you want to view.
See Also