velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Kremberg" <>
Subject Noob Question about Object Access
Date Tue, 23 Oct 2007 21:59:20 GMT
Please ignore my ignorance, I've read through the documentation and haven't
figured out how to solve my problem.  ; I am a front-end developer coming
from the PHP world with only some JSP background.  I am working on a system
that I do not have the source to.  Anyway, I have access to price

#set ($productPrice = $product.getPrice($sesShoppingCart.getCurrency()))
#set ($listPrice = $price.getAmount())
I even have access to a Class with comparator methods.
I need to do something like this: 
#if( $price.lessThan($upperBound) && $price.greaterThan($lowerBound) )

In JSP, I could write a scriptlet.
BigDecimal upperAmount = new BigDecimal("1500.00");
$upperBound = new MoneyImpl(upperAmount, "USD");

My question, how can I create the $upperBound and $lowerBound as Money
objects in the scope of this template.  What is the best way to do this in
Velocity?  Am I barking up the wrong tree?

Help is greatly appreciated.  Thanks!

P.S. For reference, class documentation:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message