velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlo Torniai <carlo.torn...@hp.com>
Subject Chhecking Vector content from template
Date Wed, 28 Jun 2006 13:14:23 GMT
Hi all.
I'm trying to evaluate if a vector contains elements from my template.

The vector is added at the context in this way from my Servlet.

 ctx.put("frontrightpic", front_right_pict);

I'm able to retrieve content in the template using

#foreach ($photo_front_right in $frontrightpic)

I want to check if the vector contains any result in order to change the 
displayed HTML.
I've tried to use
#if($photo_front_right=='')

and also other conditions on $frontrightpic don't seem to work.

Can you help me to check if vector contains any entry?
Thanks.
Carlo



---------------------------------------------------------------------
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