public class MessageTag extends FreeMarkerTag
activeweb_messages.properties
as default
name and others, such as activeweb_messages_fr_FR.properties
in case French locale was specified.
Examples:
activeweb_messages.properties
with content:greeting=Hello!and tag code:
<@message key="greeting"/>then the output will be:
Hello!
meeting=Meeting will take place on {0} at {1}You can then specify the tag with parameters:
<@message key="meeting" param0="Wednesday" param1="2:00 PM"/>When a view template renders, the outcome will be:
Meeting will take place on Wednesday at 2:00 PM
<@message key="greeting"/>The output:
greeting
greeting=Bonjour!then this tag:
<@message key="greeting"/>will produce:
Bonjour!
<@message key="greeting" locale="de_DE"/>
LOGGER
Constructor and Description |
---|
MessageTag() |
Modifier and Type | Method and Description |
---|---|
protected void |
render(Map params,
String body,
Writer writer)
Implement this method ina concrete subclass.
|
execute, get, getAllVariables, getContextPath, getUnwrapped, getUnwrapped, logger, overrideContext, process, session, sessionObject, validateParamsPresence
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appContext, context, cookie, cookies, cookieValue, exists, format, getId, getLocale, getRequestHost, getRequestPort, getRequestProperties, getRequestProtocol, getRoute, header, headers, host, ipAddress, ipForwardedFor, isDelete, isGet, isHead, isMethod, isMultipartContent, isPost, isPut, isXhr, locale, method, param, param, params, params, params, params1st, params1st, path, port, protocol, queryString, remoteAddress, remoteHost, requestHas, servletPath, session, session, uri, url, userAgent, xhr
protected void render(Map params, String body, Writer writer) throws Exception
FreeMarkerTag
render
in class FreeMarkerTag
params
- this is a list of parameters as provided to tag in HTML.body
- body of tagwriter
- writer to write output to.Exception
- if anyCopyright © 2020 JavaLite. All rights reserved.