velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "White, Tim" <Tim.Wh...@qwest.com>
Subject Overloading VelociMacros?
Date Thu, 03 Jun 2004 15:50:16 GMT
Hi -

 Is it possible to overload VelociMacros?

 e.g. :

 #macro (showIfExists $object $path $preNode $postNode $preList
$postList)
	#if($object.getMMCValue($path))
		$preList
		#foreach($nodeValue in $object.getMMCList($path))
			#if ($nodeValue.getValue("self::"))
				$preNode $nodeValue.getValue("self::")
$postNode
			#end
		#end
		$postList
	#end
#end

#macro (showIfExists $object $path $preNode $postNode)
	#showIfExists ($object $path $preNode $postNode "" "")
#end

I ask because VelociMacros can't have optional parameters. :)

I tried it and it seemed to take only the second one.  Just making sure
there's not a trick I'm missing... :)

Thanks!!!

Tim

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