Oracle Fusion Middleware Tag Reference for Oracle ADF Faces
11g Release 1 (11.1.1.7.0)

E12419-09

af:formatString4

formatString4 format string4


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

The functionality is a greatly reduced version of the java.text.MessageFormat class, supporting indexed based parameter replacement.

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

First parameter will be inserted here: {0}

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{0}

The characters between the braces must be able to be parsed to a valid positive integer.

<source><af:outputText value="#{af:format4( 'The first value is {0}, second is {1}, the third {2} and the fourth {3}', firstValue, secondValue, thirdValue, fourthValue)}" /></source>

Attributes

Name Type Description
template java.lang.String The template pattern.
param0 java.lang.String The value to use to replace the first parameter in the template (designated by {0}).
param1 java.lang.String The value to use to replace the second parameter in the template (designated by {1}).
param2 java.lang.String The value to use to replace the third parameter in the template (designated by {2}).
param3 java.lang.String The value to use to replace the fourth parameter in the template (designated by {3}).