Focus on a doc when changing views, without Navigator

Navigator includes a built-in function that lets you move from one view to another, and stay on the same document if both views include the document. But what if you can't use Navigator in your design? The application I have been working on previously used Navigator. However, Navigator can't be read by screen-reader software (for blind people), and we must change our application to comply with a new corporate accessibility policy. It's also rumored that Lotus may not continue to support Navigator in the future.

Each view should have a first hidden column that is sorted. The column value can be a particular field value plus the document's UNID (shown in sample code below) or anything that is unique. Note: if your views show response documents (like what we have, and what I show below, which is for views containing response documents), you can only go to or keep the focus on the top-level document. If you have flat views, you can go to any document.

Code: First hidden column value formula (ShortName is a field on every one of our top level/non-response document; the view must be sorted on this first column):

@If(!@IsResponseDoc; ShortName 
+ @Text(@DocumentUniqueID); "")

In QueryOpen event of each view, we set the current view name to an environment variable:


In PostOpen event of each view, we get the current view name and the key of the top-level document we were on in the previous view from environment variables, and then we move our focus to this top-level document (specifying the view name save the application from opening up a new window):

viewName; key; "")

In QueryClose event of each view, we set the current top-level document key in the environment variable so the next view can use it (TopDocUNID is a field that is on every document in our database, including the top-level document itself; the field contains the top-level document UNID that indicates which top-level document this document is under. "Main" is the form name of our top-level document. The reason I use @IsError is that if there is no document being highlighted/selected in the view, we do not get an error trying to get document properties.):

(TopDocUNID; "ShortName")); "";
  key:=@If(@IsMember("Main"; Form); 
        ShortName + @Text
 "ShortName") + 
("MyApp_CurrentViewTopDoc"; key) 

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip exchange by member Long Yu. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.

This was first published in June 2004

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.