public class OutputJavaScriptDirective extends AbstractDependencyExtensibilityDirective
Directive for outputting JavaScript into the FreeMarker template. This directive acts as a placeholder in
the extensibility model for other directives (such as JavaScriptDependencyDirective to use to request
resources to be included earlier in the template. This directive should typically be placed in the <head>
element of the page and the RelocateJavaScriptOutputDirective can then be used to move all JavaScript to
the end of the HTML page if required.
AbstractDependencyExtensibilityDirective.ProcessedDependency| Modifier and Type | Field and Description |
|---|---|
static String |
OUTPUT_DEPENDENCY_DIRECTIVE_ID |
static String |
OUTPUT_JS_DEPENDENCIES_DIRECTIVE_NAME |
dependencyAggregator, dependencyHandler| Constructor and Description |
|---|
OutputJavaScriptDirective(String directiveName,
org.springframework.extensions.surf.extensibility.ExtensibilityModel model) |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(freemarker.core.Environment env,
Map params,
freemarker.template.TemplateModel[] loopVars,
freemarker.template.TemplateDirectiveBody body) |
getModelObject, getRequestContext, getResourceControllerMapping, getToInsert, getUpdatedSrc, getWebFrameworkConfig, processDependency, setDependencyAggregator, setDependencyHandler, setModelObject, setRequestContext, setWebFrameworkConfigafter, before, createExtensibilityDirectiveData, getId, getModel, merge, remove, replacepublic static final String OUTPUT_DEPENDENCY_DIRECTIVE_ID
public static final String OUTPUT_JS_DEPENDENCIES_DIRECTIVE_NAME
public OutputJavaScriptDirective(String directiveName, org.springframework.extensions.surf.extensibility.ExtensibilityModel model)
public void execute(freemarker.core.Environment env,
Map params,
freemarker.template.TemplateModel[] loopVars,
freemarker.template.TemplateDirectiveBody body)
throws freemarker.template.TemplateException,
IOException
execute in interface freemarker.template.TemplateDirectiveModelexecute in class org.springframework.extensions.surf.extensibility.impl.AbstractExtensibilityDirectivefreemarker.template.TemplateExceptionIOExceptionCopyright © 2005–2016 Alfresco Software. All rights reserved.