org.springframework.extensions.webscripts
Class ScriptUrlMethod

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

public final class ScriptUrlMethod
extends Object
implements freemarker.template.TemplateMethodModelEx

Custom FreeMarker Template language method.

Render script url independent of script hosting environment e.g. render inside / outside portal.

Usage: scripturl(String url)

Author:
davidc

Field Summary
 
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
 
Constructor Summary
ScriptUrlMethod(WebScriptRequest req, WebScriptResponse res)
          Construct
 
Method Summary
 Object exec(List args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptUrlMethod

public ScriptUrlMethod(WebScriptRequest req,
                       WebScriptResponse res)
Construct

Parameters:
basePath - base path used to construct absolute url
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.