Tip of the day – my Copy Link Location plugin

There are some questions I get asked a lot by customers, colleagues and people I meet at conferences. One of them is why there isn’t an easy way to copy links detected in Notes documents using LiveText to the clipboard. And I must admit that it is odd. To remedy I’ve actually developed a plugin that installs into Notes 8 to add an action item to links in Notes documents. After installing the plugin an action to the Copy Link Location to the clipboard is added to all links in the Notes client.

The plugin really highlights the power of Notes, LiveText and the plugin architecture in Notes. As you will probably recall – plugins are fun!!!

Besides that a right-click context menu is also added when right-clicking Notes documents to copy the Notes link (notes://) to the clipboard. It’s all part of the same package.

To see how to install etc. head over to my Notes 8 Utils page.

I see this so much that I thought I would repost the solution

I see so many people in Lotus Notes copy/pasting addresses to calculate distances for reimbursements, claiming time etc. and wonder why they do not find an easier way. Such as using a widget in Lotus Notes. A while back I created a widget to let you simply select the destination address and then do the route calculation using Google Maps.

But is does more than that. As a route calculation needs a starting address and a destination address (and it’s hard for me to know the address you would like to use as the starting address) the widget has a component that lets you generate new widgets based on a starting address that you specify. I think it’s pretty clever. And it gets better – the component that generates the widgets is an XPage… 🙂

The post, and link to the widget, may be found in my Google Maps Widget Generator – come grab your own! post.

AbcWidget is trying to be downgraded to a lower installation scope. Reinstallation of this item will not be permitted.

When trying to update a plugin (feature) using a widget the installation failed and I got the below message.

<widget name> is trying to be downgraded to a lower installation
scope. Reinstallation of this item will not be permitted.

I wondered what it meant as I didn’t really understabd the “installation scope” thing so I asked IBM and here’s the answer I got from Doug MacDonald. Very useful and nicely explains why the installation failed.

When you install a widget, it is assign a scope. The scopes have a heirarchy.

  1. If the widget was installed from the corporate catalog using a category of widgets, the scope is catalog.push.
  2. If the widget was installed from the corporate catalog using drag and drop, the scope is user.catalog.
  3. If the widget was installed from a location other than the corporate catalog, the scope is user.import.

You cannot move down the scope hierarchy. For example:

  • Not allowed: If you install a widget from the corporate catalog using a category of widgets and then you try to drag and drop the same widget.
  • Not allowed: If you install a widget from the corporate catalog using drag and drop and then you try to drag and drop the same widget from a file on the file system.

You can move up in scope. For example:

  • Allowed: If you install a widget from the corporate catalog using drag and drop and then you install the same widget from the corporate catalog using a category of widgets.
  • Allowed: If you install a widget by drag and drop from the file system and then install the same widget from the corporate catalog using drag and drop.

Generating unique id’s for Notes widgets

If you write code to automatically generate widget descriptors (aka extension.xml) for users you have to ensure that the widget id is unique. A nice exxample of this can be found here. One caveat is that the widget id is used to distinguish the widgets hence has to be unique. To easiest way to generate a unique id in Java is to use the java.util.UUID class. Generating a unique, random, id with this class is easy.

String id = java.util.UUID.randomUUID().toString();

Google Maps Widget Generator – come grab your own!

One of the coolest and most powerful features of Notes 8 is the MyWidgets sidebar and the ability to link widgets to text selection actions and/or LiveText.

The only thorn in the side is that not all users are capable of doing their own widgets and some widgets cannot be sent to them because they contain custom data. Take a widget that generate directions for instance. Normally the starting address and you choose the destination address but since the starting address it set it makes the widget difficult to share. What to do?

The solution is of cause to generate the widget on an ad hoc basic. Meet the Google Maps Widget Generator. The widget generator works as follows.

You point your browser at the Google Maps Widget Generator. From this page you follow the short instructions and drag the extension.xml to your MyWidgets sidebar. This installs the widget into your client.

To generate a directions widget you right click the widget and choose to open it in the sidebar (it isn’t visible by default).

Now specify the title you would like to see when right clicking text in the client in the top field (e.g. Google Maps from the office) and the source address in the bottom field (e.g. 1500 Epcot Resorts Blvd, Lake Buena Vista, FL‎). Then click “Go!”

From the resulting page simply drag the extension.xml link to your MyWidgets sidebar to install the Google Maps widget.

Now your new Google Maps widget is available in your Notes client. To generate another widget click the “Generate another widget”-button and simply right click the widget header and choose “Close” to close it. You may always reopen it to generate new widgets.