|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.behavior.Behavior
org.apache.wicket.velocity.VelocityContributor
public class VelocityContributor
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 | |
|---|---|
VelocityContributor(String templateName,
IModel<? extends Map<?,?>> model)
The templateName needs to have the full path relative to where the resource loader starts looking. |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class org.apache.wicket.behavior.Behavior |
|---|
afterRender, beforeRender, bind, canCallListenerInterface, canCallListenerInterface, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onEvent, onException, unbind |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VelocityContributor(String templateName,
IModel<? extends Map<?,?>> model)
Packages for this.
templateName - model - | Method Detail |
|---|
public void detach(Component c)
detach in class Behaviorc - the component that initiates the detachment of this behaviorpublic String getEncoding()
public void renderHead(Component component,
IHeaderResponse response)
renderHead in interface IComponentAwareHeaderContributorrenderHead in class Behaviorcomponent - 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||