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,
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
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.)
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
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:
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
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
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
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
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
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
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()
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
13 matches
Mail list logo