Re: sitemesh + ww1 + velocity
Scott Farquhar <[email protected]>
| Newsgroups | gmane.comp.web.sitemesh.general |
|---|---|
| Message-ID | <[email protected]> |
Jan, We use a custom servlet dispatcher, which doesn't clean up the action context, and then a servlet filter that runs after sitemesh. Alternatively, use content blocks inside the page which you can then access from the decorator. This is what we do in Confluence. Cheers, Scott On Wed, Mar 31, 2004 at 02:09:12AM +0200, Jan Berkel wrote: > Hi, > > I adapted the VelocityDecoratorServlet from CVS to work with Webwork1. It > will use the velocity config from webwork (basically a cut and paste > from VelocityHelper). > > I wanted to be able to access the action from the decorator page, for > error messages display etc. > > The problem is that at decorating-time the action is no longer on the > value stack, and the VelocityDecoratorServlet doesn't use webwork's own > context. A workaround was to grab the action from the attribute > "webwork.valuestack.head" and to setup a valuestack containing just this > action. The static class WebWorkVelocityContext is also a cut'n'paste > from VelocityHelper (it has package access there, unfortunately). > > Is there are better way ? Or shouldn't the decorator page have access to > framework internals ? > > Jan > ------------------------------------------------------- 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_id=3638&op=click