Package rife.template

Interface ValueRenderer


public interface ValueRenderer
An object which can render content for a value in a template. To use a renderer in a template, the template should contain a value with an ID like "render:org.rifers.something.MyRenderer", where MyRenderer is your ValueRenderer class.

Value renderer implementations must provide a public zero-argument no-arg constructor.

Since:
1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    render(Template template, String valueId, String differentiator)
    Renders the specified value in the given template.
  • Method Details

    • render

      String render(Template template, String valueId, String differentiator)
      Renders the specified value in the given template. The value ID will be of the form "render:className" or "render:className:differentiator", where "className" is the fully qualified name of this class.
      Parameters:
      template - the template into which the returned string will be inserted
      valueId - the ID of the value in the given template whose value will be set to the returned string
      differentiator - the differentiator string passed as part of the value ID, or null if none was provided
      Returns:
      the rendered text
      Since:
      1.0