Package org.apache.flex.forks.velocity.app

Examples of org.apache.flex.forks.velocity.app.VelocityEngine.evaluate()


         this should parse fine -> uses ==
         */

        String template = "#if($a == $b) foo #end";

        ve.evaluate(new VelocityContext(), new StringWriter(), "foo", template);

        /*
         *  this should throw an exception
         */

 
View Full Code Here


        template = "#if($a = $b) foo #end";

        try
        {
            ve.evaluate(new VelocityContext(), new StringWriter(), "foo", template);
            assertTrue(false);
        }
        catch(ParseErrorException pe)
        {
        }
View Full Code Here

         * this should work
         */

        String template = "#macro(foo) foo #end";

        ve.evaluate(new VelocityContext(), new StringWriter(), "foo", template);

         /*
         *  this should throw an exception
         */

 
View Full Code Here

        template = "#macro($x) foo #end";

        try
        {
            ve.evaluate(new VelocityContext(), new StringWriter(), "foo", template);
            assertTrue(false);
        }
        catch(ParseErrorException pe)
        {
        }
View Full Code Here

         * this should work
         */

        String template = "#macro(foo) foo #end";

        ve.evaluate(new VelocityContext(), new StringWriter(), "foo", template);

         /*
         *  this should work - spaces intentional
         */

 
View Full Code Here

         this should work - spaces intentional
         */

        template = "#foreach(  $i     in  $woogie   ) end #end";

        ve.evaluate(new VelocityContext(), new StringWriter(), "foo", template);

        /*
        *  this should bomb
        */

 
View Full Code Here

       template = "#macro(   foo $a) $a #end #foo(woogie)";

        try
        {
            ve.evaluate(new VelocityContext(), new StringWriter(), "foo", template);
            assertTrue(false);
        }
        catch(ParseErrorException pe)
        {
            System.out.println("Caught pee!");
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.