Besides the main manipulation logic of a template, value content needs to be sometimes created that is solely presentation related. This doesn't actually have its place in elements and sometimes even creates a burden. For these purposes, we created the ValueRenderer interface with the render(Template template, String valueName, String differentiator) method. Classes that implement this interface can be specified in any template like this:
An instance of the class will be created and the render method will be called if the value hasn't been set yet. This has as side-effect that if you have several occurances of this value ID, they will all have the same renderer value and the renderer will only be called once.
If you need to have different results of the same renderer, you need to use a differentiator, like this: