Method to Display view in UIworkspace?

Hey Everyone,

Is there a method to show a view or uiView in the ws?

What I have is:

' Declare used variables

Dim session As New NotesSession

Dim ws As New NotesUIWorkspace

Dim db As NotesDatabase

Dim carrierView As NotesView

Dim uiView As  NotesUIView



' Set DB options

Set db = session.CurrentDatabase

Set carrierView = db.getview("(vieShipCarriers)")

Set uiView.View = carrierView

Now I need a mechanism to get that view into the workspace.

Somthing similar for a document is worskpace.editdocument

Thanks,

Shawn

Subject: method to Display view in UIworkspace?

Hi Shawn …check this out …you can take this forward

“xxx” is the view name

…

Dim ws As New NotesUIWorkspace

Dim uidb As NotesUIDatabase

Set uidb = ws.CurrentDatabase

Call uidb.OpenView(“xxxx”, , ,True)

Cheers

Siddhartha

Subject: RE: method to Display view in UIworkspace?

Siddhartha

That’s exactly what I needed.

TY

Shawn

Subject: RE: method to Display view in UIworkspace?

OK,

So that uiDB method actually opens another active window.

Is there any other method or @function that will open the view?

Thanks,

Shawn

Subject: method to Display view in UIworkspace?

You could try using the OpenDatabase method in NotesUIWorkspace. From the Lotus Domino Designer Help:

Example

Opens a database to a view that you specify.

Defined in

NotesUIWorkspace

Syntax

Call notesUIWorkspace.OpenDatabase( server$, file$, view$, key$, newInstance, temp )

Parameters

server$

String. The name of the server where the database resides.

file$

String. The path and file name of the database.

view$

String. Optional. The name of the view you want to open. If you omit this parameter, the database opens to its default view.

key$

String. Optional. Indicates to which document you want to scroll when the view is opened. The key is a value that appears in the first sorted column of view$. If you omit this parameter, no document is selected.

newInstance

Boolean. Optional. Specify True if you want the view to open in a new window, even if there’s already a window open for the database. If you specify False or omit this parameter, the new window is opened only when it’s actually needed.

temp

Boolean. Optional. Specify True if you only want the database opened on a temporary basis for browsing, without adding the database to the user’s workspace. If you specify False or omit this parameter, the database is added to the user’s workspace.

Subject: RE: method to Display view in UIworkspace?

Keil,

This would give me two instances of the same DB open.

The original one I was working in and the one I opened to access the view.

Thanks,

Shawn

Subject: RE: method to Display view in UIworkspace?

Wow, should have checked back on this earlier, but the “NewInstance” parameter allows you to specify whether you’d open the view in a new instance or the currently open one. Hope this helps somebody. Sorry I didn’t check back on this earlier Shawn. Keil.