Hi,
I wonder whether it is possible to open a browser window from a Java agent? I couldn’t find any Java class exposing a function which allows that, so I tried this:
Vector res = session.evaluate(“@URLOpen("http://www.google.de")”);
dbgMsg("URLOpen result: " + res.firstElement());
The result is “1.0” ^^ Not sure, does that mean “true” as in “successfully executed the formula”? Anyway, no browser window is opened on my system with that URL.
Any ideas?
Thanks!
/Matt
Subject: RE: Opening a URL from a Java agent
Hi,
thanks for the hint, but I’m still stuck. The only potentially helpful post in the
search results is this one: http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/298d1a
229a60614c8525708f0055a049?OpenDocument
but, I have two questions about it:
- What’s with that database URL? Was that just an example? Because, replacing it
with the URL I actually want to open does nothing, no browser window pops up.
- What’s with that URL>] notation? Why does he enclose the URL in brackets?
Last but not least, I’d still like to know why my approach, which seems at lot cleaner
and straight forward to me, does not work. I mean, if there is a function which evaluates
formulas, it should be usable right?
Thanks,
Matt
Subject: RE: Opening a URL from a Java agent
This may take a little bit of forcing to send home once and for all, but there is NO interaction between Java and the UI in Notes 7.whatever client. It doesn’t matter whether you are talking about native Java classes or formula evaluation – UI stuff cannot happen. You can evaluate formulas that do not interact with the UI, but @Commands (which are all UI) and @Functions that do stuff in the UI are verboten.
Square brackets have a couple of special meaning in Domino. One is when it encloses HTML markup – a “[” followed immediately by a “<” (no spaces, not other characters) marks the beginning of passthru HTML. It’s an R4.5/R4.6 construct, but it still works, and can be used in places where the passthru HTML text style can’t be used (like in view column formulas).
The second meaning is when square brackets are used to enclose a URL and printed to a browser, where it functions as a redirection URL. Web agents and web form $$Return fields use this construct to point the browser to a new location.
Subject: RE: Opening a URL from a Java agent
I see, this of course a bit of a letdown. Okay, thanks for clearing that up.