|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.behavior.AbstractBehavior
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(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.AbstractBehavior |
---|
afterRender, beforeRender, bind, cleanup, detachModel, exception, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onException, onRendered, rendered |
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)
IBehavior
detach
in interface IBehavior
detach
in class AbstractBehavior
c
- the component that initiates the detachment of this behaviorAbstractBehavior.detach(org.apache.wicket.Component)
public String getEncoding()
public void renderHead(IHeaderResponse response)
IHeaderContributor
renderHead
in interface IHeaderContributor
renderHead
in class AbstractBehavior
response
- Response objectAbstractBehavior.renderHead(org.apache.wicket.markup.html.IHeaderResponse)
public 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 |