WebWork 2 : Text tag
This page last changed on Dec 14, 2004 by plightbo.
<ww:text />Print out an internationalized string. It is used in conjuction with the i18n tag. The text tag gets a specific message from the bundle specified in the surrounding i18n tag. Values can be passed into the message for parsing, for instance to format a date or currency.Attributes
Sample Usages Accessing messages from a given bundle (the i18n Shop example bundle in this case)<br> <ww:i18n name="'webwork.action.test.i18n.Shop'"> <ww:text name="'main.title'"/> </ww:i18n> <ww:i18n id="foo" name="'webwork.action.test.i18n.Shop'"> <ww:text name="'main.title'"/> </ww:i18n> <ww:property value="#foo"/> Note that instead of using value0..value4, you may also: <ww:text name="'someKey'"> <ww:param value="'Hello'"/> </ww:text> OR <ww:text name="'someKey'"> <ww:param>Hello</ww:param> </ww:text> The last format is particularly good when you are embedding HTML in to the message, since you dont need to worry about escaping the various quotes that might be there. |
![]() |
Document generated by Confluence on Dec 14, 2004 16:36 |