refresh (NotesView - JavaScript™)
Updates view contents to reflect any updates to the database
since the NotesView
object was created, or since
the last refresh.
Defined in
NotesViewSyntax
refresh() : void
Usage
See isAutoUpdate for automatic updates, which are not recommended.Use this method to navigate to an updated entry or get information on the updated view.
Examples
This button counts the documents in a view, adds a document to the database, then counts the documents in the view again. The count shows the increment because it is refreshed after the document is saved.var v:NotesView = database.getView("main");
requestScope.status = "Entries = " + v.getTopLevelEntryCount();
var doc:NotesDocument = database.createDocument();
doc.appendItemValue("Form", "main");
doc.appendItemValue("subject", "New document");
doc.save();
requestScope.status += "\nAdded new document";
v.refresh();
// Entry count is incremented because the view is refreshed
requestScope.status += "\nEntries = " + v.getTopLevelEntryCount();