Git Product home page Git Product logo

gt-engine's People

Contributors

gslowikowski avatar mbknor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gt-engine's Issues

%{ print 'hello' }% should work

There was one issue I encountered though:

%{ print 'hello' }%

prints to output stream in play 1.2.3
and with your new version it seems to print to the standard out.

Varargs methods are not resolved in JavaExtensions

GTJavaExtensionInvoker uses an old pre-Java5 code from commons-lang's MethodUtils.getMatchingAccessibleMethod to match methods, which doesn't support Java5 features like varargs.

Default play templates call vararg methods properly.

Probably, it would be better to use MethodUtils.getMatchingAccessibleMethod from commons-beanutils or commons-lang3 instead.

Improve error line reporting for some No route found

When using fastergt-module, the line number is not shown when you get a "No route found" error.

See stacktrace below.

I believe the problem is that the classname 'play.modules.gtengineplugin' is not seen as "internal" preventing fixStacktrace skipping down to 'at /app/views/mainWithoutCSS.html.(line:64)'

Template execution error (In /app/views/StartController/index.html around line 0)
Execution error occured in template /app/views/StartController/index.html. Exception raised was GTRuntimeException : No route found.

play.exceptions.TemplateExecutionException: No route found
        at play.modules.gtengineplugin.GTTemplate.renderGTTemplate(GTTemplate.java:114)
        at play.modules.gtengineplugin.GTTemplate.internalGTRender(GTTemplate.java:73)
        at play.modules.gtengineplugin.GTTemplate.internalRender(GTTemplate.java:52)
        at play.modules.gtengineplugin.GTTemplate.render(GTTemplate.java:124)
        at play.mvc.results.RenderTemplate.<init>(RenderTemplate.java:24)
        at play.mvc.Controller.renderTemplate(Controller.java:661)
        at play.mvc.Controller.renderTemplate(Controller.java:641)
        at play.mvc.Controller.render(Controller.java:696)
        at controllers.StartController.index(StartController.java:14)
        at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:551)
        at play.mvc.ActionInvoker.invoke(ActionInvoker.java:502)
        at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:478)
        at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:473)
        at play.mvc.ActionInvoker.invoke(ActionInvoker.java:161)
        at Invocation.HTTP Request(Play!)
Caused by: play.template2.exceptions.GTRuntimeException: No route found
        at play.modules.gtengineplugin.gt_integration.GTGroovyBase1xImpl$ActionBridge.invokeMethod(GTGroovyBase1xImpl.java:159)
        at /app/views/mainWithoutCSS.html.(line:64)
        at play.template2.GTJavaBase.internalRenderTemplate(GTJavaBase.java:124)
        at play.modules.gtengineplugin.gt_integration.GTJavaBase1xImpl.internalRenderTemplate(GTJavaBase1xImpl.java:82)
        at play.template2.GTJavaBase.internalRenderTemplate(GTJavaBase.java:139)
        at play.modules.gtengineplugin.gt_integration.GTJavaBase1xImpl.internalRenderTemplate(GTJavaBase1xImpl.java:82)
        at play.template2.GTJavaBase.internalRenderTemplate(GTJavaBase.java:139)
        at play.modules.gtengineplugin.gt_integration.GTJavaBase1xImpl.internalRenderTemplate(GTJavaBase1xImpl.java:82)
        at play.template2.GTJavaBase.renderTemplate(GTJavaBase.java:97)
        at play.modules.gtengineplugin.GTTemplate.renderGTTemplate(GTTemplate.java:91)
        ... 14 more
Caused by: play.template2.exceptions.GTRuntimeException: No route found
        ... 24 more
Caused by: play.exceptions.NoRouteFoundException: No route found
        ... 24 more

Adding gtengine to benchmark

I want to add gtengine to the template framework benchmark

So I need to code a simple class that would instantiate a gtengine template engine, give a collection of Item as an input parameter and execute the thing.

Here's an example of code for another template engine

        // Some template engine specific code
        Properties p = new Properties();
        p.put("log.enabled", false);
        p.put("feature.smart_escape.enabled", false);
        p.put("feature.transform.enabled", false);

        // here we go 
        engine = new RythmEngine(p);

        // Parameters
        String tmpl = "path/to/my/template.rythm.html" ; 
        List<Stock> items = ...
        OutputStream o1 = ... 

        // Get the template output in the output stream o1  
        engine.render(o1, tmpl, items);
        o1.close();

Could you help me writing the code for gtengine ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.