Hosea Kambonde
Hosea Kambonde

Reputation: 301

Open new database in tab from xpages

Im trying to open a database from my server javascript in xpages, but cant seem to get it right

  var session:NotesSession;
  //var session = getSession();
  agentContext:NotesAgentContext = session.getAgentContext();

  // (Your code goes here) 
  db:NotesDatabase = session.getDatabase("", "names.nsf");
  if (!db.isOpen()){
    System.out.println("names2.nsf does not exist on snapper");
  } else{
    System.out.println("Title of names2.nsf: \"" + db.getTitle()+ "\"") ;
  }

Please advice, i want when this function is called, a new tabe in notes with that database opens up

Upvotes: 0

Views: 849

Answers (1)

Tode
Tode

Reputation: 12060

Build a notes://server/names2.nsf?open url and open it with the method you prefer (window.open, or whatever)... This will open a new Tab with the database you want and the start- parameters of the database. Just replace "server" with the right servername.

That way you can even mix classic development and xpages in one database, by just using db.nsf/NameOfClassicFrameset?Openframeset to override the start- parameters of the database...

Upvotes: 3

Related Questions