[prev in list] [next in list] [prev in thread] [next in thread]
List: velocity-user
Subject: Re: Anomaly with errorMarkup macro in velstruts example 3 (Related to
From: Nathan Bubna <nathan () esha ! com>
Date: 2003-10-27 6:21:08
[Download RAW message or body]
James Roycroft said:
> I do not understand why it breaks. When I try this out with a much simpler
> test case, using '$errors.exist', it works fine. Why would it break in the
> example app?
i highly doubt that it does. have you tried reversing your test macro so that
you are testing if errors *do* exist instead of testing if they *don't*?
Velocity's shorthand notation for methods (where you can leave off the
parentheses) only works for bean-style methods (i.e. methods prefixed by
"get", "set", or "is") or else values returned by a get(String) method.
in other words, #if( !$errors.exist ) foo #end will always display ' foo '
because there is no isExist(), or getExist() method in the ErrorsTool. you
must do $errors.exist().
Nathan Bubna
nathan@esha.com
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic