netui-data:message Tag

<netui-data:message> Tag

This tag provides a message schema, which can be parameterized to construct customizable messages.

Syntax

<netui-data:message
    resultId="string_result"
    value="expression_value" />

Description

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

resultIdThe id of the resulting string.
 
RequiredSupports runtime expression evaluationData bindable
YesNoNo

valueA {pageContext...} or {request...} databinding expression.
 
RequiredSupports runtime expression evaluationData bindable
YesNoYes

Sample

The <netui-data:message> tag 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.

Code Sample

[BEA_HOME]/weblogic81/samples/workshop/SamplesApp/WebApp/tagSamples/netui_databinding/message/index.jsp

Related Topics

<netui-data:message> Tag Sample

<netui-data:messageArg> Tag

How Do I: Customize Message Formats in Page Flows?