velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terry Steichen" <te...@net-frame.com>
Subject Re: Looking for a more complete VTL Reference...
Date Tue, 01 Oct 2002 18:42:28 GMT
FYI, I was looking for (!=) in the docs just a couple of days ago, because
it wasn't behaving right.  Was surprised not to find it, but did end up
'discovering' the !($x == 1) construct (which I then used).  I think it was
the following line:

 #if(!($span == "") || !($script == "") || !($text == -1))

which, if I recall correctly, was originally something like this (which
wouldn't work right - but could have been precedence problems too):

 #if($span!= "" || $script != "" || $text != -1)

I can't remember exactly what I was doing when the problem occurred, and I
don't have time to try to reproduce it right now.  However, I just did some
quick checking and (!=) seems to work all right by itself.  (So, go figure!)

Regards,

Terry

PS: I'm using 1.2RC3.

----- Original Message -----
From: "Kevin Baynes" <kbaynes@seagullsw.com>
To: "Velocity Users List" <velocity-user@jakarta.apache.org>
Sent: Tuesday, October 01, 2002 1:31 PM
Subject: RE: Looking for a more complete VTL Reference...


>
> "#if($a != 1)" is valid VTL, as is "#if(!($a == 1))".
>
> It looks like the (!=) is indeed missing from the VTL reference guide.
>
> ~k
>
> > -----Original Message-----
> > From: Rodrigo Reyes [mailto:rodrigo@instaservi.com]
> > Sent: Tuesday, October 01, 2002 2:07 PM
> > To: velocity-user@jakarta.apache.org
> > Subject: Looking for a more complete VTL Reference...
> >
> >
> > Hi all...
> >     I would like to know if there is a more complete VTL
> > Reference or User's
> > Guide than the one that is placed in the Velocity Website. I am
> > starting to
> > work with Velocity and it seems to me that there are some very
> > basic things
> > missed there. For example, is there any way to make something like
"#if($a
> > != 1)"?. Is there a NOT operator? I also needed some way to order an
array
> > of Objects, but we couldn't find some way to reference static
> > methods, so we
> > had to create a wrapper object for Arrays object static methods. Is
there
> > any other way to do this? Thanx...
> >
> > Rodrigo
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:velocity-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:velocity-user-help@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
<mailto:velocity-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:velocity-user-help@jakarta.apache.org>
>


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


Mime
View raw message