Examples: ViewRefresh method
- This view action refreshes the view that's currently open.
Sub Click(Source As Button) Dim workspace As New NotesUIWorkspace Call workspace.ViewRefresh End Sub
- This view action creates and saves a document in the current database.
It then refreshes the current view so that the new document displays
in the view.
Sub Click(Source As Button) Dim workspace As New NotesUIWorkspace Dim session As New NotesSession Dim db As NotesDatabase Dim doc As NotesDocument Set db = session.CurrentDatabase ' create the document and save to disk Set doc = New NotesDocument( db ) doc.Subject = "This is my new doc" doc.From = session.UserName Call doc.Save( True, True ) ' refresh current view to display the new document Call workspace.ViewRefresh End Sub
- This form action saves the current document, refreshes the view
(called "Main"), and closes the document.
Sub Click(Source As Button) ' Declare all variables Dim workspace As New NotesUIWorkspace Dim session As New NotesSession Dim uidoc As NotesUIDocument Dim view As NotesView Dim db As NotesDatabase 'Set all variables Set uidoc = workspace.CurrentDocument Set db = session.CurrentDatabase Set view = db.GetView( "Main" ) 'Save current document, refresh "Main" view 'and close document Call uidoc.Save Call view.Refresh Call workspace.ViewRefresh Call uidoc.Close End Sub