All about Lotus Domino Development (AaLDD)

XML data binding

Posted in Show N Tell Thursday, XML, lotus Domino, sntt by quintessens on May 8th, 2008

According to Wikipedia refers XML data binding to the process of representing the information in an XML document as an object in computer memory. This allows applications to access the data in the XML from the object rather than using the DOM to retrieve the data from a direct representation of the XML itself.

In other words you could tie HTML tables to Notes data and navigate through it without reloading the page.

For this SNTT demo I needed:

  • a form to create Book documents with
  • a view to present the books documents as XML
  • a page on which I define an HTML table and connect the table to the XML view in order to give it content
  • (a $$ViewTemplate for the Xml view)

First step:

  • Create your Notes form with some fields. I choose Title, Author, ISBN and Price.
  • Create a set of documents with this form.

Next:

  • Create a view that presents the ‘Books’ documents as XML data.
  • On the fifth tab under ‘Web access’ d not forget to set the option ‘Treat view contents as HTML’
  • The view must start with an opener and closing tag for each document
  • For each column you define sub child elements

xml view

  • Setup a $$ViewTemplate for this View in order to be able to add a root element:

$$ViewTemplate form

Reminder: do not forget to set the content-type for this Form as HTML.

Continue:

  • Create a Form/Page that will hold the HTML Table.
  • Add the following HTML on it:

HTML for table

As you can see the Table is linked to a datasource, in this case the View books.xml. Each TD in the TBody part is linked to a datafield. In this setup the datapagesize is set to 5, meaning 5 documents at a time will be displayed.

Some extras

By giving the table an ID (xmlTBL) you can add functions to navigate through the table such as:

  • previous / next set of documents
  • first / last set of documents

navigation buttons

I bet you can imagine some much better pagination examples.

At the end your ‘bookstore’ will look like this:

how the local bookstore looks like

I have included a working example here.

Pure CSS Data Chart

Posted in CSS, Show N Tell Thursday, lotus Domino, sntt by quintessens on May 2nd, 2008

Okej, one day too late for SNTT, but some people are also allowed to post SNTT’s already on Wednesdays it seems…

Alen Grakalic wrote a nice article about using pure CSS as data charts. Basically via CSS Alen presents pure data in a graphical way.

Here is how it could look like:

css chart

(almost weekend? or those pills do work?!)

The screen capture is information from a Domino View embedded on a page and transformed with some CSS. Nice? I guess this is a very cheap way of creating more dashboard alike solutions…

Anyway, for those who are curious here is a downloadable working example. Have a nice weekend!

Tagged with:

Testing Notes 8 - Where to test for?

Posted in 1 by quintessens on April 22nd, 2008

We have plans for upgrading to Notes 8.01 and the end of may so logically I received the question to test some of the applications I believe are vital for us doing business.

The main question I have is ‘Where to test for ?

A quick ask-around among in my personal network did not lead to any topic to pay attention to. Most of my contacts are not up to Notes8 neither do they have that intention for the next 3 months.

Some minutes of Google-ing did also not bring many answers which sounds promising (no problems at all?).

Nevertheless we have set up test environment with Notes8 server and here are some results which I consider for most of mine applications (document publishing tools) quiet alarming.

Copy Selected as Table

In Notes:

copy selected as table

In a Browser:

copy selected as table (WEB)

Where did the icons go ???

A copied table from the web

In Notes:

copied table from the web

In a Browser:

Somewhere a center alignment is added which can not be allocated in the Notes client…

I also discovered that the merging of columns and rows in a table give nasty, unexpected (and unwanted) results.

So I am wondering what problems / questions other people are experiencing in Notes8? Thanks in advance!

Introduction Dojo Toolkit & IBM Lotus Domino

Posted in AJAX, Dojo, JavaScript, lotus Domino by quintessens on April 21st, 2008

Currently I am collecting all sorts of information about implementing the DOJO Toolkit in Lotus Domino applications. Basically for preparing myself for a upcoming project to ‘pimp’ an existing web-application using this JS Framework.

Untill now I have been only working with Prototype and Scriptaculous (which I like a lot) but since IBM’s horizon also shines more and more Dojo I am really curious in DOJO’s capabilities. Especially since documentation seems to be getting better and better.

I have found a good presentation about implementing the Dojo Toolkit in Lotus Domino applications on Slideshare. You can find the presentation here.

Introduction Dojo Toolkit & IBM Lotus Domino - presentation

It seems that more and more Notes related people find the time and effort in uploading their presentations on this site, which is ofcourse a very good thing! (HINT)

Tagged with: ,

Perfect pagination style using CSS

Posted in JavaScript, LotusScript, lotus Domino by quintessens on April 20th, 2008

One of the blogs I often read is the one from Antonio Lupetti who is a Web developer, not a Notes developer. Especially his article about pagination caught my attention since it remembered me about the idea to rewrite Bob Obringers ‘ultimate view navigator’.

Bob uses in his approach for the pagination a table to display the page numbers where a list should be more suitable.

As the image below shows with Antonio’s approach it is pretty easy to make the pagination more compatible with examples seen on other well known sites. Here is a Flickr alike pagination for a Domino view:

Flickr alike domino view pagination

Anything new under the sun? Not really, but for the ‘purists’ under us more esthetic solution.

Ofcourse a working example can be found here.

How I got started with Lotus Notes

Posted in lotus notes by quintessens on April 14th, 2008

Some minutes before a meeting so I will shortly pick up the tread “How I got started with Lotus Notes”.

