Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
When you need users to pick a certain kind of property, such as an e-mail address, you won’t want to present users with a person’s street address or fax number. Limit the picker’s displayed properties to show just those items you want the users to select from. Figure 17-5’s picker has been limited to e-mail selection.
Figure 17-5 The people picker’s displayed properties allows you to choose which properties to present to users (in this case, e-mail only).
To make this happen, choose the displayed properties by submitting an array of property types to the controller. Set the picker’s displayedProperties property. Recipe 17-4 offers two picking options, one for e-mail, the other for phone numbers. Although these examples use a single property for the properties array, you can choose to display any number of properties.