RE: View Loading and Caching

"Andy Zeneski" <[email protected]> Wed, 26 Feb 2003 17:56:04 -0500
Newsgroups gmane.comp.java.jpublish.devel
Message-ID <[email protected]>
>
> What is the point of passing the path to the createTemplateContext()
> method?  Also, can you explain to me why you would want to override this
> method?  I.e. why would you want to create a different instance of the
> root context when it is just a wrapper around the JPublishContext?
>

I put the path there, just in case someone came up with a reason to use it
and because it was available.

The main reason for overriding this method is because other objects in
addition to the JPublishContext may (and in our case do) need to be in the
root context for the template. We have some custom transforms and freemarker
methods which need to be in the root. Also, we utilize some of the wrappers
for request parameters, etc.

I thought this would make it more flexible for customization and allow to
reuse as much existing code as possible.

-Andy




-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp