Hey guys,

        The one use of the renderer that I make use of outside of the pipeline
        is to send email:
           
                   TemplateContext c = new DefaultTemplateContext();
                        ... fill it up ..
                        Sting email = renderer.render(c, templateName);
                        ... mail out email ..
        
         It's really not a big deal (just allow a null RunData in the Renderer),
         but that was my outside the pipeline usage of the Renderer.  

    Perhaps there are other/better ways?  


         keep up the great work!!!

         mike



On Fri, Jan 18, 2002 at 09:57:38PM -0500, Jason van Zyl wrote:
> On 1/18/02 9:41 PM, "James Taylor" <[EMAIL PROTECTED]> wrote:
> 
> > I've been looking at the classes Renderer and DirectRenderer and I have
> > a two general concerns.
> > 
> > The first is that Renderer seems to define many methods which are not
> > used. The role of renderer is to help Valves render templates, however
> > it defines a number of unused methods which are outside of that
> > responsibility. For clarity I think it would be good to eliminate these
> > methods.
> > 
> > Second, I feel it is cumbersome to be required to include the rundata on
> > each method call. Since a renderer is linked to a request it can easily
> > maintain a reference to its rundata. This allows simpler calls in
> > templates.
> > 
> > I have included a patch with this method that contains the changes I am
> > suggesting. It passes the test suite using both the classic and direct
> > pipelines, keeping in mind that the patch it contains changes to the
> > default layout in the test.
> 
> Cool, I'll take a peek, respond and apply if kosher :-)
> 
> > Thanks,
> > James Taylor
> > 
> > PS: This is my first post to the list, so howdy!
> > 
> > 
> > --
> > To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 
> -- 
> 
> jvz.
> 
> Jason van Zyl
> 
> http://tambora.zenplex.org
> http://jakarta.apache.org/turbine
> http://jakarta.apache.org/velocity
> http://jakarta.apache.org/alexandria
> http://jakarta.apache.org/commons
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

-- 
-------------------------------------------------
I am Vinz, Vinz Clortho.  Keymaster of Gozer,
Volguus Zildrohar, Lord of the Sebouillia.
Are you the Gatekeeper?
-------------------------------------------------

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to