velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Doyon <...@biospace.com>
Subject making dot notation not interpret
Date Mon, 04 Mar 2002 17:45:55 GMT
Hi,

I'm new to the group so forgive me for asking a previously asked question.
First off,
kudos on velocity, its really easy to use and I'm feeling liberated from
using JSPs all
the time. I have 2 issues and one seems to be in the process of being
resolved (nulls - Great!).

Secondly, we have a static properties object that is used throughout our
system and is heavily infused with stuff we use in jsps.  Many of the keys
have '.' in them 

Here's an example to best describe situation.

	Properties p = new Properties();
	p.setProperty("foo.bar","fubar");
	p.setProperty("aka","foobar");
	context.put("p",p);
	context.put("foo.bar","fubar");
		:
		:
		: 

a template like below

	A term used by naval soldiers in WWII  is? 
		a. $p.get("foo.bar")
		b. ${foo.bar}	
		c. $foo.bar
		d. $p.aka
		e. $p.foo.bar
		f. $p.{foo.bar}

gives results like 

	A term used by naval soldiers in WWII is? 
		a. fubar 
		b. ${foo.bar} 
		c. $foo.bar 
		d. foobar 
		e. $p.foo.bar
		f. {aka=foobar, foo.bar=fubar}.{foo.bar} 

Any plans on making the braces allow (b.) to give same results as (a.) ??? I
think this would make the templates less code-like. I do have a workaround
whereby I replace the dots with underscores. This works fine but is not
optimal.

Thanks

Dan

Dan Doyon
Senior Software Engineer
Enterprise Solutions
dan@biospace.com 
415-355-6584 (O) 
415-503-1070 (F) 
BioSpace - Web Solutions for the Life Sciences
http://www.biospace.com/
NEWS_STOCKS_CAREERS_RESOURCES_COMMUNITIES_WEB SOLUTIONS
BioSpace, Inc. 
245 11th Street 
San Francisco, CA 94103


--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message