that version. Although the major differences at this point are the multi-line
directives and the maps.
WILL
----- Original Message ----- From: "Ben" <[EMAIL PROTECTED]>
To: "Velocity Users List" <velocity-user@jakarta.apache.org>
Sent: Monday, January 24, 2005 3:23 PM
Subject: Re: multi-line directives (again)
Hi
Is it just me or declaring a Map variable isn't working?
#set( $monkey.Map = {"banana" : "good", "roast beef" : "bad"}) ## Map
Gives me syntax error.
-Ben
On Mon, 24 Jan 2005 14:02:23 -0800, Will Glass-Husain <[EMAIL PROTECTED]> wrote:and for the other example, try
#set( $notSupported1 = "spanning multiple" + " lines")
WILL
----- Original Message ----- From: "Greg Wolfe" <[EMAIL PROTECTED]> To: <velocity-user@jakarta.apache.org> Sent: Monday, January 24, 2005 1:29 PM Subject: multi-line directives (again)
Hi,
I'm trying to get multi-line directives to work in velocity.
Is see the following post from 2002:
http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]&msgNo=7095
It looks like this feature never made it into velocity.
Why can't I do:
#set( $array = "foo", "bar", "blah" )
or
#set( $notSupported1 = "spanning multiple\ lines")
Is there an approved workaround? The (ugly) workaround I've been using for now allows me to break string constants accross multiple lines by embedding velocity comments and backslashes into them.
Some examples of this:
#set( $sample1 = "the great spa##\ nner") ## note that this line must start on the first column of the file!
or
#set( $sample2 = "I span #*\ *#wide spaces") ## note that the whitespace was in a comment
or #set( $sample3 = "I span #*\ in a comment here\ *#wider spaces")
Thanks, -Greg Wolfe
--------------------------------------------------------------------- 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]