public class OutputJavaScriptDirectiveData
extends org.springframework.extensions.surf.extensibility.impl.DefaultExtensibilityDirectiveData
This directive is provided to allow nested model directives to update the model outside of the
scope that they have been used in. Specifically this has been provided as a means of allowing WebScripts
to add JavaScript into the <@{code}head> element of the HTML page. This directive
should be placed within the <head> element in the HTML page and the DefaultContentModelElement
it adds to the ExtensibilityModel will be updated through the use of the JavaScriptDependencyDirective
directive.
| Constructor and Description |
|---|
OutputJavaScriptDirectiveData(String id,
String action,
String target,
String directiveName,
Map<String,Object> params,
freemarker.template.TemplateDirectiveBody body,
freemarker.core.Environment env,
DependencyAggregator dependencyAggregator,
WebFrameworkConfigElement webFrameworkConfig) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.extensions.surf.extensibility.ContentModelElement |
createContentModelElement()
Creates and returns a
OutputCSSContentModelElement which is a type
of DeferredContentTargetModelElement. |
public OutputJavaScriptDirectiveData(String id, String action, String target, String directiveName, Map<String,Object> params, freemarker.template.TemplateDirectiveBody body, freemarker.core.Environment env, DependencyAggregator dependencyAggregator, WebFrameworkConfigElement webFrameworkConfig) throws freemarker.template.TemplateException
freemarker.template.TemplateExceptionpublic org.springframework.extensions.surf.extensibility.ContentModelElement createContentModelElement()
Creates and returns a OutputCSSContentModelElement which is a type
of DeferredContentTargetModelElement. This will be added into the ExtensibilityModel
and will allow other directives to add content to it - specifically they will be able to add
new JavaScript and CSS dependencies.
createContentModelElement in interface org.springframework.extensions.surf.extensibility.ExtensibilityDirectiveDatacreateContentModelElement in class org.springframework.extensions.surf.extensibility.impl.DefaultExtensibilityDirectiveDataCopyright © 2005–2016 Alfresco Software. All rights reserved.