Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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, 解決シンタックスの使用
UI ドキュメントでは、属性またはテキストノード全体にプレースホルダを指定できます。次に、メソッド呼び出しを使用して、実際のテキストによってプレースホルダを解決します。
このようなプレースホルダは、テキスト解決シンタックス {...} .

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:を使用して作成します。
使用するメソッド呼び出しの引数は、{ } (中かっこ) に入れて指定できます(役立つ引数のリストについては、「クライアントサイドコード」の「メソッド パラメータ」を参照してください)。Nexaweb では、{ } 内の引数が評価されてテキストに変換され、そのテキストが属性またはテキスト ノードのコンテンツとして設定されます。
次の例は、使用可能な引数を示します。

Code Block
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:

...

中かっこ) は特別な意味を持つため、属性またはテキストノードでこのような文字をリテラルとして指定するには、エスケープシンタックスを使用する必要があります。次の表は、属性またはテキストノードで使用するエスケープシンタックスを示します。

シンタックス
エスケープシンタックス
{
\{
}
\}
\
\\

For example, for button text to appear as: たとえば、ボタンテキストが解決値として解釈されない場合は、テキストが"{helllo}" without Nexaweb interepreting that text as a resolved value, you enter the following:

...

hello}" のように表示されます。この場合、次のように入力します。
    
<button text="\{hello\}"

...

/>    

Note: For backwards compatibility, you can turn off resolution syntax through a configuration parameter in the Nexaweb client configuration file, nexaweb: 後方互換性を維持するために、Nexaweb クライアントのコンフィギュレーションファイル、nexaweb-client.xml . To turn off resolution syntax, set the client configuration parameter as follows: <ensureで設定パラメータを使用して解決シンタックスをオフにすることができます。解決シンタックスをオフにするには、クライアントの設定パラメータ を<ensure-pre-4-dot-2-resolution-syntax- compatibility>true<compatibility>true</ensure-pre-4-dot-2-resolution-syntax- compatibility. When you set this parameter to true, Nexaweb does not interpret compatibilityに設定します。このパラメータを true に設定すると、{...} , 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.
 が解釈されなくなるため、エスケープシンタックスを使用する必要はありません。

データバインディングと解決シンタックス
属性とテキストノードの値をデータソースにバインドするには、データプラグインからの DataService 呼び出しと共に解決シンタックスを使用します。解決シンタックスによるデータバインディングは、一般的な解決シンタックスの一例に過ぎません。