public final class ApplyDecoratorDirective
extends org.apache.velocity.runtime.directive.Directive
Example use:
#applyDecorator("mydecorator" "inline title")
The body goes here.
#end
The title attribute is optional.
ParamDirective| Modifier and Type | Class and Description |
|---|---|
static class |
ApplyDecoratorDirective.DirectiveStack |
| Constructor and Description |
|---|
ApplyDecoratorDirective() |
| Modifier and Type | Method and Description |
|---|---|
void |
addParameter(String paramName,
Object paramValue) |
String |
getName()
Returns the name of the directive.
|
int |
getType()
Tells velocity that this is a block-type directive.
|
void |
init(org.apache.velocity.runtime.RuntimeServices services,
org.apache.velocity.context.InternalContextAdapter adapter,
org.apache.velocity.runtime.parser.node.Node node)
The directive is initialized.
|
boolean |
render(org.apache.velocity.context.InternalContextAdapter adapter,
Writer writer,
org.apache.velocity.runtime.parser.node.Node node)
Does the actual decoration.
|
public String getName()
getName in class org.apache.velocity.runtime.directive.Directivepublic int getType()
getType in class org.apache.velocity.runtime.directive.Directivepublic void init(org.apache.velocity.runtime.RuntimeServices services,
org.apache.velocity.context.InternalContextAdapter adapter,
org.apache.velocity.runtime.parser.node.Node node)
init in class org.apache.velocity.runtime.directive.Directiveservices - Velocity runtime services.adapter - context.node - within the directive.public boolean render(org.apache.velocity.context.InternalContextAdapter adapter,
Writer writer,
org.apache.velocity.runtime.parser.node.Node node)
throws IOException,
org.apache.velocity.exception.ResourceNotFoundException,
org.apache.velocity.exception.ParseErrorException,
org.apache.velocity.exception.MethodInvocationException
render in class org.apache.velocity.runtime.directive.Directiveadapter - the context.writer - a writer instance to which to write the decorated text.node - the node within our block.IOExceptionorg.apache.velocity.exception.ResourceNotFoundExceptionorg.apache.velocity.exception.ParseErrorExceptionorg.apache.velocity.exception.MethodInvocationExceptionCopyright © 2003–2022 Atlassian. All rights reserved.