Examples of attachToContext()


Examples of org.apache.velocity.app.event.EventCartridge.attachToContext()

        // set up handler
        Context context = new VelocityContext();
        EventCartridge ec = new EventCartridge();
        ec.addEventHandler(this);
        ec.attachToContext( context );

        // BEHAVIOR A: pass through #input and #parse with no change
        EventHandlerBehavior = PASS_THROUGH;

        template1.merge(context, writer1);
View Full Code Here

Examples of org.apache.velocity.app.event.EventCartridge.attachToContext()

        // set up handler
        Context context = new VelocityContext();
        EventCartridge ec = new EventCartridge();
        ec.addEventHandler(this);
        ec.attachToContext( context );

        // BEHAVIOR B: pass through #input and #parse with using a relative path
        EventHandlerBehavior = RELATIVE_PATH;

        template2.merge(context, writer2);
View Full Code Here

Examples of org.apache.velocity.app.event.EventCartridge.attachToContext()

        // set up handler
        Context context = new VelocityContext();
        EventCartridge ec = new EventCartridge();
        ec.addEventHandler(this);
        ec.attachToContext( context );

        // BEHAVIOR C: refuse to pass through #input and #parse
        EventHandlerBehavior = BLOCK;

        template3.merge(context, writer3);
View Full Code Here

Examples of org.apache.velocity.app.event.EventCartridge.attachToContext()

        // set up handler
        Context context = new VelocityContext();
        EventCartridge ec = new EventCartridge();
        ec.addEventHandler(this);
        ec.attachToContext( context );
       
        EventHandlerBehavior = BLOCK;
        template.merge(context, writer);
        writer.flush();
        writer.close();
View Full Code Here

Examples of org.apache.velocity.app.event.EventCartridge.attachToContext()

        ve.init();

        VelocityContext context = new VelocityContext();
        EventCartridge ec = new EventCartridge();
        ec.addEventHandler(reporter);
        ec.attachToContext(context);

        context.put("a1","test");
        context.put("b1","test");
        Writer writer = new StringWriter();
View Full Code Here

Examples of org.apache.velocity.app.event.EventCartridge.attachToContext()

        ve.init();

        VelocityContext context = new VelocityContext();
        EventCartridge ec = new EventCartridge();
        ec.addEventHandler(reporter);
        ec.attachToContext(context);

        context.put("a1","test");
        context.put("b1","test");
        Writer writer = new StringWriter();
View Full Code Here

Examples of org.apache.velocity.app.event.EventCartridge.attachToContext()

         *  Context
         */

        EventCartridge ec = new EventCartridge();
        ec.addEventHandler(te);
        ec.attachToContext( inner );

        /*
         *  now wrap the event cartridge - we want to make sure that
         *  we can do this w/o harm
         */
 
View Full Code Here

Examples of org.apache.velocity.app.event.EventCartridge.attachToContext()

         *  Context
         */
       
        EventCartridge ec = new EventCartridge();
        ec.addEventHandler(te);
        ec.attachToContext( inner );
       
        doTestInvalidReferenceEventHandler1(ve, inner);
        doTestInvalidReferenceEventHandler2(ve, inner);
        doTestInvalidReferenceEventHandler3(ve, inner);
        doTestInvalidReferenceEventHandler4(ve, inner);
View Full Code Here

Examples of org.apache.velocity.app.event.EventCartridge.attachToContext()

             *  event cartridge stuff
             */

            EventCartridge ec = new EventCartridge();
            ec.addEventHandler(this);
            ec.attachToContext( context );

            /*
             *  make a writer, and merge the template 'against' the context
             */

 
View Full Code Here

Examples of org.apache.velocity.app.event.EventCartridge.attachToContext()

         *  Context
         */

        EventCartridge ec = new EventCartridge();
        ec.addEventHandler(this);
        ec.attachToContext( inner );
 
        /*
         *  now wrap the event cartridge - we want to make sure that
         *  we can do this w/o harm
         */
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.