Every repository with this icon (
Every repository with this icon (
Visualization
Introduction
The use of a template engine in inputEx first appeared for the Autocompleter, InPlaceEdit and Uneditable fields.
It has also proven very useful in projects that use inputEx.
The library itself doesn’t include a template engine, but provides a standard way to use different engines and define your templates within field configurations. It is also very simple to add interfaces to other template engines.
Rendering
The fields should use the inputEx.renderVisu method to use templates:
Templating methods are stored in the inputEx.visus object. Methods can return either a HTMLElement or a String, since inputEx.renderVisu handle both.
inputEx.visus contains 3 default methods (you can add your own) :
- dump: uses YAHOO.lang.dump to generate a string from any object
- trimpath: use Trimpath JST template engine (requires lib/trimpath-template-v.v.v.js)
- func: any function, useful for building interactive templates, cannot be described in json
inputEx.Visus methods are functions that take 2 parameters :
- options: template object passed to Object containing the “visuType” property and template specific parameters
- data: the data sent to the template
Examples
Check the following examples to see template usage:






