Guide to Applications

How to Attach Actions to Tree Elements

You can add one or more actions to elements in tree structures. It includes both the existing tree structures (for example, the hierarchy of pages in the Content perspective) and custom tree structures (you create as part of your console application).

You can add actions to Element, DataElements and DataFolderElements elements as well as ElementRoot.

Normally, attaching actions to the ElementRoot is used with auto-attached applications as the way of adding custom actions to existing elements (for example, pages). The application is auto-attached to a specific data type rather than forms a tree structure of its own. Other uses of attaching actions to ElementRoot are not normally applicable.

Please note that you should always add actions to elements within an Actions element.

<!-- parent element: start tag -->
  <Actions>
    <!-- action 1 -->
    <!-- action 2 -->
  </Actions>
<!-- parent element: end tag -->

Listing 24: Using Actions when attaching actions to elements

The Actions element can contain:

As a child element of DataElements and DataFolderElements, it can additionally contain:

The latter means that only the DataElements and DataFolderElement allow the edit and delete operations on its elements.

Logically, the actions can be divided into three major groups:

In the following few chapters, you will learn more about the actions in each of these groups.