public class AutoComponentRegionDirective
extends org.springframework.extensions.surf.extensibility.impl.AbstractFreeMarkerDirective
CreateComponentDirective directive
prior to using the RegionDirectiveData. However, this resulted in calls to persist the Component and were ultimately unnecessary.
This solution simply requires that a new Component is created on demand and not persisted.| Modifier and Type | Field and Description |
|---|---|
static String |
DIRECTIVE_NAME
The name to reference this directive by in FreeMarker templates.
|
| Constructor and Description |
|---|
AutoComponentRegionDirective(String directiveName) |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(freemarker.core.Environment env,
Map params,
freemarker.template.TemplateModel[] loopVars,
freemarker.template.TemplateDirectiveBody body)
Creates a new
Component and sets it to use the supplied WebScript URI and is then immediately rendered |
void |
setRenderService(RenderService renderService)
Set the
RenderService required to render the Component |
void |
setRequestContext(RequestContext context)
Set the
RequestContext required for rendering the Component. |
public static final String DIRECTIVE_NAME
public AutoComponentRegionDirective(String directiveName)
public void setRequestContext(RequestContext context)
RequestContext required for rendering the Component.context - RequestContextpublic void setRenderService(RenderService renderService)
RenderService required to render the ComponentrenderService - RenderServicepublic void execute(freemarker.core.Environment env,
Map params,
freemarker.template.TemplateModel[] loopVars,
freemarker.template.TemplateDirectiveBody body)
throws freemarker.template.TemplateException,
IOException
Component and sets it to use the supplied WebScript URI and is then immediately renderedfreemarker.template.TemplateExceptionIOExceptionCopyright © 2005–2016 Alfresco Software. All rights reserved.