text

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Wiki Markup
{snippet:id=javadoc|javadoc=true|url=org.apache.struts2.components.Text}

For more details on using resource bundles with Struts 2 read the localization guide.

Parameters

Wiki Markup
{snippet:id=tagattributes|javadoc=false|url=struts2-tags/text.html}

...

  1. http://java.sun.com/j2se/1.4.2/docs/api/java/text/MessageFormat.html
  2. http://java.sun.com/docs/books/tutorial/i18n/format/decimalFormat.html

If you wish to use i18n in your tag attributes

This will not work:

Code Block
xml

<s:textfield name="lastName" label="<s:text name="person.lastName"/>" ../>

Instead, you should use the getText() method that you inherit when your Action extends XWork's ActionSupport:

Code Block
xml

<s:textfield name="lastName" label="getText('person.lastName')" ../>