Class VelocityContributor

    • Constructor Detail

      • VelocityContributor

        public VelocityContributor​(String templateName,
                                   IModel<? extends Map<String,​Object>> model)
        The templateName needs to have the full path relative to where the resource loader starts looking. For example, if there is a template next to this class in the package called foo.vm, and you have configured the ClassPathResourceLoader, template name will then be "wicket/contrib/util/resource/foo.vm". Wicket provides a nice utility Packages for this.
        templateName -
        model -
    • Method Detail

      • detach

        public void detach​(Component c)
        Allows the behavior to detach any state it has attached during request processing.
        detach in class Behavior
        c - the component that initiates the detachment of this behavior
      • 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
        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 interface
        response - Response object
      • setEncoding

        public void setEncoding​(String encoding)
        encoding - The encoding
      • escapeHtml

        protected boolean escapeHtml()
        whether to escape HTML characters. The default value is false
      • evaluate

        protected final CharSequence evaluate()
        Evaluate the template.
        The evaluated template