org.apache.wicket.velocity
Class VelocityJavaScriptContributor
java.lang.Object
org.apache.wicket.behavior.Behavior
org.apache.wicket.velocity.VelocityContributor
org.apache.wicket.velocity.VelocityJavaScriptContributor
- All Implemented Interfaces:
- java.io.Serializable, IClusterable, IComponentAwareEventSink, IComponentAwareHeaderContributor
public class VelocityJavaScriptContributor
- extends VelocityContributor
A derivation of VelocityContributor that uses
IHeaderResponse.renderJavaScript(CharSequence, String)
- See Also:
- Serialized Form
Constructor Summary |
VelocityJavaScriptContributor(java.lang.Class<?> clazz,
java.lang.String templatePath,
IModel<? extends java.util.Map<?,?>> model,
java.lang.String id)
Use this constructor if you have configured Velocity to use a ClasspathResourceLoader. |
VelocityJavaScriptContributor(java.lang.String templatePath,
IModel<? extends java.util.Map<?,?>> model,
java.lang.String id)
Use this constructor when Velocity is configured with the FileResourceLoader . |
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 |
VelocityJavaScriptContributor
public VelocityJavaScriptContributor(java.lang.Class<?> clazz,
java.lang.String templatePath,
IModel<? extends java.util.Map<?,?>> model,
java.lang.String id)
- Use this constructor if you have configured Velocity to use a ClasspathResourceLoader. The
templatePath will then be relative to the package for clazz
- Parameters:
clazz
- templatePath
- model
- id
-
VelocityJavaScriptContributor
public VelocityJavaScriptContributor(java.lang.String templatePath,
IModel<? extends java.util.Map<?,?>> model,
java.lang.String id)
- Use this constructor when Velocity is configured with the
FileResourceLoader
.
templatePath with then be relative to the loader path configured in velocity.properties
- Parameters:
templatePath
- model
- id
-
renderHead
public void renderHead(Component component,
IHeaderResponse response)
- Render to the web response whatever the component wants to contribute to the head section.
- Specified by:
renderHead
in interface IComponentAwareHeaderContributor
- Overrides:
renderHead
in class VelocityContributor
- Parameters:
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 object
Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.