Reputation: 1
In forms, there is a 'name' field which upon clicking opens address book names through which I can select the list of users. I want to do the same thing through custom control but not getting how to achieve it as there is no option of 'name' field in Custom controls.
Upvotes: 0
Views: 54
Reputation: 30970
Use the Name Picker <xe:namePicker ...>
from Extension Library with data provider "dominoNABNamePicker". It is part of Notes 9.
This is a simple example how to use it:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view
xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xe="http://www.ibm.com/xsp/coreex">
<xp:inputText
id="inputText1"
value="#{sessionScope.name}">
</xp:inputText>
<xe:namePicker
id="namePicker1"
for="inputText1">
<xe:this.dataProvider>
<xe:dominoNABNamePicker></xe:dominoNABNamePicker>
</xe:this.dataProvider>
</xe:namePicker>
</xp:view>
You can find more examples including multiselection or typeahead in XPages Extension Library Demo database in Domino_Pickers.xsp. You can find the demo database in download package on OpenNTF.
Upvotes: 2