Resolution syntax

In UI documents, you can specify placeholders for entire attributes or text nodes and then use method calls to resolve the placeholders with actual text.

You create these placeholders using text resolution syntax, {...}.

You can specify any method call argument you want between the {  } (curly brackets). (See Method Parameters (under Key Concepts > Client-side Code) for a list of useful arguments.) Nexaweb evaluates the argument inside the { }, turns into text, and sets that text as the content of the attribute or text node.

The following examples show possible arguments that you can use:

text="{ XPathService.evaluateAsString( '/button/text()' ) }
text="{ mco:myMco.getValue() }"
text="{ myTextbox.text }"

<textView>{ myTextbox.text }</textView>

Escape Syntax:

Because {  } (curly brackets) now have special meaning, you must use an escape syntax to specify these characters as literals in an attribute or text node. The following table shows the escape syntax to use in an attribute or text node:

SyntaxEscape Syntax
{\{
}

\}

\\\

For example, for button text to appear as: "{helllo}" without Nexaweb interepreting that text as a resolved value, you enter the following:

<button text="\{hello\}" />

Note: For backwards compatibility, you can turn off resolution syntax through a configuration parameter in the Nexaweb client configuration file, nexaweb-client.xml. To turn off resolution syntax, set the client configuration parameter as follows: <ensure-pre-4-dot-2-resolution-syntax-compatibility>true</ensure-pre-4-dot-2-resolution-syntax-compatibility. When you set this parameter to true, Nexaweb does not interpret {...}, and you do not need to use escape syntax.

Data Binding and Resolution Syntax

To bind attribute and text node values to data sources, use the resolution syntax along with DataService calls from the data plugin. Data binding with the resolution syntax is simply a single case of the generic resolution syntax.