I started with Notes in the beginning of 1997 after doing a graduation project at one of Dupont’s factory-plants (basically I was collecting annual sales data for writing reports).

At the end everyone was really satisfied and I got the question if I would be interested in setting up their intranet site. Notes 4.5 was rolled out and already in use in other countries/plants.

I got training at IBM and it helped a lot that in those days I had to travel a lot by train so the yellow Lotus Notes book I knew soon by head.

After one year I saw an advertisement that a big company in electronics in the Netherlands where looking for people to train in LN and they offered the complete education (application development and system administration) so after 3 months I was able to call my self principle lotus notes professional in both areas.

Then after a couple of years some collegues asked me if I was interested in starting a consultancy company, basically because they needed a person with good web development skills in LN. I said yes and after some wonderful years internal relations went a bit down and I decided to start freelancing, enjoying my own responsibilities.

In 2005 I decided to take the next step by looking for working options abroad and in beginning 2006 I moved to Sweden where I am currently employed at a true IBM technology adapting company…

Mimicing the tabbed table function

Posted in @Formula, Show N Tell Thursday, development, lotus notes, sntt by quintessens on March 20th, 2008

tab1The problem with the Notes tabbed table is that you can not, by default, add an action when you click on a tab.

I created a tabbed table function in the way you probably would do it on the web (with hidding/showing divs) so a tab is just a table column with a text hotspot in it. When you click on the text a different table would be shown with an ‘active tab’ highlighted:

dialogbox

The reason for this solution is that the form is presented in a dialogbox and I have to set a parameter from which tab the user has selected a document-template (templates may be stored in different databases).

So how to fix this with a Notes tabbed table outlook?

First create images for all active tabs:

tab1 & tab2

Then sharpen your eyes (or use good photo-editor program) and select a part of the horizontal row/border that aligns the table to the width of the page (correctly described?):

This is an enlarged example:

zoomed

Now place your tabbed images in separate tables, give the table a background color and a cell image of the ‘zoomed’ example:

 table properties

On your ‘tabbed’ images you place hotspot rectangles that will do the hide/when-work. Here you can write now also the action that is not possible for a normal ‘tabbed table’:

hotspot formula

At the end the result will look something like this:

result tabbed mimic

Application support - Which tool do you use?

Posted in Applications, Sandbox, lotus notes by quintessens on March 11th, 2008

My (new) boss has great faith in me so he has made me responsible (yippie) for one of our key LN applications for communicating withing the organisation (an application for publishing documents on our intranet).

Since I am new & fresh & (still) eager in the organisation I am looking for an application that can support me in this task. Mainly the application should be able to store communication (emails), documentation (with or without attachments) and maybe a FAQ section.

No fancy stuff, please just an application for the Notes client.

My search on OpenNTF did not give me an answer in my quest. Therefor my question to you:

“which tool do you use for giving support on LN applications?”

Mail an action through Outlook

Posted in LotusScript, Show N Tell Thursday, sntt by quintessens on March 6th, 2008

Some people are just not that fortunate to have the privilige to be working with such an excellent tool as Lotus Notes is. In order to give them the option to add an action document created in a Notes application to their todo list in Outlook the code below will do the job:  

outlook

Sub Click(Source As Button)
 
 Dim ws As New NotesUIWorkspace
 Dim session As New NotesSession
 Dim db As NotesDatabase
 Dim uiddoc As NotesUIDocument
 
 Set db = session.CurrentDatabase
 Set uidoc = ws.Currentdocument
 Set doc = uidoc.document
 
 If uidoc.IsNewDoc Then
  Msgbox “This document has not been saved.” & Chr$(10) & Chr$(10) & “Please save prior to mailing this action!”, 4112, “New Document”
  Exit Sub
 End If
 
 Const Formula$ = { @DbLookup(”"; “”; “$People”; AssignedTo; “Email”) }
 Dim namesList As Variant
 
 Set myOlApp = CreateObject(”Outlook.Application”)
 Set myNameSpace = myOlApp.GetNameSpace(”MAPI”)
 Set myFolder = myNameSpace.GetDefaultFolder(13)
 Set myItem = myOlApp.CreateItem(3)
 
 Dim rtItem As NotesRichTextItem
 Set rtItem = doc.GetFirstItem(”Comment1″)
 
 With myItem
  .Assign
  namesList = Evaluate(Formula$, doc)
  Forall names In namesList
   Set myRecipients = .Recipients.Add(names) 
  End Forall
  .Subject = doc.Subject(0)
  .Body = “Action number: ” & doc.ActionNumber(0) & Chr$(10) & Chr$(10) & rtItem.text
  If (doc.NoDueDate(0)=”") Then 
   .DueDate = doc.DueDate(0) 
  End If
  .Importance = doc.Priority(0)
  .Status = doc.Status(0)
  .Categories = doc.Category(0)
  .Display
 End With
 
 doc.OutlookSave = Date$
 
 Set myOlApp = Nothing
 Set myFolder = Nothing
 Set myItem = Nothing
 Set myRecipients = Nothing
 Exit Sub
 
End Sub

Build - Improve - Extend

Posted in development, lotus Domino, lotus notes by quintessens on March 5th, 2008

the view

Dive deep into the significant changes to development that Notes and Domino 8 brings. This seminar is guaranteed to shorten your learning curve through detailed explanations, live demos, practical examples, and working code to quickly get you up and running with ND8 development.

Copenhagen, DK April 9 - 11

I just received green light to register myself for this event. See you there? Looking forward!