Velosurf 2.0

2006-11-10 Thread Claude Brisson
Velosurf 2.0 has just been released. Velosurf is a database mapping layer for the Apache Velocity template engine. It provides automatic database mapping of tables and relationships without any code generation. In the context of a Webapp, it also provides handy tools for authentication,

Re: Velosurf 2.0

2006-11-10 Thread Will Glass-Husain
Congratulations, Claude-- looks really nice! (obviously you meant the link below: http://velosurf.sourceforge.net ) WILL On 11/10/06, Claude Brisson [EMAIL PROTECTED] wrote: Velosurf 2.0 has just been released. Velosurf is a database mapping layer for the Apache Velocity template engine. It

[ANN] Restlet now supports Velocity

2006-11-10 Thread Jerome Louvel
Hi all, Restlet, a lightweight REST framework for Java, now natively supports Velocity templates. This feature was added in our latest 1.0 beta 20 release. Here is a summary of the main features: * REST concepts have equivalent Java classes (resource, representation, connector, etc.)

Re: [ANN] Restlet now supports Velocity

2006-11-10 Thread Will Glass-Husain
Sounds very slick. Is Restlet in our Powered By Velocity wiki page? Feel free to add it. WILL On 11/10/06, Jerome Louvel [EMAIL PROTECTED] wrote: Hi all, Restlet, a lightweight REST framework for Java, now natively supports Velocity templates. This feature was added in our latest 1.0 beta 20

Define Arraylist

2006-11-10 Thread rjain
How do I define a new arraylist and add items to the arraylist in Velocity I am looking at something #set( $myArray = [] ) ## Empty ArrayList $myArray.put(Item 1) $myArray.put(Item 2) regards Rajesh -- View this message in context:

Re: [ANN] Restlet now supports Velocity

2006-11-10 Thread Jerome Louvel
Hi Will, Thanks for taking a look. I've just added an entry for Restlet in the wiki! Thanks, Jerome Will Glass-Husain a écrit : Sounds very slick. Is Restlet in our Powered By Velocity wiki page? Feel free to add it. WILL

RE: Define Arraylist

2006-11-10 Thread Townson, Chris
How do I define a new arraylist and add items to the arraylist in Velocity I am looking at something #set( $myArray = [] ) ## Empty ArrayList $myArray.put(Item 1) $myArray.put(Item 2) #set($myArray = []) #set($temp = $myArray.add(Item 1) ## using set here will prevent the word

Re: Velosurf 2.0

2006-11-10 Thread Claude Brisson
Le vendredi 10 novembre 2006 à 06:00 -0800, Will Glass-Husain a écrit : Congratulations, Claude-- looks really nice! You're talking about the new logo? Yes, I'm very proud of it! ;-) (obviously you meant the link below: http://velosurf.sourceforge.net Thanks for the correction! Claude

How to get Type of variable

2006-11-10 Thread rjain
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

Re: How to get Type of variable

2006-11-10 Thread Paul Loy
Try doing a .class? #foreach($item in $arrayList) #set($classType = $item.class) #if ($classType == com.domain.classname) do something #else don't do it! #end #end (this code isn't tested... just in my head!) rjain wrote: I have a ArrayList which can contain either

Re: How to get Type of variable

2006-11-10 Thread rjain
Thanks Paul. I could get a simpler solution, created a method called getTypeId for both the objects #foreach ($branch in $cBranchList) #if($branch.BizObject.getTypeId().equals(TypeA)) #else #end #end I haven't tried your solution, I guess

RE: How to get Type of variable

2006-11-10 Thread THOMAS, BRIAN M \(SBCSI\)
Because $item is of type java.lang.Object, $item.getClass() yields a java.lang.Class representing the class of $item, which has a method getName() returning a java.lang.String containing its fully qualified class name. Using Velocity's shortcut syntax which allows us to write $ref.getSomething()

RE: How to get Type of variable

2006-11-10 Thread THOMAS, BRIAN M \(SBCSI\)
Sorry; error: $item.class.equals($A.class) will tell you whether A is an instance of typeA. I meant to say that it will tell you whether $item is an instance of the same class as $A, which gives you what you want if $A is also an instance of typeA. brain[sic] -Original