geirm       00/12/09 20:56:05

  Modified:    src/java/org/apache/velocity Template.java
  Log:
  Added support for template-local inline VMs - needed to send a context down the AST 
in the init().
  
  Revision  Changes    Path
  1.18      +7 -3      jakarta-velocity/src/java/org/apache/velocity/Template.java
  
  Index: Template.java
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/Template.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Template.java     2000/12/06 20:49:23     1.17
  +++ Template.java     2000/12/10 04:56:04     1.18
  @@ -84,7 +84,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
  - * @version $Id: Template.java,v 1.17 2000/12/06 20:49:23 geirm Exp $
  + * @version $Id: Template.java,v 1.18 2000/12/10 04:56:04 geirm Exp $
    */
   public class Template
   {
  @@ -177,12 +177,16 @@
   
       /**
        *  initializes the document.  init() is not longer 
  -     *  dependant upon context.
  +     *  dependant upon context, but we need to let the 
  +     *  init() carry the template name down throught for VM
  +     *  namespace features
        */
       public void initDocument()
           throws Exception
       {
  -        document.init( null, null);
  +        Context c = new Context();
  +        c.setCurrentTemplateName( name );
  +        document.init( c, null);
       }
   
       /**
  
  
  

Reply via email to