text - Computed Field

Displays a value.

Category

Core Controls

Syntax

<xp:text attributes>content</xp:text>
Table 1. Essential properties
Property Description
id Defaults to computedField1, computedField2, and so on.
value Binds the computed field to a data element or other value.
Table 2. All properties
Category Properties
accessibility role, title
basics attrs, binding, dir, escape, for, htmlFilter, id, lang, loaded, rendered, rendererType, tagName
data converter, value
format contentType
styling disableTheme, outerStyleClass, style, styleClass, themeId

Usage

At run time, the value of the computed field appears on the page.

Examples

This Computed Field control displays the sum of two scoped variables:
<xp:text escape="true" id="computedField1"
	value="#{javascript:return requestScope.number1 + requestScope.number2}">
	<xp:this.converter>
		<xp:convertNumber type="number"></xp:convertNumber>
	</xp:this.converter>
</xp:text>
This Computed Field control displays the value of a data element bound to the current XPage.
<xp:text escape="true" id="computedField4" value="#{document1.subject}"></xp:text>