Sign in to edit and +1 items.
Login required
Download

Grails Javascript Converter.

(0)
Author(s) Khurram Ijaz
Current Release 0.2   (1 year ago)
Grails Version 1.1.1 > *
Tags ajax  code generator  javascript  jquery 
Dependency
compile ":javascript-converter:0.2"
Last updated by admin 1 year ago
grails install-plugin javascript-converter
Last updated by admin 1 year ago
Download manual and demo application from project home page

The plugin uses groovy syntax to generate javascript code in Grails controllers in response to AJAX requests.

//Put this at the top
import grails.converters.Javacript
//now in controllers when rendering use this.
render( {
   jQuery("#status").hide();
   jQuery("#main").html( g.render( template:"list", model:[list:list]) )
} as Javascript)

will render as

jQuery("#status").hide();
   jQuery("#main").html( "...rendered template content..." )

or if you like $ syntax

//Put this at the top
import grails.converters.Javascript
//now in controllers when rendering use this.
render( { jq ->
   jq("#status").hide();
   jq("#main").html( g.render( template:"list", model:[list:list]) )
} as Javascript)

will render as

$("#status").hide();
   $("#main").html( "...rendered template content..." )

Installation

grails install-plugin javascript-converter

Manual

Can be downloaded from project site. Here is a direct link http://grails-javascript.googlecode.com/files/manual-0.2.zip

Demo Application

Can be downloaded from project site. Here is a direct link http://grails-javascript.googlecode.com/files/javascript-demo-0.2.zip

Last updated by admin 1 year ago
In case of any errors/bugs that you find, please report here
Last updated by admin 1 year ago