Class MessageTag

java.lang.Object
javax.servlet.jsp.tagext.TagSupport
wt.taglib.util.MessageTag
All Implemented Interfaces:
Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class MessageTag extends javax.servlet.jsp.tagext.TagSupport
JSP MessageTag retrieves a localized message from a resource bundle. The locale is calculated from the HTTP Accept-Language header and the most appropriate Windchill supported locale is used. If the language argument is supplied, the locale is calculated from this and the optional country and variant arguments.

Example:
<%@ taglib uri="http://www.windchill.com/taglib/util" prefix="util" %>
<a href="home.jsp"><util:message rb="wt.clients.util.UtilRB" key="26"/></a>


For English-US: <a href="home.jsp">Windchill Home</a>
For French-Canadian: <a href="home.jsp">Page d'accueil Windchill</a>
For German: <a href="home.jsp">Windchill Startseite</a>
Tag Attributes
rb</code required Base resource bundle containing the message.

key</code required Key associated with the requested message.

language</code optional Set language code for desired locale, which will either be the empty string or a lowercase ISO 639 code. In the absence of this argument, the Accept-Language header will be used in the retrieval of an acceptible locale.

country</code optional Set the country/region code for desired locale, which will either be the empty string or an uppercase ISO 3166 2-letter code.

variant</code optional Set the variant code for desired locale.



Supported API: true
Extendable: false
Since:
Windchill R6.0
See Also:
  • Field Summary

    Fields inherited from class javax.servlet.jsp.tagext.TagSupport

    id, pageContext

    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
  • Method Summary

    Methods inherited from class javax.servlet.jsp.tagext.TagSupport

    doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait