I have found two quirks in my migration from WebMacro
to Velocity.
First, for some reason, using
$link.setAction("myAction").setPage("myPage")
does not work, and Velocity just won't expand any part
of the string; however, by simply changing the order it
works:
$link.setPage("myPage").setAction("myAction")
This used to work both ways with WebMacro.
Second, and this one is harder to explain: I have code
that looks like this:
#foreach ($a in [1,2,3,4])
#if ($count($a) > 0)
<p>Processing area $a.<p>
$b = $fetch($a)
## do something with $b
#end
#end
It is the case that if I called $fetch with an argument
for which $count returns 0, $fetch would return null.
However, as far as I can see I'm protecting myself from
ever doing that, since there is an #if surrounding the
call to $fetch. Well, the fact is, it seems $fetch gets
called anyway, returning null sometimes, and generating
error messages on further processing; I have checked this
because every call to $fetch prints something on the log
file. And even weirder, the paragraph "Processing area $a"
is ONLY printed when the #if is true!!! In other words,
the paragraph seems to respect the flow of control, but
the call to $fetch is done ALWAYS. This is REALLY not
expected behavior...
Thanks,
--
Gonzalo A. Diethelm
[EMAIL PROTECTED]
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]