SText

Introduction
The sText component displays the value of a target attribute of a record as a literal on the canvas.

The first thing an sText component checks when it gets created is to determine what has been defined for its  variable. If something has been defined, the control tries to find a bound attribute within that text. If a bound(s) attribute(s) has been defined within the value of the, but that no value for this attribute has been found in the target record description, the sText removes itself from the application layout.

If the  variable is null/empty, or if no bound attributes have been defined in the text of the component, the system checks if   have been specified. If no such  have been defined, the sText component removes itself from the application layout.

Bound Attribute
If a sText is defined in a MXML file, developers can directly bind a record's description attributes to it (instead of using the  parameter). A special markup has been introduced in the Semantic Component Library to give the possibility to bind an attribute value to a particular semantic control, directly in MXML.

The markup that has been introduced are double brackets with the name of the attribute to bind in the middle, such as:

"foaf_name"

For the sText Semantic Component, variables can be bound within the  property of the sText component. A bound variable can be the only value of the  property, or it can be part of a complete string.

Here is an example of an attribute bound to a sText component that is used without any other character:

Now here is an example of a bound attribute to a sText component which is part of a string of characters:

MXML Usage Examples
In this example, we assume that the  variable is a , where the record description is defined, accessible at the creation time of the sText.

Related Libraries
No related external libraries.