Searches for all users assigned to an organization.

Class Name

atg.userdirectory.droplet.UserListDroplet

Component

atg/userdirectory/droplet/UserList

Required Input Parameters

organizationId

The organization that contains the users to locate.

Optional Input Parameters

excludedId

Holds a user ID string that should be removed from the result set.

Output Parameters

users

Contains users of the specified organization in a java.util.Collection.

Open Parameters

empty

Rendered when no items are returned from the query.

error

Rendered when an invalid organization ID or no Organizational ID is provided.

output

Rendered when items are returned from the query.

Usage Notes

UserListDroplet returns all users assigned to a particular organization. The input parameter excludedId lets you exclude a user from the search. Based on the search results, additional content is rendered by the specified open parameters.

Be sure to set the userDirectory property to the relevant User Directory component.

Example

The following example shows how UserListDroplet locates all users assigned to the org212 organization, skipping user 80314. Descriptive text is provided when no items are returned or an error occurs. Users that are found for the organization are displayed in a list.

<dsp:droplet name="/atg/userdirectory/droplet/UserList">
   <dsp:param name="organizationId" value="org212"/>
   <dsp:param name="excludedId" value="80314"/>

   <dsp:oparam name="empty">
      That organization doesn't have any users assigned to it.
   </dsp:oparam>

   <dsp:oparam name="error">
      Error: try your search again. Make sure you are using a valid organizational
      ID.
   </dsp:oparam>

   <dsp:oparam name="output">
      <dsp:droplet name="/atg/dynamo/droplet/ForEach">
         <dsp:param name="array" param="users"/>

         <dsp:oparam name="output">
            The following users are part of the organization:
            <dsp:valueof param="element.lastName"/>,
            <dsp:valueof param="element.firstName"/>
         </dsp:oparam>
      </dsp:droplet>

</dsp:droplet>