Frameset woes in R6 (Really need some help here)

I have been absolutely punishing myself with the task of trying to figure this one out and I haven’t, as of yet, done so.

Here’s my problem… BTW: It’s Notes Client only.

I have a frameset that contains three panes and looks like this…

Because of the way this forum posts, I had to use funky characters or else it TRIMmed all my spaces out. It looks better if you copy/paste it into notepad and replace all “_” with " ".

#############################

#navFrame#mainContentFrame#

##__________#

#name1_#Topic_related_to#

#name2_#name1,name2,etc_#

#name3_#__________________#

#name4_#__________________#

#________####################

#____#detailsFrame#

##__________#

#________#Topic_Details___#

#############################

Basically, when a user clicks a name in the navFrame (which is a notes view), the document from the navFrame is opened up in the mainContentFrame, using a different form with an embedded view, to show more details about the name1 document. If the user then clicks one of the docs in the embedded view, it opens in the detailsFrame.

This all works well, except for a couple problems.

First, I would like to automatically load the first document (from navFrame) into mainContentFrame when the user opens the frameset because currently, the mainContentFrame and detailsFrame are blank when the frameset is opened.

Second, If a user follows the expected path, they will click a name in navFrame, then click one of the docs in the embedded view in mainContentFrame, and that will show them details in detailsFrame. If the next step they take is to click a DIFFERENT name in navFrame, mainContentFrame loads properly, but detailsFrame still contains the details that were loaded in the previous step that were only relevant when name1 was clicked in navFrame.

I would REALLY appreciate any help as I’m really stuck on this.

so far, I’ve tried the postOpen event of a view, trying to use NotesUiView.SelectDocument, but it’s not the same as clicking the document I guess, so that didn’t work.

I’ve also tried to change the view open property from “go to last document” to “go to top row”. That didn’t work either.

Thanks in advance everybody.

Subject: Frameset woes in R6 (Really need some help here)

I have to say that your problems are far too complex for a out-of-the-box Notes application to handle.

The fact that you are wanting one frame to interact with another frame is telling me that you need to go to a Portal solution to do this sort of thing. Have a look at Lotus Workplace it can do this.

I had a look at a Frameset on our server to see if I could come up with a solution to your first problem (populating the mainContentFrame) when first opened. I don’t think that even this is possible. You do not have enough Computed control to do it–sorry.

Subject: RE: Frameset woes in R6 (Really need some help here)

No, but you CAN put blank pages in as default content, then populate the MainContent frame from the PostOpen of the view in the Nav frame. The QueryOpenDocument event of the view would be resposible for blanking the bottom frame when the document in the top frame is changed.

The PostOpen has the UIView as Source. You can then go to the View from the UIView, use GetFirstDocument, SetTargetFrame to “MainContent” then ws.EditDocument(doc,False) will open the first document in the view into the desired frame.

On the web, you could simply use the “ViewName/$First” reserved URL to get the first document into the frame as a default. I’ve tested $First, and it appears not to work properly in the Notes client.

Subject: Frameset woes in R6 (Really need some help here)

Hi K (?),

To auto-load a document in the details frame when a view or folder in the main frame is first opened you need some code in the postopen event (for the view/folder in main) like this:

Sub PostOpen (source As NotesUIView)

Dim ws As New NotesUIWorkspace

Dim uidb As NotesUIDatabase

Dim db As NotesDatabase

Dim doc As NotesDocument

Dim nid As String

Set uidb = ws.CurrentDatabase

Set db = uidb.Database

nid = source.CaretNoteID

Call ws.SetTargetFrame("detailsFrame")

If nid = "0" Then

	Call ws.OpenPage("NoSelect")

Else

	Set doc = db.GetDocumentByID(nid)	

	Call ws.EditDocument(False, doc)

End If

End Sub

As this code tracks the CaretNoteID rather than the first or selected document in the view, it should also ensure the details frame shows the correct document when the user switches to a different name. The code assumes you have a page called “NoSelect” that displays when the view has no documents at all.

Hope this helps you.

Regards, Ian