Öffnen klassischer Notes-Dokumente aus einer XPage

Anbei eine Möglichkeit zum öffnen eines beliebigen Notes-Dokumentes per Url aus einer XPage heraus.
Man erstellt einfach ein Steuerelement vom Typ Link und berechnet den Linktyp:

Hier der Code zur Berechnung des Linktyps:

var strServer:String = "";
var strRepID:String = "";
var strUNID:String = "";

var ns:NotesSession = session;

// Zielanwendung holen
var ndb:NotesDatabase = session.getDatabase(database.getServer(),);

// Server für Url ermitteln
var nn:NotesName = ns.createName(ndb.getServer());
strServer = nn.getCommon();

// Rep-ID für Url ermittlen
strRepID = ndb.getReplicaID();

// UNID für Url ermitteln
var nv:NotesView = ndb.getView();
var nd:NotesDocument = nv.getDocumentByKey(key, true);

if (nd == null){
	strUNID = ""
}else{
	strUNID = nd.getUniversalID();
}

return("Notes://" + strServer + "/" + strRepID + "/0/" + strUNID);

Update:
Zu diesem Thema gibt es auch einen wiki-Artikel:  http://www-10.lotus.com/ldd/ddwiki.nsf/dx/xpages-compute-urls-in-viewpanel.htm

Advertisements

XPages Forum ist online

Die IBM hat ein neues Forum für XPages-Entwickler veröffentlicht.

Features:

  • XPages design – An updated user interface using Domino 8.5 XPages design elements.
  • Sticky posts – Forum moderators can highlight posts by having them „stick“ to the top of the All Documents and Main Topic views.
  • Edit posts – The author of a post can edit his or her own posts.
  • Mark as Answered – The author of a main post can mark it as answered. It will be marked with a green check mark on the post and in the Answered column of the views. You can see a list of all answered topics in the Answered Topics view and subscribe to the All Answered Topics RSS feed.
  • Tag cloud and author cloud – Posts can now be tagged with results showing in the tag cloud. Author contributions are also shown in a cloud, highlighting the top contributors.
  • RSS feeds – RSS feed subscriptions are available for all new posts (including main topics and replies), new main topics only, answered topics, and individual topics.
  • Resource links – Central resource for commonly used links.
  • Unread marks – Unread posts and responses are distinguished in the browser.