<netui-data:message> Tag
This tag provides a message schema, which can be parameterized to
construct customizable messages.
<netui-data:message
resultId="resultId"
value="value" />
This tag provides a message schema, which can be parameterized to
construct customizable messages.
Curly-braces are used to identify argument place holders in the schema:
<%
pageContext.setAttribute("msgSkeleton", new String("Hello {0}. {1} {2}, the current date and time are {3}."));
%>
<netui-data:message value="{pageContext.msgSkeleton}" resultId="message">
Attributes |
resultId |
Required: Yes | Supports
runtime evaluation: No | Data bindable: No |
|
The id of the resulting string. |
value |
Required: Yes | Supports
runtime evaluation: Yes | Data bindable: Yes |
|
A {pageContext...} or {request...} databinding expression. |
Defines a message schema, while the
<netui-data:messageArg>
tags
provide the parameters that plug values into the schema.
In the following example, the <netui-data:message> tag
uses the value
attribute to bind to the message schema (which
was earlier added to the
javax.servlet.jsp.PageContext
object.
The two <netui-data:messageArg> tags provide the parameters to plug into the
schema.
<%
pageContext.setAttribute("msgSkeleton", new String("To read about {0}, go to {1}."));
%>
...
<netui-data:message value="{pageContext.msgSkeleton}" resultId="message">
<netui-data:messageArg value="messaging"/>
<netui-data:messageArg value="my web page"/>
</netui-data:message>
...
<netui:label value="{pageContext.message}"/>
The following message is output to the JSP page:
To read about messaging, go to my web page.