RE: Sitemesh with Velocity Decorators and Spring MVC
"Jae Gangemi" <[email protected]> Tue, 30 Aug 2005 10:20:55 -0400
| Newsgroups | gmane.comp.web.sitemesh.general,gmane.comp.lang.pnuts.user |
|---|---|
| Message-ID | <[email protected]> |
i just created my own spring controller to handle all the redispatched decorator requests. (i participated in that thread and believe i posted the controller code, if not, let me know and i'll send it to you). that allowed the spring velocity macros to work and access to the dynamic content. i tried the patch that was attached to the jira issue, but had problems w/ it and came up w/ the spring mvc solution. i also tried the solution posted on the jroller blog, but i had issues getting that to work as well. -- -jae -----Original Message----- From: Scott Farquhar [mailto:[email protected]] Sent: Monday, August 29, 2005 6:49 PM To: [email protected] Subject: Re: [Opensymphony-sitemesh] Sitemesh with Velocity Decorators and Spring MVC Patrick, On Mon, Aug 29, 2005 at 11:07:08AM -0500, Patrick Burleson wrote: > I've been trying to figure out how to use Velocity as my decorator while also using Spring MVC also using Velocity to turn out the pages. > > With the base Velocity Decorator Servlet setup described by Sitemesh, it's true that my pages will get decorated by the templates defined. The crummy part is, those templates don't seem to have access to any of the dynamic content from the request or the session. Not to mention, they aren't able to use the Spring Velocimacros. > > I also know the problem here is that Sitemesh actually requests the page using the dispatcher, so it's actually a seperate request for the decorated pages. But surely, someone out there has figured this all out? This seems to come close: > http://www.jroller.com/page/timosinko/20050124 You should be able to do this completely without the second dispatch, and is what Mike did here: http://jira.opensymphony.com/browse/SIM-112?decorator=printable So it is possible - but it means that you need to hack it up yourself a little bit. This is because it needs to be done at the same time as your particular MVC's redirect to the view technology. Ideally, all MVC frameworks will integrate with sitemesh, which will mean that they handle calling sitemesh directly, rather than sitemesh doing it via the sitemesh filter. Cheers, Scott --------------------------------------------------------------------- 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]