public class VelocityContributor extends Behavior
Constructor and Description |
---|
VelocityContributor(String templateName,
IModel<? extends Map<?,?>> model)
The templateName needs to have the full path relative to where the resource loader starts
looking.
|
Modifier and Type | Method and Description |
---|---|
void |
detach(Component c)
Allows the behavior to detach any state it has attached during request processing.
|
protected boolean |
escapeHtml() |
protected CharSequence |
evaluate()
Evaluate the template.
|
String |
getEncoding() |
void |
renderHead(Component component,
IHeaderResponse response)
Render to the web response whatever the component wants to contribute to the head section.
|
void |
setEncoding(String encoding) |
afterRender, beforeRender, bind, canCallListenerInterface, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onEvent, onException, onRemove, unbind
public VelocityContributor(String templateName, IModel<? extends Map<?,?>> model)
Packages
for this.templateName
- model
- public void detach(Component c)
public String getEncoding()
public void renderHead(Component component, IHeaderResponse response)
renderHead
in interface IComponentAwareHeaderContributor
renderHead
in class Behavior
component
- component which is contributing to the response. This parameter is here to give
the component as the context for component-awares implementing this interfaceresponse
- Response objectpublic void setEncoding(String encoding)
encoding
- The encodingprotected boolean escapeHtml()
protected final CharSequence evaluate()
Copyright © 2006–2021 Apache Software Foundation. All rights reserved.