Mike Kienenberger said:
> Velocity 1.3.1
>
> The following line (which may or may not be proper code)

it's not. :)

> #if ( (1 == $currentAccount.getAmountDue().compareTo(BigDecimal.valueOf(0)))
> && ($currentAccount.isAccountStatusActive()) && (0 ==
> $currentAccount.scheduledPaymentList().size()) )

velocity neither knows nor cares what "BigDecimal.valueOf" is.  oh, and this
#if statement is atrocious.  that looks an awful lot like business logic
you're slipping into the View.  if you ask me, that's just asking for trouble
down the road.  can't you move some of that logic into your "currentAccount"
class?  e.g.:

#if( $currentAccount.isPayedUp() && $currentAccount.isActive() )
...
#end

> gives this error:
...
> Handcopied from veloedit in Eclipse (a little clearer):
>
> Encountered ")" at line 27, column 75.   [After BigDecimal.valueOf(0)]
> Was expecting one of:
>  "," ...
>  ")" ...
>  <WHITESPACE> ...
>  <DOT> ...

yeah, the error doesn't really point to the problem.  that's sucky.  i'm not
sure why it did that, but then again, i've never so much as looked at the
parser code.

Nathan Bubna
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to