Name
<fmt:param>
Synopsis
See
the java.text.MessageFormat documentation for
details about the choice type.
Syntax 1: Without a body
<fmt:param value="parameterValue" />Syntax 2: With a body
<fmt:param>
parameterValue
</fmt:param>Attributes
|
Attribute name |
Java type |
Dynamic value accepted |
Description |
|---|---|---|---|
value |
Object |
Yes |
The parameter value |
Example
<fmt:message key="result">
<fmt:param value="${result.total}" />
<fmt:param value="${result.percentage}" />
</fmt:message>The <fmt:param> action is used as a nested
action for <fmt:message> to supply a
parameter value for a parameterized message.
The parameter syntax that can be used in the parameterized message is
the syntax accepted by the java.text.MessageFormat
class, i.e., a 0-based order number optionally followed by a data
type name and a format specification, within curly brackets:
{orderNumber [, dataType [, format ]]}The data type must be one of time,
date, number, or
choice.
For a time or date type, the
format specification can be one of short,
medium, long,
full, or the type of customized pattern described
for <fmt:formatDate>.
For a number type, the format specification can be
currency, percent,
integer, or the type of customized pattern
described for <fmt:formatNumber>.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access