Breadcrumbs using JQuery

Bob Balfe asked some time ago who is using JQuery for their Domino development projects. I hoped it was gonna rain with examples of implementation of JQuery plugins in Lotus Notes but so far it remains a bit quiet. So why not describe an example myself?

Figure: Screenshot from the website.

xBreadcrumbs is a nice plugin to JQuery to provide horizontal navigation. It uses an unordered list (UL) as source so when you provide that data dynamically with Notes data it becomes interesting.

In my case the customer wanted to have breadcrumbs on top of documents that are stored in a Notes view. Documents are categorized in a parent-response hierarchy so for each document I have to calculate the complete path from the opened document to its uber-parent (some points on that u) aka as ‘Home’.

Figure: Document location in Notes view.

Figure: Document location in breadcrumb.


Download the zip file, extract it and upload the files in your Notes application.

Create a subform that you will embed on the form of your document. Add the following code to the subform:

<script type=”text/javascript” src=”../jquery-1.3.2.min.js”></script>
<script type=”text/javascript” src=”../breadcrumbs/js/xbreadcrumbs.js”></script>
<link rel=”stylesheet” href=”../breadcrumbs/css/xbreadcrumbs.css” />

<script type=”text/javascript”>
$(‘#breadcrumbs-2’).xBreadcrumbs({ collapsible: true });

<style type=”text/css”>
.xbreadcrumbs {
background:#FFF none repeat scroll 0 0;
.xbreadcrumbs LI {
border-right: none;
background: url(../img/frmwrk/breadcrumb/separator.gif) no-repeat right center;
padding-right: 15px;
.xbreadcrumbs LI.current { background: none; }
.xbreadcrumbs LI UL LI { background: none; }
.xbreadcrumbs LI A.home {
background: url(../img/frmwrk/breadcrumb/home.gif) no-repeat left center;
padding-left: 20px;
/*  Custom styles for breadcrums (#breadcrumbs-3)  */
.xbreadcrumbs#breadcrumbs-3 {
background: none;
.xbreadcrumbs#breadcrumbs-3 LI A {
text-decoration: underline;
color: #0A8ECC;
.xbreadcrumbs#breadcrumbs-3 LI A:HOVER, .xbreadcrumbs#breadcrumbs-3 LI.hover A { text-decoration: none; }
.xbreadcrumbs#breadcrumbs-3 LI.current A {
color: #333333;
text-decoration: none;
.xbreadcrumbs#breadcrumbs-3 LI {
border-right: none;
background: url(../img/frmwrk/breadcrumb/separator.gif) no-repeat right center;
padding-right: 15px;
.xbreadcrumbs#breadcrumbs-3 LI.current { background: none; }
.xbreadcrumbs#breadcrumbs-3 LI UL LI { background: none; padding: 0;  }

<script src=”../$a-get-bread-crumb?OpenAgent&breadcrumb=<Computed Value>&ul&view=$v-treeview&id=myCrumb&class=xbreadcrumbs&activecrumbclass=current”></script>

The source for my unordered list is the agent $a-get-bread-crumb.

The formula for the computed value is as followed:


The agent will use the Notes view ‘$v-treeview’, find the document by its document UNID and navigates via each parent all the way up in the Notes view. While doing so the required information to build the unordered list is collected.

By the way, the code for this agent was co-written by my collegue Tomas Ekström.


In theory the breadcrumbs were displayed without any problem on the fly. However when moving into production with a database with more than 10.000 documents performance became a problem. It took about 3 seconds to collect the information and thereafter the complete document would be displayed.

Since the customer did not find such a load time acceptable BUT could no longer live without the breadcrumbs any longer I decided to place the subform instead of on top of the form to the bottom of the form and place it via CSS back on top of the document via absolute positioning.

The result is that the content of the document is displayed instantly and the breadcrumbs will follow a few seconds later. Not the nicest solution if you would ask me.

But for small websites (tested with 400 documents) the function works like a charm.

To end this post I will include the code for the agent + some script library.


ULTreeFromView script

class CGI script


Bildr – A photo sharing project

Bildr is a prototype application that never received enough funding to become a full blown (internal) Notes template. The idea is to offer a place where teams can share high resolution images.

Bild is  the Swedish word for photo and Bildr refers ofcourse to Flickr.

Another reason why I stopped prototyping the database is that I started looking at XPages and the limitations I experience with pre-XPages development. To shorten it: it takes just too many design elements to build it in the old-fashioned way to be able to offer a Web 2.5 experience. Maybe after a long break I will move the idea behind the application into an XPages based solution.

For now you can download the application and use it as a start for your development project.

What’s in it?

1. Easy import and thumbnailing of images (Notes client)

Open any of the Picture views and select the New Upload button.


The idea is that you can upload multiple images at once in a new or an existing category. You can add tags and a description to the to be created document(s). New uploads you may want to appear in the ImageFlow gallery in the startpage and you can enable commenting and read restrictions.


When you select the Upload Images action button you can select the pictures you want to upload. The code behind this function is taken from the NSFTools site (I guess). After uploading you can select to include more images or just leave it as it is.

Behind the scenes each picture is included in a Notes document with also a mid-size image and a thumbnail:


For the Notes client that is just it. Nothing more exciting here except some gaps in the completeness of the functionality (hey, I was talking about a prototype).

2. Presentation (Browser)

For the way of presenting different elements I guess I was so bold to use Jake Howlet’s DomBlog Template (for search, calendar, commenting, RSS etc.) which was for a long time a learning application for many Domino developer. I guess if you compare the layout with that of LinkedIn you will see some comparison.


3. Tagcloud (Browser)

For the Tagcloud I got some help.


4. ImageFlow Gallery


5. Lightbox

I guess Lightbox alike functions are almost unthinkable when looking at high resolution images so this I also included when clicking on a mid-size or thumbnail image:


What is it not?

You can not call this app a production ready application. Some things are not in place (like cleaning up categories and corresponding image documents). However it can be a nice starting point for a mature application. Untill now I experienced little or none errors so please give it a try and send me the end result of you modification.

Steal with pride and improve! (11 MB)

UI Example LN application

Even though Notes 8.5.1 can be expected soon reality learns us however that a lot of users are still on versions 7 or even 6. Ofcourse you could use the limitations in the UI as an argument to force them to upgrade to newer versions of Notes, but then still a lot would run the basic client, not the standard one, so nice looking Java Views are still a long way to go.

I wrote before something about UI’s in Lotus Notes but now I was thinking about adding an example so those who are interested can test it and give feedback or use it for their projects. Whatever.

Here is the link to the download. Below you can find some snapshots of the UI:

Notes View used as horizontal menu
Notes View used as horizontal menu
Collapsible Vertical Menus
Collapsible Vertical Menus
Vertical Menu placed in preview pane
Vertical Menu placed in preview pane
Preview on bottom by default
Preview on bottom by default
Option to switch place for preview pane
Option to switch place for preview pane
Form example 1
Form example 1
Form example 2
Form example 2
Form example 3
Form example 3
Form example 4
Form example 4

Well hopefully one day we have a “CSS Zen Garden” equivalent somewhere one OpenNTF where people can post good UI examples. Further may we say:

with every Notes Client installation with a version of Notes 7 or older a kitten dies?

faster pussycat
faster pussycat

Pagination on a View in the Notes client

A problem with Notes Views is that when they contain a lot of documents scrolling becomes inevitable. Even when you apply categorized columns it will become necessary that users click through the Views. An option would be that you just start typing and hopefully Notes will lead you to the nearest corresponding document.

When you apply categorized views the categories are displayed vertically below each other so for travelling users with smaller screens it will become tasly to open and close the categories just to see thse categories and corresponding documents displayed in a properly in the overview.

Maybe XPages in the Notes client will bring us some relief, but we are not there yet.

So how do we cope with the issue for the time being?

On the web it is common practice to have some sort of pagination on top / below lists of documents so you can navigate through the list without the need to scroll up and down or move you mouse across the screen. The pagination can be based on number of available pages or just available short cuts (example: the first letter of an available lastname). I myself have written some articles about pagination on this blog which you may check out yourself.

So this is all about the web, I adress this article to pagination in the Notes client.

The simplest way I found is to create a list of similar shortcuts, containing javascript, and render pass thru HTML in Notes. In this example I explain how I added pagination to a list (a Notes View) of persons. The thought is to show a list of persons form which their lastname start with a certain letter. What I needed to accomplish this:

  • A Form with an Embedded View. This View should be categorized by the first letter of the lastname @LowerCase(@Trim(Tx_LastName);1). SaveOptions are set to zero ofcourse.
  • The Embedded View has the ‘Show single category option’ in use.  As formula write the name of the Field that will acts as a temporary container (Tmp_LastName).
  • Add a Field named TmpLastName on top of the Embedded View. Make it editable. As default value give it the value “a” (you could check if this value is really available or not).
  • On top of the Form add the following JavaScript and CSS code:

<script language=”Javascript”>
var entryNumber = “”;
function showTab(lastName) {
entryNumber = lastName;
document.forms[0].LastName.value = entryNumber;
entryNumber = “”;

<style type=”text/css”>
font {
font-family: “Default Sans Serif”, sans-serif;
font-style: normal;
font-weight: normal;
font-size: 8pt;
color: black;
text-decoration: none;
text-align: left;
text-indent: 1ex;
A:link {color: blue; text-decoration: none}
A:visited {color: blue; text-decoration: none}
A:active {color: blue; text-decoration: none}
A:hover {color: blue; text-decoration: none}

  • As final step you need to add a computed text just above the Embedded View. Mark the text as passthru HTML. A Value enter:

varList:=@DbColumn( “”: “NoCache” ; “” : “” ; “PersViewCategorized” ; 1 );
tmpList:=@Implode(“<a href=\”javascript:showTab(‘” + varList + “‘)\”>” + varList+ “</a>” + ” | ” );

Here we make a call to first column in the same Embedded View. Around each found category we wrap a JavaScript call which will put the value in the temporary field and finally we call the button to update the UI.

Here is a screendump that shows how it could look like:


A problem discovered

Well everything  looked shiny untill I tried to load the Form in a Frameset. When pressing on one of the links I got the message:


Some work to do IBM….

Implementing ImageFlow in a Domino app

For my ‘photogallery’ application I got a bit tired of the Smoothgallery implementation. Basically I was looking for sometime more attractive and less ‘busy’. That is when I bumped into ImageFlow a JS image gallery in a iTunes alike way (and probably more Apple software which I do not use).

Here is what it looks like in my app:

this is how it looks in my app

Some rules for implementing ImageFlow in your Domino app:

  • ImageFlow is written for PHP applications, so for each image you include the reference gets rewritten in a following format:

<img width=”400″ height=”300″ alt=”Image 4″ longdesc=”img/img1.png” src=”reflect2.php?img=img/img1.png” style=”cursor: default; display: block; left: 351.665px; height: 329.215px; width: 292.635px; top: 118.524px; visibility: visible; z-index: 18;”/>

If you look at the imageflow.packed.js package you get lost since it is packed. Dive in the imageflow.js and search for the following lines:


var src = node.getAttribute(‘src’,2);

//src =  ‘reflect’+version+’.php?img=’+src+thisObject.reflectionGET;

Change the last line into:

src =  src+thisObject.reflectionGET;


Then upload the following files to your database:

  • imageflow.css
  • imageflow.js
  • slider.png (the dot image that is used on the slider)

In the download on the ImageFlow site in the index.html you find the source how to structure your HTML. Modify the references to the images in your Notes app and you are good to go!

Happy coding =)

The Woork Handbook

One of the Blogs I like to follow is Woork by Antonio Lupetti. Antonio writes about web design and web development. His articles contain appealing tutorials and great, practical example code.

A must read for Domino developers.

Last month he has bundled his articles bout CSS, HTML, Ajax, web programming, JavaScript frameworks and other topics about web design in The Woork Handbook, which you can download for free:


The Woork Handbook
The Woork Handbook

Can we see this as a trend ‘bundled blog-articles’?

Great UI examples for LN applications (recap)

Some time ago I was asking for some examples of great UI’s for Lotus Notes applications. All this promote the upcoming roll-out of the Notes 8 client in our organization.

Too bad I did not receive so many examples but the ones I received were very helpful and food for thought.

Criteria I would like to set for a great UI is that it should look:

  • similar in both Notes 8 standard (Java) and basic configuration
  • familiar to the PIM applications
  • like a Notes 8 application

One great help was the document ‘User experience guidelines for IBM® Lotus® rich client applications and plug-ins‘ written by Mary Beth Raven. On Inside Lotus you can also download a example discussion template so you can see yourself how the new templates will look like (in your Notes 7 client).

Also Martin Vereecken wrote a usefull tip about mimicing the action buttons from Java views.

Well here is my so far so good result:

UI example
UI example

Nothing ‘spectaculair’ but going to the guidelines document and applying the rules in an application brings a lot of ‘logic’ and consistence among other applicatons to the end-user.

One guideline had my special attention:
Put actions in the Actions menu and action bar. Do not put actions in the outline unless the action is directly related to one of the views or folders.
Normally I use an outline for actions that are so general that I want to have it everywhere available (like opening a configuration profile). Therefor I added a header with tabs. One is called ‘Menu options’ where I provide a dialogs with actions that are related to certain userroles (admin, editor, reader).
I also added a ‘Using’ and ‘About’ tab in the header to push our developers to provide instructions and general information about the application. Something that is often lacking.
For the ‘menu’ or ‘outline’ I would like to use collapsible tables like in the OpenTV project on OpenNTF but that is still bugging me
Your contribution is still welcome =)