Search DominoPower's 11,441 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
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


1  ·  2  ·  3  ·  Next »
Other articles you might like
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Home > Internet Technologies > HTML and CSS (15 articles)
   Using a reusable code approach to HTML select option lists
   One reader's opinion on HTML mailing
   Keep lookin' good with Cascading Style Sheets
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- 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.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login