Customizing templates

The velocity templates in JAG can be easily customized.
One of the possible ways to customize templates is by adding entity specific behaviour.
In case you need to implement some specific business logic for one specific entity (like form validation),
a check can be done on the entity name. For example:
#if (${entityBean.Name.toString()} == "My Entity")
// Specific validations for "My Entity"
#else
// Handle the default behaviour
#end
Another usefull technique is including subtemplates to keep your templates more clean.
For example:
#parse ("web/struts/form/my-form-validation.vsl")
<<Start page