org.apache.tiles.freemarker.renderer
Class FreeMarkerAttributeRenderer
java.lang.Object
org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer
org.apache.tiles.freemarker.renderer.FreeMarkerAttributeRenderer
- All Implemented Interfaces:
- TilesApplicationContextAware, TilesRequestContextFactoryAware, AttributeEvaluatorFactoryAware, AttributeRenderer
public class FreeMarkerAttributeRenderer
- extends AbstractBaseAttributeRenderer
FreeMarker renderer for rendering FreeMarker templates as Tiles attributes.
It is only usable under a Servlet environment, because it uses
TilesFreemarkerServlet internally to forward the request.
To initialize it correctly, call setParameter(String, String) for all the
parameters that you want to set, and then call commit().
- Since:
- 2.2.0
- Version:
- $Rev: 799259 $ $Date: 2009-07-30 15:37:16 +0200 (gio, 30 lug 2009) $
|
Method Summary |
void |
commit()
Commits the parameters and makes this renderer ready for the use. |
void |
setParameter(String key,
String value)
Sets a parameter for the internal servlet. |
void |
write(Object value,
Attribute attribute,
TilesRequestContext request)
Implement this method knowing that the attribute won't be null and it
will be authorized. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FreeMarkerAttributeRenderer
public FreeMarkerAttributeRenderer()
setParameter
public void setParameter(String key,
String value)
- Sets a parameter for the internal servlet.
- Parameters:
key - The name of the parameter.value - The value of the parameter.- Since:
- 2.2.0
commit
public void commit()
- Commits the parameters and makes this renderer ready for the use.
- Since:
- 2.2.0
write
public void write(Object value,
Attribute attribute,
TilesRequestContext request)
throws IOException
- Implement this method knowing that the attribute won't be null and it
will be authorized.
- Specified by:
write in class AbstractBaseAttributeRenderer
- Parameters:
value - The value of the attribute to be rendered.attribute - The attribute to render.request - The Tiles request object.
- Throws:
IOException - If something goes wrong during rendition.
Copyright © 2001-2009 Apache Software Foundation. All Rights Reserved.