Skip to main content

Creating Composite Applications for Classic Lotus Notes Clients – Part 2

This is part 2 of my creating composite application for classic Lotus Notes clients. In part 2, I will cover how a new event in Lotus Notes 8 can used to simplify the process of creating a composite application. You can download the demo code from the sidebar or download it from here.

This new event is "onSelect" and is found in Notes View. This event works not only for regular views but also for embedded views and even embedded views within a dialog box. This event is triggered whenever a document is selected in a view. It hold true even when the view is display for the first time. As a Notes developer, I feel this one single event is more than enough reason to upgrade to at least the Lotus Notes 8 Basic client. It makes a number of UI issues simply go away.


Just like in the previous Lotus Notes clients we need to create a launch document in our composite application that will be used to trigger the population of the frames in the composite application. However, rather than using the hidden frame method that was presented in part 1, we can use the "onSelect" event to directly run our code to populate each frame in our composite application. This method has a number of key advantages over the hidden frame method. First, there is no need to create a hidden frame to launch the launching document. Second, you do not need to write code to initially populate the frames when information appears for the first time. The onSelect event occurs automatically when the view first appears regardless of whether you selected a document. By default, the onSelect event will trigger on the first document that appears in your view. As a results, you can essentially daisy chain a series of embedded views to create your composite application.


The code to populate the individual frames in the composite application is the still same but the trigger is now "onSelect." In our demo, I have combined the two triggering methods to create a composite application that would run both for the pre Notes 8 and Notes 8 clients. In the onLoad event of the launching document, I check to determine which version of the Lotus Notes client I am running. If it is Notes 7 or earlier than the onLoad event is active. If not, the onLoad event process never occurs, and we rely on the onSelect of the launching view to trigger the process.

You can extend the concept and create libraries of event triggers to populate the individual frames so that the onLoad and onSelect is triggering the same code. In our Integrated Business Framework environment we create a set of WSDL like XML to populate the individual frames, but the triggering process is the same as I have described here. Have fun and see everyone at Lotusphere. I will be at booth #533, ReCor, if you have any questions.

Comments

Anonymous said…
Richard,
Thanks for putting this together. I've used the hidden frame method before but this organizes things into a very nice framework.
This post is probably going to be overshadowed by events at lotussphere which is why I haven't seen any other comments so far, but this will be one one of the most useful blog entries for me this year.
Wayne,

Thanks for your comments. I unfortunately have been too busy working at Lotusphere to catch your comment.
Unknown said…
Richard,

I've downloaded the demo. But unfortunately one of the NSF CA_Shipping cant be opened due to encryption. It showed a message "Attempted encryption operation is not supported by this version of Notes".

Is there a way for me to retrieve five NSF in complete version?

Thanks

Popular posts from this blog

Creating Twitter Bootstrap Widgets - Part II - Let's Assemble

Creating Twitter Bootstrap Widgets - Part I - Anatomy of a Widget Creating Twitter Bootstrap Widgets - Part II - Let's Assemble Creating Twitter Bootstrap Widgets - Part IIIA - Using Dojo To Bring It Together This is two part of my five part series "Creating Twitter Bootstrap Widgets".   As I mentioned in part one of this series, Twitter Bootstrap widgets are built from a collection standard HTML elements, styled, and programmed to function as a single unit. The goal of this series is to teach you how to create a Bootstrap widget that utilizes the Bootstrap CSS and Dojo. The use of Dojo with Bootstrap is very limited with the exception of Kevin Armstrong who did an incredible job with his Dojo Bootstrap, http://dojobootstrap.com. Our example is a combo box that we are building to replace the standard Bootstrap combo box. In part one, we built a widget that looks like a combo box but did not have a drop down menu associated with it to allow the user to make a select

The iPhora Journey - Part 8 - Flow-based Programming

After my last post in this series -- way back in September 2022, several things happened that prevented any further installments. First came CollabSphere 2022 and then CollabSphere 2023, and organizing international conferences can easily consume all of one's spare time. Throughout this same time period, our product development efforts continued at full speed and are just now coming to fruition, which means it is finally time to continue our blog series. So let's get started... As developers, most of us create applications through the conscious act of programming, either procedural, as many of us old-timers grew up with, or object-oriented, which we grudgingly had to admit was better. This is true whether we are using Java, LotusScript, C++ or Rust on Domino. (By the way, does anyone remember Pascal? When I was in school, I remember being told it was the language of the future, but for some reason it didn't seem to survive past the MTV era).  But in the last decade, there a

The iPhora Journey - Part 5 - Dammit Jim, I'm a LotusScripter not a JavaScripter

As often said by Dr. McCoy in the original Star Trek series, he is a doctor, not a ____________ .  However, just like Dr. McCoy, you may sometimes need to work on things that seem very alien to your experience.  One of those things, might be JSON. LotusScript, which was derived from Visual Basic, was written long before JSON existed, and therefore, LotusScript had no built-in capabilities for handling JSON objects. As we mentioned in Part 4, JSON plays a critical role in iPhora.  All data are stored as JSON, and JSON serves as the primary data and communication format between modules, functions and services.  All core components operate using JSON-based configurations.  Therefore, it was extremely important that we are able to fluidity create, read and process JSON.   Creating a JSON string is relatively easy in any programming language. You can create it even using Commodore 64 Basic, and if built sequentially, one line at a time, it is possible to create JSON representations of ve