Florin M.
Florin M.

Reputation: 2169

xpages access the local address book and other address book

There is an XPages application which is running both in Notes Client and on browser.

Let say I have 2 xe:namePickers:

<xe:namePicker id="namePicker1" for="djTextarea5">
    <xe:this.dataProvider>
                <xe:dominoNABNamePicker groups="false"
                            nameList="peopleByLastName" addressBookDb="names.nsf"
                            addressBookSel="db-name">
                </xe:dominoNABNamePicker>
    </xe:this.dataProvider>
</xe:namePicker>

and ( this is the Company Address Book )

<xe:namePicker id="namePicker2" for="djTextarea5">
        <xe:this.dataProvider>
                <xe:dominoNABNamePicker groups="false" nameList="peopleByLastName adressBookDb="OurServer/Company!!names.nsf"
                                        addressBookSel="db-name">
                    </xe:dominoNABNamePicker>
        </xe:this.dataProvider>
  </xe:namePicker>

If I understood correctly, the first namePicker isn't accessing the local address book for the users which accesses the application, but the names.nsf from the server.

my question: What server? Is it the (Company) names.nsf ( which lays on OurServer/Company ) ? So are there some differences between the 2 namePickers? I thought the 1st one is referring to the (each) address local book, but I guess I'm wrong.

Any explanations will be appreciated

Upvotes: 1

Views: 396

Answers (1)

Knut Herrmann
Knut Herrmann

Reputation: 30960

With addressBookDb="names.nsf" you refer to the "local" address book.

If application runs in XPiNC then "local" is user's Notes client. The "names.nsf" is then user's personal address book.

If application runs in browser then code gets executed on server and from servers perspective "lokal" is server's data directory and therefore "names.nsf" refers to companies address book on server.

With adressBookDb="OurServer/Company!!names.nsf" you refer to server's address book no matter where application is running.

Side note: there is database property in Notes 9 which causes execution of XPages on server even if they are called from XPiNC. In this case "names.nsf" would refer always to companies address book on server.

Upvotes: 1

Related Questions