|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done.
Native to Lotus Domino. The User Experience unseen for Lotus Domino.
Do more with less. Really.
See the possibilities Docova unleashes for Lotus Domino. |
-- Advertisement --
Integrate your Notes Applications with Microsoft Office and Symphony
Integra for Notes Integrates Microsoft Office and/or IBM Lotus Symphony
Requires NO change to the design of the appliation or Installations of DLL's and EXE's
- Integra is a ready to use solution, enhance static reports with Excel data analysis, pivot tables, macros
- User friendly aproach, using a point and click access to features
- Reports from any Lotus Notes databases
- Runs reports through a Notes client, web browser and scheduled basis
- Allows use of LotusScript for advanced data manipulation
- Enables self service reporting capabilities to end-users
Learn more at www.integra4notes.com. |
|
|
|
|
|
|
|
|
|
|