org.springframework.extensions.webscripts
Class MessageMethod

java.lang.Object
  extended by org.springframework.extensions.webscripts.AbstractMessageHelper
      extended by org.springframework.extensions.webscripts.MessageMethod
All Implemented Interfaces:
freemarker.template.TemplateMethodModel, freemarker.template.TemplateMethodModelEx, freemarker.template.TemplateModel

public final class MessageMethod
extends AbstractMessageHelper
implements freemarker.template.TemplateMethodModelEx

Author:
Kevin Roast Custom FreeMarker method for returning an I18N message string.

Returns an I18N message resolved for the current locale and specified message ID.

Firstly the service resource for the parent WebScript will be used for the lookup, followed by the global webscripts.properties resource bundle.

Usage: message(String id)


Field Summary
 
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
 
Constructor Summary
MessageMethod(WebScript webscript)
          Constructor
 
Method Summary
 Object exec(List args)
           
 
Methods inherited from class org.springframework.extensions.webscripts.AbstractMessageHelper
resolveMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageMethod

public MessageMethod(WebScript webscript)
Constructor

Parameters:
webscript -
Method Detail

exec

public Object exec(List args)
            throws freemarker.template.TemplateModelException
Specified by:
exec in interface freemarker.template.TemplateMethodModel
Throws:
freemarker.template.TemplateModelException
See Also:
TemplateMethodModel.exec(java.util.List)


Copyright © 2009 SpringSource, Inc. All Rights Reserved.