BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.

com.bea.wlw.netui.tags.databinding.message
Class Message

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by com.bea.wlw.netui.tags.AbstractBaseTag
              extended by com.bea.wlw.netui.tags.databinding.message.Message
All Implemented Interfaces:
HtmlConstants, Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class Message
extends AbstractBaseTag

Provides a message schema, which can be parameterized to construct customizable messages.

Attribute Descriptions
AttributeRequiredRuntime Expression EvaluationData Bindable
resultIdYesNoNo
The Id of the resulting String.
valueYesNoYes
A pageContext or request data binding expression.

See Also:
MessageArg, Serialized Form
Example:
The <netui-data:message> tag defines a message schema, while the 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
Beadoc.see:
<netui-data:message> Tag Sample, How Do I: Customize Message Formats in Page Flows?
Beadoc.tagdescription:
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">

Field Summary
static String MESSAGE_ARG_KEY
           
 
Fields inherited from class com.bea.wlw.netui.tags.AbstractBaseTag
ATTR_GENERAL, ATTR_GENERAL_EXPRESSION, ATTR_JAVASCRIPT, ATTR_STYLE, JAVASCRIPT_STATUS, NETUI_UNIQUE_CNT
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface com.bea.wlw.netui.tags.html.HtmlConstants
ACCEPT, ACCESSKEY, ACTION, ALIGN, ALINK, ALT, ANCHOR, BACKGROUND, BASE, BGCOLOR, BODY, BORDER, BR, CAPTION, CELLPADDING, CELLSPACING, CHAR, CHAROFF, CHARSET, CHECKED, CLASS, COLS, COORDS, DIR, DISABLED, DIV, ENCTYPE, FOR, FORM, FORM_GET, FORM_POST, FRAME, HEIGHT, HREF, HREFLANG, HSPACE, HTML, ID, IMAGE, INPUT, INPUT_BUTTON, INPUT_CHECKBOX, INPUT_FILE, INPUT_HIDDEN, INPUT_IMAGE, INPUT_PASSWORD, INPUT_RADIO, INPUT_RESET, INPUT_SUBMIT, INPUT_TEXT, ISMAP, LABEL, LANG, LINK, LONGDESC, MAXLENGTH, METHOD, NAME, ONBLUR, ONCHANGE, ONCLICK, ONDBLCLICK, ONFOCUS, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONLOAD, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONRESET, ONSELECT, ONSUBMIT, ONUNLOAD, OPTION, READONLY, REL, REV, ROWS, RULES, SELECT, SHAPE, SIZE, SPAN, SRC, STYLE, SUMMARY, TABINDEX, TABLE, TARGET, TD, TEXT, TEXTAREA, TITLE, TR, TYPE, USEMAP, VALIGN, VALUE, VLINK, VSPACE, WIDTH
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
Message()
           
 
Method Summary
 void addMessageArgument(Object messageArgument)
           
 int doEndTag()
           
 int doStartTag()
           
 String getResultId()
           
 String getTagName()
           
 String getValue()
           
protected  void localRelease()
          This is a method that will initialize all temp state on a tag and should be called in the doEndTag method.
 void setResultId(String resultId)
           
 void setValue(String value)
           
 
Methods inherited from class com.bea.wlw.netui.tags.AbstractBaseTag
addTagIdMapping, containsExpression, evaluateAttributeToString, evaluateExpression, filter, filter, formatErrorString, formatString, getAttribute, getErrorsReport, getExpressionEvaluator, getJavaScriptUtils, getNearestForm, getNextId, getQualifiedBundleName, getScriptReporter, getUserLocale, hasErrors, isExpression, prepForRendering, registerAttribute, registerError, registerTagError, release, removeAttribute, renderAttribute, renderAttributes, reportErrors, rewriteName, setPageContext, updateExpression, write
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setParent
 

Field Detail

MESSAGE_ARG_KEY

public static final String MESSAGE_ARG_KEY
See Also:
Constant Field Values
Constructor Detail

Message

public Message()
Method Detail

getTagName

public String getTagName()
Specified by:
getTagName in class AbstractBaseTag

setResultId

public void setResultId(String resultId)
Beadoc.attributedescription:
The id of the resulting string.
Beadoc.attributesyntaxvalue:
string_result
Beadoc.databindable:
false

getResultId

public String getResultId()

setValue

public void setValue(String value)
Beadoc.attributedescription:
A {pageContext...} or {request...} databinding expression.
Beadoc.attributesyntaxvalue:
expression_value
Beadoc.databindable:
true

getValue

public String getValue()

doStartTag

public int doStartTag()
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
Throws:
javax.servlet.jsp.JspException

addMessageArgument

public void addMessageArgument(Object messageArgument)

localRelease

protected void localRelease()
Description copied from class: AbstractBaseTag
This is a method that will initialize all temp state on a tag and should be called in the doEndTag method.

Overrides:
localRelease in class AbstractBaseTag

BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.