| java.lang.Object com.opensymphony.webwork.components.Component com.opensymphony.webwork.components.Text
Text | public class Text extends Component implements Param.UnnamedParametric(Code) | |
Render a I18n text message.
The message must be in a resource bundle
with the same name as the action that it is associated with. In practice
this means that you should create a properties file in the same package
as your Java class with the same name as your class, but with .properties
extension.
If the named message is not found, then the body of the tag will be used as default message.
If no body is used, then the name of the message will be used.
- name* (String) - the i18n message key
Example:
Accessing messages from a given bundle (the i18n Shop example bundle in the first example) and using bundle defined through ww in the second example.
<!-- First Example -->
<ww:i18n name="webwork.action.test.i18n.Shop">
<ww:text name="main.title"/>
</ww:i18n>
<!-- Second Example -->
<ww:text name="main.title" />
<-- Third Example -->
<ww:text name="some.key" />
<-- Fourth Example -->
<a:text name="some.invalid.key" >
The Default Message That Will Be Displayed
</a:text>
author: Jason Carreira author: Patrick Lightbody author: Rene Gielen author: tm_jee version: $Revision: 2586 $ since: 2.2 See Also: Param |
setName | public void setName(String name)(Code) | | Name of resource property to fetch
|
usesBody | public boolean usesBody()(Code) | | |
Methods inherited from com.opensymphony.webwork.components.Component | public void addAllParameters(Map params)(Code)(Java Doc) public void addParameter(String key, Object value)(Code)(Java Doc) public boolean altSyntax()(Code)(Java Doc) public void copyParams(Map params)(Code)(Java Doc) protected String determineActionURL(String action, String namespace, String method, HttpServletRequest req, HttpServletResponse res, Map parameters, String scheme, boolean includeContext, boolean encodeResult, boolean escapeXml)(Code)(Java Doc) protected String determineNamespace(String namespace, OgnlValueStack stack, HttpServletRequest req)(Code)(Java Doc) public boolean end(Writer writer, String body)(Code)(Java Doc) protected boolean end(Writer writer, String body, boolean popComponentStack)(Code)(Java Doc) protected WebWorkException fieldError(String field, String errorMsg, Exception e)(Code)(Java Doc) protected Component findAncestor(Class clazz)(Code)(Java Doc) protected String findString(String expr)(Code)(Java Doc) protected String findString(String expr, String field, String errorMsg)(Code)(Java Doc) protected Object findValue(String expr)(Code)(Java Doc) protected Object findValue(String expr, String field, String errorMsg)(Code)(Java Doc) protected Object findValue(String expr, Class toType)(Code)(Java Doc) public Stack getComponentStack()(Code)(Java Doc) public String getId()(Code)(Java Doc) public Map getParameters()(Code)(Java Doc) public OgnlValueStack getStack()(Code)(Java Doc) protected void popComponentStack()(Code)(Java Doc) public void setId(String id)(Code)(Java Doc) public boolean start(Writer writer)(Code)(Java Doc) protected String toString(Throwable t)(Code)(Java Doc) public boolean usesBody()(Code)(Java Doc)
|
|
|