Name Picker Single Example
Name:
This form uses a dojomino.dijit.form.NamePickerSingle dijit (which is an enhanced ComboBox) to provide a name picker. Behind the scenes, the NamePickerSingle dijit depends on a dojomino.data.ViewColumn datastore and a dojomino.session object.
The dojomino.session object provides information about the Domino backend, the directories it uses, and the current server and database. It also provides info about whether the backend Domino server is JSON aware or not.
The ViewColumn datastore is based upon the dojox.data.QueryReadStore, which does not really contain a datastore at all, but serves as an interface to treat backend queries as if it were a datastore. The QueryReadStore is incomplete as of 11/2 because it does not handled cached queries. In the future, it should, and then ViewColumn will inherit this capability automatically.
ViewColumn does not currently take advantage of the JSONAware parameter provided by dojomino.session. It issues all queries with a ?OutputFormat=JSON and cannot handle XML responses from the server. Code has been written which will use the JSONAware parameter to appropriately query the back-end and then convert an XML response to JSON. What still needs to be done is to write a conditional handler in ViewColumn._formatRawData. _formatRawData is a member function that takes the JSON output by Domino and converts it into a format that the ComboBox dijit expects, ala { items : [ {name : value }, {name : value }, {name : value} ] }. Once that work has been done in _formatRawData, then this name picker will suport both JSONAware and XML only servers (i.e. servers older than 7.0.2).
How to use:
Put a normal Notes field on a form. The field can be a plain field or a ComboBox. In the HTML attributes for the field use the following attributes:
dojoType=dojomino.dijit.form.NamePickerSingle
directory=
your_names.nsf
(Optional as the default will be provided by dojomino.session). In this example, we've provided the attribute to point to a fake names.nsf that has a large number of entries in it.
count=XX (Optional. The default is set to 30. This attribute controls how many entries a single query will return from Domino)
peopleView=
view_that_looks_up_people
(Optional. The default is set to ($VIMPeople))
groupsView=
view_that_looks_up_groups
(Optional. The default is set to ($VIMGroups))
peopleAndGroupsView=
view_that_looks_up_people_and_groups
(Optional. The default is set to ($VIMPeopleAndGroups))
lookupPeople=true|false (Optional. Default is set to true)
lookupGroups=true|false (Optional: Default is set to false)
Hint: To lookup both people and groups, simply provide the lookupGroups=true parameter, as lookupPeople is already set to true