Oracle Fusion Middleware Tag Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81455-03

# af:formatNamed4

formatNamed4 formatnamed4

This function allows a String template to be formated with four named parameters.

The functionality is a greatly reduced version of the java.text.MessageFormat class, supporting named-parameter replacement instead of index-based replacement.

The only syntax supported by this class is simple name-based replacement, namely:

    First parameter will be inserted here: {first}

Like MessageFormat, escaping using single quotes is supported and therefore, a single quote must be represented using two consecutive single quotes, but the contents of any text between single quotes will not be interpreted. So, the following pattern could be used to include a left bracket:

    some'{'text{first}

The names of the parameters can contain any characters other than single quotes and right braces. Single-quote escaping is also not permitted within keys, so the following is illegal:

    some text{fir'{'st}

<af:outputText value="#{af:formatNamed( 'First value is {first}, second value is {second}, the third is {third}, the fourth {fourth}', 'first', value0, 'second', value1, 'third', value2, 'fourth', value3)}" />

- af:formatNamed
- af:formatNamed2
- af:formatNamed3
- af:formatString

## Attributes

Name | Type | Description
--- | --- | ---

template | java.lang.String | The template pattern.
key0 | java.lang.String | The first key of the parameter to replace in the template.
value0 | java.lang.String | The value to use to replace the first parameter in the template (identified by key0's value).
key1 | java.lang.String | The second key of the parameter to replace in the template.
value1 | java.lang.String | The value to use to replace the second parameter in the template (identified by key1's value).
key2 | java.lang.String | The third key of the parameter to replace in the template.
value2 | java.lang.String | The value to use to replace the third parameter in the template (identified by key2's value).
key3 | java.lang.String | The fourth key of the parameter to replace in the template.
value3 | java.lang.String | The value to use to replace the fourth parameter in the template (identified by key3's value).