Jason van Zyl wrote:
> 
> > I could also work with Velocity to make a Context object system that auto
> > populates itself, however, I think that this functionality should be
> > somewhere within Turbine instead of Velocity because we would want to make
> > it generic enough to work in other systems like WebMacro.
> >
> > What do you all think that I should do?
> 
> Is there a way that we can make sure that template service
> initializes before the velocity service, or webmacro service?

Create the toolbox within TurbineTemplateService.init()
(late init) and store it in a static variable.

add public Map getToolkit() method ot TemplateService et al.

Call this method in TurbineWebMacroService.getContext() 
and TurbineVelocityService.getContext().

I think that the above should work just fine. But, if for some 
reason this needs to be done within the early init process 
(during Turbine.init()), it's a bit more tricky, but definetely
possible:

WebMacroTurbineService.init(ServletConfig config)
{
    getServiceBroker().initService(TemplateService.SERVICE_NAME, config)
    // you can use TemplateService safely now
}

Rafal

--
Rafal Krzewski
Senior Internet Developer
mailto:[EMAIL PROTECTED]
+48 22 8534830 http://e-point.pl


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to