Package org.apache.velocity.context

Examples of org.apache.velocity.context.InternalContextAdapterImpl


         * now we want to init and render
         */

        if (nodeTree != null)
        {
            InternalContextAdapterImpl ica =
                new InternalContextAdapterImpl( context );
           
            ica.pushCurrentTemplateName( logTag );
           
            try
            {
                try
                {
                    nodeTree.init( ica, RuntimeSingleton.getRuntimeServices() );
                }
                catch( Exception e )
                {
                    RuntimeSingleton.error("Velocity.evaluate() : init exception for tag = "
                                  + logTag + " : " + e );
                }
               
                /*
                 *  now render, and let any exceptions fly
                 */

                nodeTree.render( ica, writer );
            }
            finally
            {
                ica.popCurrentTemplateName();
            }
           
            return true;
        }
       
View Full Code Here


        vp.setupMacro( p, types  );
     
        try
        {
            InternalContextAdapterImpl ica
                = new InternalContextAdapterImpl( context );
           
            try
            {
                ica.pushCurrentTemplateName( namespace );
                vp.render( ica, writer, null);
            }
            finally
            {
                ica.popCurrentTemplateName();
            }
        }
        catch (Exception e )
        {
            RuntimeSingleton.error("Velocity.invokeVelocimacro() : " + e );
View Full Code Here

    {
        /*
         *  send an empty InternalContextAdapter down into the AST to initialize it
         */
       
        InternalContextAdapterImpl ica = new InternalContextAdapterImplnew VelocityContext() );

        try
        {
            /*
             *  put the current template name on the stack
             */

            ica.pushCurrentTemplateName( name );
           
            /*
             *  init the AST
             */

            ((SimpleNode)data).init( ica, null);
        }
        finally
        {
            /* 
             *  in case something blows up...
             *  pull it off for completeness
             */

            ica.popCurrentTemplateName();
        }

    }
View Full Code Here

            /*
             *  create an InternalContextAdapter to carry the user Context down
             *  into the rendering engine.  Set the template name and render()
             */

            InternalContextAdapterImpl ica = new InternalContextAdapterImpl( context );

            try
            {
                ica.pushCurrentTemplateName( name );

                ( (SimpleNode) data ).render( ica, writer);
            }
            finally
            {
                /*
                 *  lets make sure that we always clean up the context
                 */

                ica.popCurrentTemplateName();
            }
        }
        else
        {
            /*
 
View Full Code Here

         * now we want to init and render
         */

        if (nodeTree != null)
        {
            InternalContextAdapterImpl ica =
                new InternalContextAdapterImpl( context );
           
            ica.pushCurrentTemplateName( logTag );
           
            try
            {
                try
                {
                    nodeTree.init( ica, null );
                }
                catch( Exception e )
                {
                    Runtime.error("Velocity.evaluate() : init exception for tag = "
                                  + logTag + " : " + e );
                }
               
                /*
                 *  now render, and let any exceptions fly
                 */

                nodeTree.render( ica, writer );
            }
            finally
            {
                ica.popCurrentTemplateName();
            }
           
            return true;
        }
       
View Full Code Here

        vp.setupMacro( p, types  );
     
        try
        {
            InternalContextAdapterImpl ica
                = new InternalContextAdapterImpl( context );
           
            try
            {
                ica.pushCurrentTemplateName( namespace );
                vp.render( ica, writer, null);
            }
            finally
            {
                ica.popCurrentTemplateName();
            }
        }
        catch (Exception e )
        {
            Runtime.error("Velocity.invokeVelocimacro() : " + e );
View Full Code Here

         * now we want to init and render
         */

        if (nodeTree != null)
        {
            InternalContextAdapterImpl ica =
                new InternalContextAdapterImpl( context );
           
            ica.pushCurrentTemplateName( logTag );
           
            try
            {
                try
                {
                    nodeTree.init( ica, null );
                }
                catch( Exception e )
                {
                    Runtime.error("Velocity.evaluate() : init exception for tag = "
                                  + logTag + " : " + e );
                }
               
                /*
                 *  now render, and let any exceptions fly
                 */

                nodeTree.render( ica, writer );
            }
            finally
            {
                ica.popCurrentTemplateName();
            }
           
            return true;
        }
       
View Full Code Here

        vp.setupMacro( p, types  );
     
        try
        {
            InternalContextAdapterImpl ica
                = new InternalContextAdapterImpl( context );
           
            try
            {
                ica.pushCurrentTemplateName( namespace );
                vp.render( ica, writer, null);
            }
            finally
            {
                ica.popCurrentTemplateName();
            }
        }
        catch (Exception e )
        {
            Runtime.error("Velocity.invokeVelocimacro() : " + e );
View Full Code Here

    {
        /*
         *  send an empty InternalContextAdapter down into the AST to initialize it
         */
       
        InternalContextAdapterImpl ica = new InternalContextAdapterImplnew VelocityContext() );

        try
        {
            /*
             *  put the current template name on the stack
             */

            ica.pushCurrentTemplateName( name );
           
            /*
             *  init the AST
             */

            ((SimpleNode)data).init( ica, null);
        }
        finally
        {
            /* 
             *  in case something blows up...
             *  pull it off for completeness
             */

            ica.popCurrentTemplateName();
        }

    }
View Full Code Here

            /*
             *  create an InternalContextAdapter to carry the user Context down
             *  into the rendering engine.  Set the template name and render()
             */

            InternalContextAdapterImpl ica = new InternalContextAdapterImpl( context );

            try
            {
                ica.pushCurrentTemplateName( name );
                ica.setCurrentResource( this );

                ( (SimpleNode) data ).render( ica, writer);
            }
            finally
            {
                /*
                 *  lets make sure that we always clean up the context
                 */
                ica.popCurrentTemplateName();
                ica.setCurrentResource( null );
            }
        }
        else
        {
            /*
 
View Full Code Here

TOP

Related Classes of org.apache.velocity.context.InternalContextAdapterImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.