Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Groovy
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
grails-app
web-app
.gitignore
GrailsRemoteMethodsGrailsPlugin.groovy
README.md
application.properties

README.md

grails-remote-methods

To install plugin add

compile ':grails-remote-methods:0.2'

to the plugins section of your BuildConfig.groovy.

Usage:

  1. Define on gsp (all attributes are optional, you can specify remote methods in controller as static property 'remoteMethods')

    <rm:defineRemote controller="index" methods="['user_info']"/>
    
  2. Call any remote method from your js like this:

    index.user_info(
        {test: '123'},
        function(data) {
            console.log(data);
        },
        function() {
          console.log(arguments);
        }
    )
    

(errror function is optinal)

Something went wrong with that request. Please try again.