Show TOC

Plain Text FacetLocate this document in the navigation structure

You can add a plain text facet to the header area. This type of facet is suitable if you wish to add a single field or block of text with a title, such as a description.

A plain text facet shows the label property of the UI.ReferenceFacet as the title. It also shows the value property of the DataField complex type of the FieldGroup annotation as the description.

To add a plain text facet, use the UI.HeaderFacet term and include the UI.ReferenceFacet complex type, and then reference the FieldGroup annotation.

This is displayed as shown below within the object page header:

Figure 1: Plain Text Facet in Object Header
Code Samples

The following code samples show an example of how to create your annotations for a plain text header:

UI.ReferenceFacet
<Record Type="UI.ReferenceFacet">

    <PropertyValue Property="Label" String="{@i18n>@ProductDescription}"/>

    <PropertyValue Property="Target" AnnotationPath="to_ProductTextInCurrentLang/@UI.FieldGroup#PlainText"/>

</Record> </Collection>
						

UI.FieldGroup

<Annotation Term="UI.FieldGroup" Qualifier="PlainText">

    <Record>

        <PropertyValue Property="Data">

            <Collection>

                <Record Type="UI.DataField">

                    <PropertyValue Property="Value" Path="Description"/>

                </Record>

            </Collection>

        </PropertyValue>

    </Record>

</Annotation>

UI.MultilineText

In addition, you must include a property annotation to indicate that this property contains a multiline text, as shown below:

<Annotations Target="STTA_PROD_MAN.STTA_C_MP_ProductTextType/Description">

    <Annotation Term="UI.MultiLineText"/>

</Annotations>

CDS Annotations

If desired, you can set this up using a CDS annotation, as shown below:

CDS Annotation Definition

//@Scope: #ELEMENT

multiLineText: Boolean default true;
CDS Source
@UI.multiLineText

Description: String;