modality

ModelTool

Features

The ModelTool exposes a model definition to the view.

VTL API

TODO

- fetching: #set($book = $bookstore.fetch(1))
- properties and joins: $book.publisher.address.zip
- loops: #foreach($author.books) ...
- attributes: $book.most_recent_edition.year

Upgrading Velosurf Webapps

Fix libraries versions (TODO add link towards dependencies).

In tools.xml

Using the com.republicate.tools.model.velosurf.VelosurfTool instead of the regular com.republicate.tools.model.ModelTool provides the following backward compatibility helpers:

In model.xml

In velocity.properties

Update uberspectors:

runtime.introspector.uberspect = com.republicate.modality.tools.model.ModelUberspector,org.apache.velocity.util.introspection.UberspectImpl,org.apache.velocity.tools.view.WebappUberspector

In the Java code

modality.properties

You’ll potentially need a new /WEB-INF/modality.properties.

In the templates

Testing

Set Velocity to strict mode to be sure your templates are ok.