Email:   
Home
In This Issue
EasyPrint
Click here for the RSS feed's XML code. This is not a browser URL.
PROGRAMMING POWER
Adding response documents to your expanding and collapsing response document rows
By Andrew Stuart

In my previous article at http://www.dominopower.com/issues/issue200112/expand1201001.html I discussed how I had a new Lotus Domino application to build, for which I wanted expanding and collapsing response document rows. I wanted them in a Web browser. I wanted them without a round trip to the Domino Web server. I wanted them without hokey little blue arrows. I wanted them to be fast, and I wanted them to look cool. Finally, I wanted to provide a "show/hide all" option that would expand or collapse all rows. If you haven't already read it, you should do so before continuing on here.

For everyone else, we're going to continue with the project by getting a little more fancy. In this article, we'll add response documents to our view and prepare to selectively show or hide all the responses for any row.

More theory
Okay, we've now got the basic principles in place for hiding and displaying table rows.

In order to selectively show and hide rows, we need some sort of identifier to link the parent documents and the child documents. They have to have something in common. The ideal common identifier is the Lotus Domino parent UNID, which is the same across the parent document and the response documents. We'll use the parent UNID as the HTML ID attribute for each response document row in the table. In the parent row we'll include a call to a JavaScript function, with the parent document's UNID being passed as a parameter. The JavaScript function will do the job of hiding or showing the appropriate response document rows. Are you with me so far?

Adding response documents and preparing for selective showing and hiding
We'll now include response documents in the view and begin to set up the mechanisms for selectively showing and hiding all those responses associated with any given parent row.

In the view properties, ensure that "show response documents in a hierarchy" is on.

Clear the formula in the first column of the view. In the column properties for the first column, ensure that "Show responses only" is on. Now place the following formula in the first column:

@If(@IsResponseDoc;"<tr id=" + @Text($ref) + "><td></td><td><B>This is a response document</td><tr>" + @NewLine;"")

Add a second column to the view. In the second column add the following code:

@NewLine + "<tr colspan=2><td width=1>" +
@DocChildren("<!--";"") +
@NewLine + "<img src=\'http://www.touchdown.com.au/plus.gif\' onclick=\"ShowComments(\'" + @Text(@DocumentUniqueID) + "\')\"; border=0 alt=\'Show/Hide Comments\' >" +
@DocChildren("-->";"") + "</td>" + @NewLine + "<td>This is a main document</td>" +
@NewLine





[ Next ]

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
-- Advertisement --

AUTOMATE LOTUS NOTES USER ID MANAGEMENT
ID Manager 4.5 from HELP Software provides a new level of automaton for managing Lotus Notes IDs. ID Manager lets Lotus Notes administrators get out of the business of creating and managing user IDs. Use our ROI calculator to see how quickly ID Manager will pay for itself.

Learn more about HELP Software products
-- Advertisement --

How good are your Notes Reports?
Integra for Notes provides high value reporting and data analysis from Lotus Notes databases using Microsoft Word, Excel and PDF files.

  • Enhance traditional static reports with Excel data analysis, pivot tables, macros
  • Report from any Lotus Notes databases without changes to database design
  • Runs reports through a Lotus Notes client and a web browser
  • Enables Report scheduling or distribution by e-mail, printing or storing in a Notes database
  • Allows use of LotusScript for advanced data manipulation
Enables self service reporting capabilities to end-users.

Click For More Info.
Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
Editor's Login