views:

1344

answers:

2

Does anybody know a way to get the behaviour of LotusScript print in a Lotus Notes Java agent, i.e. displaying the output on the client status bar?

+1  A: 

I'm not installing Designer to find out, but I'd have a look to see what AgentBase.getAgentOutput() does for you. I believe that method and LotusScript's Print function are analogous.

From the doc:

For Notes clients, System.out and System.err output from foreground agents goes to the Java debug console, which you can access as a separate task through File - Tools - Show Java Debug Console. Background agents print to the Domino log.

To print to a browser from an agent started by the OpenAgent URL command, you must call AgentBase.getAgentOutput() to get a java.io.PrintWriter object. Print output from this object goes to browsers as well as the Notes client.

McDowell
Thanks McDowell, but I'm afraid the PrintWriter still only outputs to the debug console when running in the client.
Anders Lindahl
+1  A: 

I am not away of any way to natively print java code to the status bar.

The only way you could do it is to convert your code to java classes, create a "print" method for the class, and then activate them in LotusScript using the JavaSession object in LotusScript. Once you have activated it in LotusScript you can use the print method to assign it to a variable and then call the lotusscript "print" function.

This should help. http://www.codestore.net/help/help85_designer.nsf/b3266a3c17f9bb7085256b870069c0a9/cfcde330df8ee09e852574cf006b67a7?OpenDocument

giuliocc