You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by bharat chintapally <hy...@hotmail.com> on 2001/10/23 21:26:49 UTC
Few questions about Velocity
Hi folks:
I am a novice here, just started using Velocity for some template
processing. I have few queastons.
1. Are logical AND and OR part of VTL yet??.
2. If I want put a java object (a bean) in Velocity context, should the
bean comply with any interface, or is it any java object with valid getters
and setters.
3. Is there a for-loop construct or its equivalent in VTL. I need to do some
program chores for n number of times. May be I can pull something with
foreach, but it isn't that graceful.
Any suggestions are welcome.
Thanks
--bharat
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: Few questions about Velocity
Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 10/23/01 5:01 PM, "Bojan Smojver" <bo...@binarix.com> wrote:
> bharat chintapally wrote:
>>
>> Hi folks:
>> I am a novice here, just started using Velocity for some template
>> processing. I have few queastons.
>>
>> 1. Are logical AND and OR part of VTL yet??.
>
> Yes.
>
>> 2. If I want put a java object (a bean) in Velocity context, should the
>> bean comply with any interface, or is it any java object with valid getters
>> and setters.
>
> Any will do.
It's better than that. Not only can you use 'beans', but we will let you
work with all public methods of an object, not just valid getters and
setters.
This is a valuable distinction from 'just beans'.
geir
--
Geir Magnusson Jr. geirm@optonline.net
System and Software Consulting
"Whoever would overthrow the liberty of a nation must begin by subduing the
freeness of speech." - Benjamin Franklin
Re: Few questions about Velocity
Posted by Bojan Smojver <bo...@binarix.com>.
bharat chintapally wrote:
>
> Hi folks:
> I am a novice here, just started using Velocity for some template
> processing. I have few queastons.
>
> 1. Are logical AND and OR part of VTL yet??.
Yes.
> 2. If I want put a java object (a bean) in Velocity context, should the
> bean comply with any interface, or is it any java object with valid getters
> and setters.
Any will do.
> 3. Is there a for-loop construct or its equivalent in VTL. I need to do some
> program chores for n number of times. May be I can pull something with
> foreach, but it isn't that graceful.
#foreach.
All those questions (and more) could have been answered by reading the
User's guide, available from here:
http://jakarta.apache.org/velocity/user-guide.html
Bojan