org.apache.wicket.velocity
Class VelocityJavascriptContributor
java.lang.Object
org.apache.wicket.behavior.AbstractBehavior
org.apache.wicket.velocity.VelocityContributor
org.apache.wicket.velocity.VelocityJavascriptContributor
- All Implemented Interfaces:
- Serializable, IBehavior, IComponentConfigurationBehavior, IClusterable, IHeaderContributor
public class VelocityJavascriptContributor
- extends VelocityContributor
A derivation of VelocityContributor that uses IHeaderResponse.renderJavascript(CharSequence, String)
- See Also:
- Serialized Form
Method Summary |
void |
renderHead(IHeaderResponse response)
Render to the web response whatever the component wants to contribute to the head section. |
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 |
VelocityJavascriptContributor
public VelocityJavascriptContributor(Class<?> clazz,
String templatePath,
IModel<? extends Map<?,?>> model,
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(String templatePath,
IModel<? extends Map<?,?>> model,
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(IHeaderResponse response)
- Description copied from interface:
IHeaderContributor
- Render to the web response whatever the component wants to contribute to the head section.
TODO: Post 1.3, add component parameter, so that the behaviors dont' have to track component
instances
- Specified by:
renderHead
in interface IHeaderContributor
- Overrides:
renderHead
in class VelocityContributor
- Parameters:
response
- Response object- See Also:
org.apache.wicket.velocity.VelocityContributor#renderHead(org.apache.wicket.markup.html.
IHeaderResponse)
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.