Dashboard > RIFE > ... > Templates > Value renderers
RIFE Log In | Sign Up   View a printable version of the current page.
Value renderers


Added by Geert Bevin, last edited by Geert Bevin on May 26, 2005
Labels: 
(None)

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:

<!--V 'RENDER:pakkage.classname'/-->

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:

<!--V 'RENDER:pakkage.classname:differentiator'/-->



Are you enjoying Confluence? Please consider purchasing it today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.1a Build:#515 May 19, 2006) - Bug/feature request - Contact Administrators