|
From: <jue...@we...> - 2004-03-25 12:16:41
|
My main point is that I do not consider it appropriate to support such = model name conversions in the standard framework. You can subclass = VelocityView, of course - overriding the renderMergedOutputModel method = to first process the passed-in model Map and then invoke = super.renderMergedOutputModel with the processed model Map. To keep your model names compatible with any view technology = (particularly ones using expression languages), I strongly recommend to = use model names without dots, though. Juergen -----Original Message----- From: j=FCrgen h=F6ller [werk3AT]=20 Sent: Thursday, March 25, 2004 1:06 PM To: 'spr...@li...' Subject: Re: [Springframework-developer] Velocity problem in 1.0 final I've removed this because I consider model names with dots something to = avoid: Such model names do not work with the JSTL or FreeMarker either, = so I suggest to use different model names rather than adding special = conversions to Spring's templating support. Effectively, a "." -> "_" = conversion is a workaround that we'd need to add to JSTL and FreeMarker = too for consistency: Frankly, I don't see the point in this - let's = recommend model names without dots, usable with any view technology. Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Darren Davison Sent: Thursday, March 25, 2004 12:59 PM To: spr...@li... Subject: [Springframework-developer] Velocity problem in 1.0 final I've just dropped a 1.0 final spring.jar into one of my projects that = uses Velocity and it now fails due to a change made in VelocityView (CVS revision 1.24) Prior to this version, the velocity context was initialized with: Context velocityContext =3D new VelocityContext(); VelocityEngineUtils.exposeModelAsContextAttributes(model, = velocityContext); now, it's done with: Context velocityContext =3D new VelocityContext(model); and the relevant conversion method from VelocityEngineUtils has been = removed. What this means is any model object with a period (.) in the name is not altered to a velocity friendly underscore character (_) which VelocityEngineUtils used to do. Is there a reason this was done, or is there an alternative conversion method that I've overlooked? Velocity can still not handle names with periods so now any application that potentially adds such keys to the model map will break (as mine just has!) when Velocity is the view technology. Regards, --=20 Darren Davison Public Key: http://www.davison.uk.net/key.jsp ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dick _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |