blob: 2cd4308eb354bd73425077d13d0f53dc857e4988 [file] [log] [blame]
package org.apache.tiles.autotag.velocity.test;
import java.io.IOException;
import java.io.Writer;
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 DoStuffNoBody class.
*/
public class DoStuffNoBodyDirective extends Directive {
/**
* The template model.
*/
private org.apache.tiles.autotag.template.DoStuffNoBodyTemplate model = new org.apache.tiles.autotag.template.DoStuffNoBodyTemplate();
/** {@inheritDoc} */
@Override
public String getName() {
return "tldtest_doStuffNoBody";
}
/** {@inheritDoc} */
@Override
public int getType() {
return LINE;
}
/** {@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();
model.execute(
(java.lang.Double) runtime.getParameter("one", null),
(java.lang.Float) runtime.getParameter("two", 0.0f),
(java.util.Date) runtime.getParameter("three", null),
request
);
return true;
}
}