Tuesday, February 6, 2007

Launching a Window from a View

Nathan T. Freeman and Chris Blatnick was planning on presenting an UI technique that we developed for our Integrated Business Framework products at their presentation at Lotusphere 2007 but unfortunately there was not enough time. Nathan and Chris did a great job in demonstrating the importance of UI design. So I am posting it here. Below is a description of how it works and a sample database that demos it. Link It has been tested in Notes 6, 6.5, and Notes 7. Credit to this technique should be given to Robert Burton from our development team.

Though Lotus Notes had the tab window concept way before Firefox and Microsoft IE, we dislike how it works because you can open window after window and pretty soon you might have a dozen windows open. If you open a document in a view same thing happens. The user can start losing track of their task. Instead, we wanted the user to focus on the task in hand. You could have launched it in a different frame, but screen real estate is limited especially at a resolution of 1024 x 768. So we developed this technique for opening a document, form, or frameset in a separate window. This technique also works for opening a document or form in a dialog box.

In this technique, when you double click to open a document in a view, the document will open in a new Notes window that is separate from the existing Notes tab window. How does this work? First, we create a frameset with two frames. The view is display in one frame and the other frame we display a blank form or page and we make this frame very small.

This technique utilizes the ability of a view to open a document using a different form through form formulas. What we do is place the information about the form we want to launch in the form formula of the view and store it in the Notes.ini during the double click target event of the view. This information includes the document ID and name of the form that you would like to display. The information is passed to a launching form through environment variables when you double click on the document in the view. The view opens a launching form instead using the form formula and it opens up in frame that you can make very small (I-frame Web analogy). Contained in the launching form is code to launch a dialog box or a javascript window. The onload process of the launching form reads the environment variable that you set when you double clicked on the document in the view and determines the document and form to use for display. For a javascript window we create a Notes URL from the information to launch the new window and for a dialog box we use the document ID and form to get a handle to the document and open the dialog box.

In the demo, launch the frameset and double click on the document in the view.


Chris Blatnick said...

Nice post, Richard! Nathan showed me your example at Lotusphere. Really cool! Welcome to the blogsphere...looking forward to reading more stuff from you. Cheers...Chris

Ravi said...

I have been following the similar technique of opening a notes form via the notes URL.The user will be provided with a non-modal dialog. This was working fine till 8.0.1. Since 8.5.x the width and height parameter are being ignored. As I was searching for a fix, I stumbled across your post and nathan's post.

Did you guys find the same issue?

Domino Interface said...


It works in the basic client, but you are correct it fails to control the width and height in the standard client. More troubling is that in a few standard clients which I cannot determine, it crashes the Lotus Notes Standard client. It works fine on the Basic client. The problem seem to occur on the Eclipse client.

Ravi said...

It doesn't seem to respect the width/height in basic and standard.
Regarding the crash, I had the same, and I found that it was due to the window name parameter I was generating by computation. I changed it and it works fine.

Moreover, in standard client, if you have a dialogbox to select values, the main window is collapsed.

CollabSphere 2022 Presentation: COL103 Advanced Automation and Cloud Service Integration for your Notes/Nomad Applications

Our presentation for CollabSphere 2022. Learn how to quickly add workflow automation into Notes/Nomad applications using No-code tools that ...