Getting the most from the Notes Java UI API’s

If you are doing any plugin development for Lotus Notes then you need to check out the OpenNTF project Java UI API Exerciser. The project is a pretty good reference and usage of the Java API’s we will be talking about at Lotusphere. The tool can also be used to inspect documents, views, etc and the different properties each of them have in the Eclipse world.

9 thoughts on “Getting the most from the Notes Java UI API’s

  1. Cool stuff.

    You have figured out a way for a sidebar app to refresh the active view have you? The only thing I’ve come up with is send keys which is a real pain, and too unreliable for real world use.

  2. Pingback: Bob Balfe: Getting the most from the Notes Java UI API’s

  3. Hi Carl, no there is no API to refresh the view yet. I actually would not be something that is too hard to do, however we didn’t get to it in 8.5.2. It will be something we can consider for the future.

  4. Adding NotesUIView.refresh() to the UI API is a good idea.
    But there is a way to solve this in 8.5.1/8.5.2:
    Put “NotesUIWorkspace.ViewRefresh” in a LotusScript agent and call it with the UI API function NotesUIWorkspace.runAgent.

    (Documentation link:,, boolean) )

  5. The fun begins when you create that agent on the fly in the Eclipse plugin via a DXL import into the temporary clipboard database :-).
    Tried that today for a demo, works like a charme.

  6. altough a while ago..
    I stumbled over the same problem..
    So in case you want to refresh a view, this might help:

    use case: users want to drag’n’drop emails from their Inbox to a Eclipse Plugin. When CTRL is being pressed, the documents has to be MOVED (copied and then removed from inbox).

    After the copy function, i used this code to refresh the view:

    //first, get the current UI View
    NotesUIWorkspace nw = new NotesUIWorkspace();
    NotesUIView vw = (NotesUIView) nw.getCurrentElement();

    //then retrieve it’s data
    String viewName = vw.getViewData().getName();
    String repid = vw.getViewData().getDatabaseData().getReplicaId();
    String server = vw.getViewData().getDatabaseData().getServer();

    //Calling the UTIL method to get the view from the view pool (do not forget to recycle at the end!)
    View vwBackend = ViewUtil.getView(server, repid, viewName);

    //now open the refreshed view again.. it won’t open a new window, since the view is already open 🙂
    String url = vw.getUrl();

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.