velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "GB Developer" <gb107...@globallyboundless.com>
Subject Re: Putting key/value pair into hashmap from velocity template
Date Thu, 20 Jul 2006 15:27:58 GMT


> "Matthias Hendler" <hendler2@gmx.de> writes:
>
>>I have found at http://www.freebok.net/help/velocity4.html the following 
>>example:
>>$sisyphus.pushRock()
>>## Velocity assumes I mean $sisyphus.getRock()
>>Its not discussed in detail what the author meant by his example, but I 
>>wonder how velocity assumes method calls.
>
> That example means that you can shorten $sisyphus.getRock() to
> $sisyphus.rock but you can't shorten $sisyphus.pushRock() because
> Velocity only checks for some functions when expanding the "short hand
> notation".

I don't get that at all.  I mean: I understand what you're saying Henning. 
But I don't get how what you're saying is what that author of the snippet 
was trying to say.  I always assumed that someone had a momentary lapse, and 
that it was just erroneous.  Because after all, how can Velocity literally 
assume that "xxxxRock()", where xxxxx is any number and combination of 
letters, means "getRock()".

Heck, I should just compile an example and see for myself, but talk about 
violation of the principle of least surprise, if it turns out that Velocity 
actually would assume that pushRock() meant getRock().


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message