Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Here is what I eventually did. I set a limit on the maximum number of address books (not great but it works) of 4 you can create as many as you want. So I created a couple of sessionScope variable that I created in the after Page Loads event on the XPage. I used this formula.</p> <pre><code>var allNABs:Array = session.getAddressBooks().iterator(); var pubNABs = new Array; var privNABs = new Array; while (allNABs.hasNext()) { var db:NotesDatabase = allNABs.next(); if (db.isPublicAddressBook()){ pubNABs.push(db.getFilePath()) } else { privNABs.push(db.getFilePath()) } db.recycle() } sessionScope.put("ssPublicNABs", pubNABs); sessionScope.put("ssPrivateNABs", privNABs); </code></pre> <p>because I use several different Name Pickers on the same page I did not want to repeat having to cycle through the Address books. Then I created 4 NamePicker controls and added 1, 2 , 3 and 4 dominoNABNamePickers providers to each of the successive controls. Then set the rendered property based on the number of public Address books so they would not blow up on me. The db name property on each of the providers is :</p> <pre><code>var server:String = @Name("[CN]",session.getCurrentDatabase().getServer()); var pubNABs:Array = sessionScope.get("ssPublicNABs"); return server + "!!" + pubNABs[0]; </code></pre> <p>where pubNABs[n] returns the correct filePath for the NAB. It works well in both Notes Client and the Web. Then to make it not blow up on a local disconnected replica I created 4 more controls and did the same thing but used the privNABs with appropriate rendered properties so that there is no conflict. Seems like the long way around and I'm sure that there is an easier way, but it works.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload