LockHolders (NotesView - JavaScript)

Read-only. The names of the holders of a lock.

Defined in

NotesView

Syntax

getLockHolders() : java.util.Vector

Usage

If the view is locked, the vector contains the names of the lock holders. The view can be locked by one or more users or groups.

If the view is not locked, the vector contains one element whose value is an empty string ("").

Examples

This button locks a view.
database.setDesignLockingEnabled(true);
var v:NotesView = database.getView("main");
try {
	if (v.lockProvisional()) {
		requestScope.status = v.getName() + " locked";
	} else {
		requestScope.status = v.getName() + " not locked";
	}
} catch(e) {
	requestScope.status = v.getName() + " not locked";
}
var lh:java.util.Vector = v.getLockHolders();
requestScope.status += "\n" +
(lh.isEmpty() ? "No lock holder" : "\Current lock holder: " + lh.firstElement());
database.setDesignLockingEnabled(false);