|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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(java.lang.String templateName,
IModel<? extends java.util.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 java.lang.CharSequence |
evaluate()
Evaluate the template. |
java.lang.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(java.lang.String encoding)
|
Methods inherited from class org.apache.wicket.behavior.Behavior |
---|
afterRender, beforeRender, bind, 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(java.lang.String templateName, IModel<? extends java.util.Map<?,?>> model)
Packages
for this.
templateName
- model
- Method Detail |
---|
public void detach(Component c)
detach
in class Behavior
c
- the component that initiates the detachment of this behaviorpublic java.lang.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(java.lang.String encoding)
encoding
- The encodingprotected boolean escapeHtml()
protected final java.lang.CharSequence evaluate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |