opensubscriber
   Find in this group all groups
 
Unknown more information…

v : velocity-user@jakarta.apache.org 10 November 2006 • 11:26PM -0500

How to get Type of variable
by rjain

REPLY TO AUTHOR
 
REPLY TO GROUP





I have a ArrayList which can contain either items of TypeA or TypeB

#foreach($item in $arrayList)
  #if ($item <isoftype> TypeA)
         Do something
  #else ($item <isoftype> TypeB)
         Do something else
  #end
#end

How do I get the Type of Item in the Arraylist?

Thanks!!
--
View this message in context: http://www.nabble.com/How-to-get-Type-of-variable-tf2608406.html#a7279003
Sent from the Velocity - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jaka...
For additional commands, e-mail: velocity-user-help@jaka...

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.