Actuate Information Console custom tags : message

message

Implements a body tag allowing the usage of a resource bundle to internationalize content in a web page. The key attribute is required, and is used to look up content in the resource bundle. The args attribute is optional, and if present, provides items to pass to a MessageFormat. The bundle tag must be used first in order to ensure that the proper bundle is loaded.

Library

i18n

Tag class

org.apache.taglibs.i18n.MessageTag

Attributes

Table 8-20 lists and describes the attributes for message.

Table 8-20  Attributes for message 
An array of arguments for use with java.text.MessageFormat when formatting the display text.

Used in

<context root>\errors\pagenotfound.jsp

Variables

Table 8-21 describes the variable for message.

Table 8-21  Variable for message 
id allows other tags or scriptlets to access the String created by this tag. If id is specified the String is not printed by this tag, just stored into the id.

Example

The following example displays a plain message using the default (first defined) bundle:

<i18n:message key="column1.header"/>

The next example displays a plain message using a specified bundle. In this example the default bundle is bundle1 because it is defined first:

<i18n:bundle baseName="com.mycorp.taglibs.i18n.i18n-test"
id="bundle1"/> <!-- the default -->
<i18n:bundle baseName="com.mycorp.taglibs.i18n.i18n-test2"
id="bundle2"/> <!-- the alternate -->
<i18n:message key="column1.header" bundle="<%= bundle2 %>" />

(c) Copyright Actuate Corporation 2011