PROGRAMMING DOMINO FOR WEB APPLICATIONS
Agents cannot run in a browser. They can be activated from a browser but run on the Domino server containing the agent.
Setting up a Web agent
Using the Agent Properties box, do the following:
You can activate agents from a browser in two ways:
Two form events work for Web processing:
Note The SaveOptions field must be an existing field, the value of which the Web agent changes to "0". If the Web agent creates this field, the document will be saved regardless of the value.
LotusScript and Java in Web agents
A Web agent can be written in LotusScript or Java, as well as formula or simple actions.
An agent is the only context in which a Web application can use LotusScript. Anything that runs in the browser, such as an action, hotspot action, hotspot button, or event, cannot contain LotusScript. LotusScript agents activated from the Web cannot use any of the classes NotesTimer, NotesUIDatabase, NotesUIDocument, NotesUIView, or NotesUIWorkspace.
You can write HTML to the browser by putting it in print statements. Domino accumulates print statements and creates a page with their contents after the agent runs.
To display a new page after an agent runs, put one print statement at the end of the code containing the page's URL in brackets. You can start the URL with a slash and the name of the database to designate an element in the current database.
In Java, you must get a PrintWriter object with AgentBase.getAgentOutput and use this object to write to the browser.
The available context depends on how the agent is started:
Example See Also