ClassName |
|
---|---|
Component |
|
The ViewPrincipalsDroplet
servlet bean lets you locate a user’s roles or organizations. Based on the search results, additional content is rendered by the open parameters you specify.
Be sure to set the userDirectory
property to relevant the User Directory component.
Input Parameters
userId
This required parameter identifies the user whose principals are returned.
principalType
Specifies the type of principals that should be returned. Options include organization
and role
. When this parameter is omitted, the default, organization
, is used.
Output Parameter
principals
This parameter holds the organizations returned from the query in a java.util.Collection
object.
Open Parameters
empty
This parameter is rendered when no items are returned from the query.
error
This parameter renders when an invalid user ID or no user ID is provided.
output
This parameter renders when items are returned from the query.
Example
In this example, the ViewPrincipals
servlet bean locates all organizations the current user is part of and displays them.
<dsp:droplet name="/atg/userdirectory/droplet/ViewPrincipals"> <dsp:param name="userId" bean="Profile.id"/> <dsp:param name="principalType" value="organization"/> <dsp:oparam name="output"> <dsp:droplet name="/atg/dynamo/droplet/ForEach"> <dsp:param name="array" param="principals"/> <dsp:oparam name="output"> You are part of the following organizations: <dsp:valueof param="element.name"/> </dsp:oparam> </dsp:droplet> </dsp:oparam> </dsp:droplet>