Locates all organizations where a user has the specified role.

Class Name




Required Input Parameters


The ID of the user to be queried.


Supplies a relative role that the user is assigned.

Output Parameters


Holds the organizations returned from the query in a java.util.Collection object.

Open Parameters


Rendered when no items are returned from the query.


Rendered when an error occurs and the TargetPrincipals servlet bean is unable to perform the query.


Rendered when organizations are returned from the query.

Usage Notes

TargetPrincipals locates all organizations where a specific user has a relative role. Based on the search results, additional content is rendered by the open parameters you specify.

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


In this example, TargetPrincipals searches the UserDirectory for all organizations where the active user holds the role of admin. If no organizations are returned or an error occurs, text displays reporting this circumstance. Otherwise, a collection of organizations displays.

<dsp:droplet name="/atg/userdirectory/droplet/TargetPrincipals">
   <dsp:param name="userId" beanvalue="/atg/userprofiling/Profile.id"/>
   <dsp:param name="roleName" value="admin"/>

   <dsp:oparam name="empty">
      The user does not have that role in any organization.

   <dsp:oparam name="error">
      Cannot perform query. Try again later.

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

         <dsp:oparam name="output">
            <dsp:valueof param="element.name"/>


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices