Mindoo Blog - Cutting edge technologies - About Java, Lotus Notes and iPhone

  • LS10/EC10 session sample #1: Notes Bookmark tools

    Karsten Lehmann  30 January 2010 15:43:12
    This is the first sample that we developed for our Lotusphere session about the Java APIs of Lotus Notes 8.5.1. And it's already the first one that we did not  actually show at Lotusphere, because we ran out of session time in our rehearsals and felt the need to reduce the amount of live demos.

    The sample plugin is called "com.mindoo.bookmarktools". It adds two actions to the Open List of Lotus Notes:

    Image:LS10/EC10 session sample #1: Notes Bookmark tools

    Locate on workspace
    This action uses the methods NotesUIWorkspace.addDatabase(NotesDatabaseData) of the new UI API, but instead of adding databases to the client's workspace, it actually only leverages the fact that addDatabase selects already existing databases and opens the right workspace tab.
    As you may know, we are the developers of the MindPlan application (mindmapping and project management based on Lotus Notes). That's why my Open List looks like this when I'm searching for the keyword "mindplan" in my bookmarks:

    Image:LS10/EC10 session sample #1: Notes Bookmark tools

    Sometimes you want to know where a specific database is located on your workspace. One way is to open the database in the client and then switch to the workspace, where in most cases the right database chicklet is selected. That takes a lot of time in case the database needs to be loaded from a server. And sometimes opening the database does not really help to find it on the workspace, for example if the database opens a frameset that displays a view of your mail database. In that case, it's the mail database that is selected on the workspace, not the database with the frameset.

    This new action helps in this case.

    Open as workspace

    The second action "Open as workspace" is something that you might know from older Notes Clients, e.g. from version R7. You could right click on a bookmark and select "Open as workspace". This would open a new tab that displays the bookmark folder content as chicklets like this:

    Image:LS10/EC10 session sample #1: Notes Bookmark tools

    Well, although this feature has not been officially implemented in the 8.x Standard Client (the was some discussion whether it should return in 8.5.2, but IBM decided to keep it out of the Standard Client), there is a way to open the workspace view for a bookmark folder.

    Actually, it's pretty simple:
    You may know that the Notes URL "notes:///ClientBookmark?OpenWorkspace" opens the normal workspace tab.
    All you have to do is add a query parameter "id" to that URL: "notes:///ClientBookmark?OpenWorkspace&id=0". That ID is the internal bookmark folder id. The id 0 tells the workspace viewpart to display the first level of your open list (e.g. with your mail, calendar and a chicklet to start Domino Designer).
    I haven't found out so far where the other id's come from (just checked the design of the bookmark.nsf, but it's no obvious ID of the folders design elements). But by using some internal Notes functions, we are able to grab the folder id when you right click on an Open List entry and launch the corresponding Notes URL.

    So, what to do with this second action? I don't know. :-)
    My first thought was to use this special Notes URL in a Composite Application, something like my personal start page for the Notes Client. You can for example use the Notes Document Container to display this URL and send URL changes to the "SetNotesDocumentURL" action to switch between several workspace folders. In my first tests, quickly changing this URL did not appear very stable (the client crashed) and I did not look into this any further.

    Anyway, here are the source code for this sample and an update site for the installation (please refer to this article if you don't know how to install from an update site).
    Comments

    1Brian O’Gorman  01.02.2010 10:58:27  LS10 session sample #1: Notes Bookmark tools

    Sweeeet!

    I think I'm going to love the "Locate on Workspace" action!

    2Robert  01.02.2010 17:25:52  LS10 session sample #1: Notes Bookmark tools

    Slick, how do you think these things up :-)

    • Remember me