Drag 'N Drop Example
Category:Sidebar Examples
Platform:N801; N85
Description
This is a code example more than a full application. Please see the link in the "Details" section on this page to download the source code.

When installed in the Notes 8 client sidebar, this plugin allows you to drag objects from various applications over to the sidebar. For example, you can drag Notes documents from a view, file attachments on Notes documents, files from the file system, URLs from a browser, and selected text from some applications.
Details
When installed in the Notes 8 client sidebar, this plugin allows you to drag objects from various applications over to the sidebar. For example, you can drag Notes documents from a view, file attachments on Notes documents, files from the file system, URLs from a browser, and selected text from some applications. Here's a screenshot:


You can double-click entries in the sidebar table to see more information about them, right-click entries to copy them to the clipboard or delete them, and drag items off the sidebar app onto other applications that can act as a drop target (such as a Notes rich text field or a Word document).

Source code for this application can be found at com.snapps.dragndroptest_1.0.0.jar .


Known Issues
    • In the Notes 8.5 client on the Mac, if you have multiple documents selected in a standard Notes view and you drag them over to the sidebar, only the first doc will be transferred over. This works properly on the 8.5 client on Windows though. Multiple selections in PIM views (like the mail template) work properly on both platforms.
    • In the Notes 8.5 client on the Mac, HTML text dragged from a browser comes over as text, not HTML.
    • I try to do a best-guess on whether text that's dragged over is a URL link or not. If a chunk of text that's dragged over happens to begin with a valid URL it will usually be flagged as a URL when it's copied. No big deal, but just so you know.




copyright 2009, Strategic Net Applications (http://www.snapps.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Installation
To install, download the file from the URL below and then drag it from your local file system to your "My Widgets" Sidebar panel on the Lotus Notes client. If you don't have that panel visible, go to the Widget options in the Notes preferences dialog and choose the "Show Widgets Sidebar Panel" option.

Drag 'N Drop Example