Directory Services

Viewing Containers as Leaf Nodes

Any Active Directory® object can be a container of other objects. This can clutter the user interface, so it is possible to declare that a objects of a specific class be only be displayed as a leaf in the user interface. The treatAsLeaf attribute is a single-valued display specifier attribute that determines if objects of that class should be only be displayed as leaf objects. This attribute is a Boolean value that, if TRUE, indicates that objects of the class should only be displayed as leaf elements. If FALSE, indicates that objects of the class can be displayed as a container or a leaf. Like all display specifier attributes, the treatAsLeaf attribute is set on a per-locale basis, so this attribute can be localized as needed. For example, the User-Display for the English locale (0409) display specifier has the treatAsLeaf attribute set to TRUE by default. This causes the user interface to display all User objects as leaf objects.

To set the value of the treatAsLeaf attribute

  1. Bind to the desired display attribute in the desired locale. An example of how to do this is shown in BindToDisplaySpecifiersContainerByLocale function in the DisplaySpecifiers Container topic.
  2. Use the IADs::Put method to set the treatAsLeaf attribute to either TRUE or FALSE.
  3. To commit changes to the directory, call IADs::SetInfo.