Code: Select all
<table>
#foreach ( $row in $CUSTOMER )
<tr>
<td>${CUSTOMER-NAME}</td>
<td>${CUSTOMER-NUMBER}</td><td>${CUSTOMER-CREDIT}</td>
<td>${CUSTOMER-PHONE}</td>
</tr>
#end
</table>
$CUSTOMER does not seem to exist as a variable accessible to Velocity. $tables and $tables.CUSTOMER do seem to exist, but $tables.CUSTOMER.rows does not seem to be a collection that Velocity can iterate.
Is the documented example still valid? Should it be working? If not, what's the up-to-date equivalent?
As a supplementary, related question: I like that the designer runs the template so that there's a decent wysiwyg view of the form. Obviously it can't render things that depend on runtime context, though. Is there a way to reliably detect in a Velocity template when it is running in the designer, rather than in the forms runtime, so that I can substitute decent-looking boilerplate?
Thanks,
Jon.