| java.lang.Object org.apache.wicket.behavior.AbstractBehavior org.apache.wicket.velocity.VelocityContributor
All known Subclasses: org.apache.wicket.velocity.VelocityJavascriptContributor,
VelocityContributor | public class VelocityContributor extends AbstractBehavior implements IHeaderContributor(Code) | | An IHeaderContributor implementation that renders a velocity template and
writes it to the response. The template is loaded via Velocity's resource
loading mechanism, as defined in your velocity.properties. If you do not have
a velocity.properties for your app, it will default to a directory
"templates" in the root of your app.
|
Constructor Summary | |
public | VelocityContributor(String templateName, IModel model) Ctor for VelocityContributor
The templateName needs to have the full path relative to where the
resource loader starts looking. |
VelocityContributor | public VelocityContributor(String templateName, IModel model)(Code) | | Ctor for VelocityContributor
The templateName needs to have the full path relative to where the
resource loader starts looking. For example, if there is a template next
to this class in the package called foo.vm, and you have configured the
ClassPathResourceLoader, template name will then be
"wicket/contrib/util/resource/foo.vm". Wicket provides a nice utility
wicket.util.lang.Packages for this.
Parameters: templateName - Parameters: model - |
escapeHtml | protected boolean escapeHtml()(Code) | | whether to escape HTML characters. The default value is false |
evaluate | final protected CharSequence evaluate()(Code) | | Evaluate the template.
The avaluated template |
setEncoding | public void setEncoding(String encoding)(Code) | | Parameters: encoding - The encoding |
|
|