-
Notifications
You must be signed in to change notification settings - Fork 0
Templating Basics
Templates are very simple to write. The are comprised of any string of text, and are decorated using orb-tags.
Orb tags are comprised of a preceding @ character, followed by {...} brackets which contain regular MVEL expressions.
My name is: @{name}
In this template, we have a simple property expression in our orb-tag, which returns the value of name. So if we were to inject a variable called name, or provide a Context Object that contains the field name and evaluate this template, we'll get something like this back:
My name is: Jane Doe
It's pretty simple.
MVEL Templates preserve all whitespace, so keep that in mind, depending on the type of document that you are creating.
This is the documentation for MVEL 1.2.x and 1.3.x. If you are using MVEL 2.*, please proceed to the documentation for MVEL 2.*