Skip to main content
BlueMix free trial
Information Mgmt
New to Lotus
How to buy
Live demos
Technical library
Forums & community
Java™ technology
Open source
SOA and Web services
Web development
My developerWorks
About dW
Submit content

developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 4 and 5 Forum

Notes/Domino 4 and 5 Forum



RE: Opening a Frameset as default yet returning to the last used view?
Kevin Pettitt 29.Aug.02 01:27 PM a Web browser
Domino Designer -- Editor Elements 5.0.5 Windows 2000

I'm thinking there are three possibilities, all of which have problems.

First, if you can get the QueryClose event of the Database to work (the one in the Database Script under "Resources...Other" in Designer), that is the most "attractive" at first glance. The script would look like this:

****NOTE: This script DOES NOT WORK*******
Sub Queryclose(Source As Notesuidatabase, Continue As Variant)
Dim ws As New NotesUIWorkspace
Dim Session As New Notessession
Dim CurrentUIView As NotesUIView
Const Profilename$ = "UserHistory" 'this is arbitrary, change it to whatever you like,
'since its just a "name" for the profile document
Dim db As notesdatabase
Dim profile As notesdocument

Set CurrentUIView = ws.CurrentView
Set db = CurrentUIView.view.Parent
Set profile = db.GetProfileDocument ( ProfileName, Session.Username )
If Not Isempty(CurrentUIView.view.Aliases) Then 'View has an alias, so let's use that
Forall Xalias In CurrentUIView.view.Aliases 'Multiple aliases (not likely) would mean using the last one
Call profile.ReplaceItemValue ( "FieldStoringViewName" , Xalias ) 'arbitrary field name
End Forall
Else 'No alias, use the regular name
Call profile.ReplaceItemValue ( "FieldStoringViewName" , CurrentUIView.View.Name )
End If
Call profile.Save ( True, False )

End Sub

The problem here is that the WS object doesn't know the "CurrentView" during the Database Queryclose, even when the view is the last thing open before it closes. Even if this could work, the other problem with this is that the event doesn't trigger until all windows of the database are closed. If a document is the last thing that was open, I don't think you can reference the view no matter how hard you try.

Second, you could put a button that users must explicitly click on in order to close the database, make this button appear as a view action, and put my code behind the button. Include additional code that sets a flag in the userprofile document - something like:

ProfileDoc.AllowClose = "Y"

You would then have to add some code to DB Queryclose that would read this flag and if it is "Y", then do nothing, or if it is "N", then stop the close with a "Continue = False" line. This code would kick in if the user tried to do an escape close, or otherwise bypass you new button. Once again if you try to close a Document as your last open window, you won't know what view was just open.

*********** My Recommendation ***************
It all comes back to having some kind of code run each time you open a view. My last suggestion, which might simply ease the pain for users by moving the delay to a more acceptable time, is to run my code in the Queryclose of the view, instead of the postopen

Opening a Frameset as default yet r... (Si Molloy 27.May.02)
. . RE: Opening a Frameset as default y... (Kevin Pettitt 28.May.02)
. . . . RE: Opening a Frameset as default y... (Si Molloy 28.May.02)
. . . . . . RE: Opening a Frameset as default y... (Kevin Pettitt 29.May.02)
. . . . . . . . RE: Opening a Frameset as default y... (Si Molloy 29.May.02)
. . . . . . . . RE: Opening a Frameset as default y... (John D 29.Aug.02)
. . . . . . . . . . RE: Opening a Frameset as default y... (Kevin Pettitt 29.Aug.02)
. . . . . . . . . . . . RE: Opening a Frameset as default y... (John D 29.Aug.02)
. . . . How about Readers? Use Notes.ini? (Mike Brown 27.Jun.03)
. . RE: Opening a Frameset as default y... (Raymond Neeves 16.Sep.02)

  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Forum use and etiquette
Native Notes Access
Web site Feedback

  Lotus Support
Lotus Support
Product support pages index
Search knowledge base (Technotes)
Search support downloads
Lotus Support RSS

IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow