6.6 Working with Distinguished Names

The following controls provide specialized support for DNs:

This section describes the specialized support including:

6.6.1 Formatting a DN

If you have a DN value, you can display either the DN or a set of attributes related to that DN. For example, if the control displays the DN of a user entity, you could display the user entity's First Name and Last Name attributes instead. The control's that support this feature are: DNDisplay, DNLookup, MVEditor and Picklist.

You define the attributes to display in the control’s Display Expression property. This display expression resolves at runtime by replacing the attribute keys with the attribute values.

6.6.2 Controlling the Object Selector

The Object Selector dialog box provides a convenient way to allow users to search and select objects or containers. You control the Object Selector’s contents through the properties described in the following table.

Table 6-22 Properties for Defining the Object Selector Dialog Box

Property

Description

Entity key used for object lookup

This is the key to the directory abstraction layer entity whose DN you want to search for or display. This is a required field.

Entity attribute key used for object lookup

This is the key to the attribute that you want to use in the Object Selector.

When you leave this field blank, you create a general Object Selector. This means that the Object Selector displays all of the attributes of the entity (defined by the Entity key used for object lookup) whose Search and Required properties are set to true.

When you specify an attribute, the contents of the Object Selector are defined by the attribute’s DNLookup Control type property (in the directory abstraction layer).

Object selector type

paramlist: Causes the Object Selector dialog to perform an object lookup. You specify the lookup criteria via the Entity key used for object lookup and the Entity attribute key used for object lookup properties.

container: Causes the Object Selector dialog to display one or more containers for selection. The containers for searching are determined by the Search container property specified in the directory abstraction layer for the entity named in the Entity key used for object lookup property. For example, if the Entity key used for object lookup property is Group, the search container is set to %group-root% by default. If no search container is used, the search root specified during the user application install is used.

Show object selector button

If true, the Object Selector button shows up on the control. Otherwise, it does not.

DNLookup Control type definitions and Object Selector Contents

When you specify an Entity key used for object lookup and an Entity attribute key used for object lookup, the Object Selector’s are defined the attribute’s DNLookup control type definition (in the directory abstraction layer). For example, if you specified the User entity as the object lookup and the manager as the attribute. The Object Selector would allow the user to search on the First Name and Last Name attributes.

Figure 6-23 Sample Object Selector

The Object Selector uses the manager’s DNLookup control type definition, to determine the lookup criteria.The DNLookup definition for the manager entity is shown below.

Figure 6-24 Manager Attribute on User DNLookup Property Definition

You can change the attributes that are used by the Object Selector by changing the Lookup attributes. To allow other attributes in the Object Selector:

  1. Determine if the desired attribute is defined for the entity specified as the Lookup Entity. (In this example it is Manager Lookup.)

  2. If the attribute you want is available on the lookup entity, you can just add it to the Lookup Attributes. Make sure that it has the Search and Read properties set to true or they do not show in the Object Selector dialog box.

  3. If the attribute does not already exist for the Lookup Entity, you must:

    • Add the entity to the Lookup Entity. In the above example, you would add it to the Manager Lookup entity. For more information, see Section 3.2.2, Adding Attributes.

    • Add the attribute to the DNLookup definition.

    • Deploy the changed definitions. In this example, you’d redeploy the Manager-Lookup entity (if you added a new attribute to its definition) and the User entity because you changed the definition of the manager attribute).

    • Refresh the application server’s DirectoryAbstractionLayerDefinitions cache.