...
The velocity parsing mechanism consists onof:
- about.vm (velocity template)
- AboutContext (spring bean responsible to put for putting variables in into the template and generate the output)
- New Classpath velocity engine (used by the AboutContext to find about.vm in classpath)
- AboutBean (spring bean used as a variable in the velocity template that has access to the contained Tapestry Page) variable name: defaultAbout
- Generic bean (a spring bean defined in a potential plugin, also used as a variable template) variable name: about
Benefits
No static text displayed
if If a different, more complicated AboutPage needs to be implemented, simply only the about.vm template and AboutBean has to be changed to get new wanted data (dinamicallydynamically)
Plugin capabilities
- create plugin specific about.vm template that simply overwrites the original about.vm (overwrite the about.vm path in the sipxplugin.beans.xml spring configuration file - can be automatically picked up by the newly created velocity engine that reads resources from classpath)
- create a plugin specific About Bean (it is automatically added as a variable in the about.vm by the AboutContext) that should have properties to retrieve any dinamic dynamic data needed
- localization support (IPage object is available in the about.vm - can be retrieved from the default AboutBean
Look & Feel
Specific dialog look & fell feel kept in a css class (in layout.css - can be easily overwritten in a potential plugin)
...