Hello Alpha Geeks
I put a small grails plugin out today.
http://www.grails.org/plugin/grails-template-engine
The plugin simply exposes the GSP render engine as a service for backend GSP template rendering . It also adds a new convenient method to the controllers called renderWithTemplateEngine
The implementation was mostly lifed from Graeme's mail plugin. Now it is available standalone.
Hopefully this is useful to someone out there :)
4 comments:
Peter, This is exactly what i was looking for, but when i try to run i was getting a compile error:
[groovyc] C:\Users\mlathe\Documents\IntelliJProjects\--snip--\MailService.groovy: 3: unable to resolve class GrailsTemplateEngineService
[groovyc] @ line 3, column 1.
[groovyc] import GrailsTemplateEngineService
[groovyc] ^
[groovyc]
[groovyc] 1 error
If i move your class to the "templateEngine" package and do an "import templateEngine.GrailsTemplateEngineService" then the import works, but i get a nullpointer error (i guess the dependency is not injected)?
Also i noticed that the API is actually "protected renderView()" not "renderWithTemplateEngine" as it is in the documentation. It's also protected which seems wrong right?
Any ideas?
Does this still work in 1.3.6? The rendering methods on GrailsTemplateEngineService have "protected" access. Is it sill possible to use this service from within another service? If so, how is it done?
Um, if this plugin isn't being managed, it should be removed. I can't get it to work, and the documentation on grail's site is not helpful.
Grails doesn't even recognize the class when I use it as documented.
I like your site very much, I fall here by google search and start reading your post, by watching all pages I get to know that you are posting nice stuff on your pages, I would share this information with all my friends, as you are providing a nice information resource to all people, this is only one place I seen this much information all together,Student Loan because people search for such places where they can get all they looking for. Im really happy to find this place and I would talk about your site with my friends. I would definitely return back to your site as I book marked your page url to visit you again. I hope you will keep posting nice stuff on different important issues, and will share all your nice stuff with us, and all your experience to give more knowledge to people, the design of your website is really nice and you are working hard to provide a best information resource. university entrance programmesNo doubt that you are one of the best people who are working hard to make this internet world more worth full as there are many website who are not providing that they should. They are just trying to waste people time and give no good results. But im really happy with your site and design you are using is very good.I am happy to find your distinguished way of writing the post. Now you make it easy for me to understand and implement the concept. I really loved reading your blog. It was very well authored and easy to understand. Unlike additional I have read which are really not tht good. ACCAI also found your posts very interesting. In fact after reading, I had to go show it to my friend and he enjoyed it as well!Thanks so much for this! I have not been this thrilled by a blog post for quite some time! You’ve got it, whatever that means in blogging. Anyway, You’re definitely someone that has something to say that people should hear. Keep up the wonderful job. Keep on inspiring the people.
Post a Comment