Hi,
String concatenations (with the + operator) works in #set statements.
However, no operators are allowed in macro parameters (use references only).
This works:
###########################
#set($param="test" + "abc" )
#macro(mac $item)
item: $item
#end
#mac($param)
###########################
This doesn't.
###########################
#set($param="test" )
#macro(mac $item)
item: $item
#end
#mac($param + "abc")
###########################
Will
----- Original Message -----
From: "Jean Francois Chamard" <[EMAIL PROTECTED]>
To: "Velocity Users List" <[email protected]>
Sent: Friday, September 09, 2005 8:29 AM
Subject: Re: Local variables; string concatenation within macro calls
Hi,
Wasn't there the #local command in the last nightbuilds for this?
Nathan Bubna wrote:
On 9/9/05, Scott Edward Skinner <[EMAIL PROTECTED]> wrote:
Can you define local variables in Velocity--variables that do not
reference anything from the controller?
yes. #set( $foo = "hello world!" )
Can you perform concatenation within a macro call. For example...
#someMacro($request.getContextPath() + "/static")
not like that. do this:
#someMacro( "${request.contextPath}/static" )
S |\_._/| .-.
E | o o |_ / /
S _.( T ) `./ /
---(((-`-(((---------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]