blob: 5caf9806c4f66a189a10e8a1c474559275932457 [file] [log] [blame]
/*
* This file was automatically generated by Apache Tiles Autotag.
*/
package org.apache.tiles.autotag.velocity.test;
import java.io.IOException;
import java.io.Writer;
import org.apache.tiles.autotag.core.runtime.ModelBody;
import org.apache.tiles.autotag.core.runtime.AutotagRuntime;
import org.apache.tiles.request.Request;
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.directive.Directive;
import org.apache.velocity.runtime.parser.node.Node;
/**
* Documentation of the DoStuff class.
*/
public class DoStuffDirective extends Directive {
/**
* The template model.
*/
private org.apache.tiles.autotag.template.DoStuffTemplate model = new org.apache.tiles.autotag.template.DoStuffTemplate();
/** {@inheritDoc} */
@Override
public String getName() {
return "tldtest_doStuff";
}
/** {@inheritDoc} */
@Override
public int getType() {
return BLOCK;
}
/** {@inheritDoc} */
@Override
public boolean render(InternalContextAdapter context, Writer writer, Node node)
throws IOException {
AutotagRuntime runtime = new org.apache.tiles.autotag.velocity.test.Runtime();
if (runtime instanceof Directive) {
((Directive) runtime).render(context, writer, node);
}
Request request = runtime.createRequest();
ModelBody modelBody = runtime.createModelBody();
model.execute(
(java.lang.String) runtime.getParameter("one", null),
(java.lang.Integer) runtime.getParameter("two", 0),
(java.lang.Boolean) runtime.getParameter("three", false),
request, modelBody
);
return true;
}
}