Plugins You can find out about all the publicly available Grails plugins.

Mootools Plugin

  • Tags: rich client, ajax
  • Latest: 0.1.3
  • Last Updated: 21 June 2009
  • Grails version: 1.1 > *
  • Authors: Ford Guo
0 vote
compile "org.grails.plugins:mootools:0.1.3"





To install the Mootools plugin type this command from your project's root folder:
grails install-plugin mootools
The complete core Mootools distribution is downloaded and installed under your project's /web-app/js/mootools folder.

Plugin version history

2009-06-22 0.1.3

  • upgrade mootools to 1.2.3
2009-03-11 0.1.1
  • upgrade grails to 1.1
  • upgrade mootools to 1.2.1
2008-11-27 0.1 First release


Mootools Plugin

This plugin provides integration with Mootools(which is a compact javascript framework). When installing the plugin, it installs the latest Mootools distribution in your application, and registers itself to be used with the adaptive AJAX tags. It also contains a helper tag to easily include additional Mootools javascript.


  • Basic Usage
  • More Usage

Basic Usage

Ajax via Mootools

To have the Grails' adaptive AJAX support adapt itself to Mootools (rather than the default of Prototype), add the following line in the head section of every GSP that needs it. (Note: you can not add it only to main.gsp in layouts.,see
<g:javascript library="mootools"/>

Thereafter the <g:remoteField>, <g:remoteLink>, and <g:formRemote> tags will utilize Mootools for the ajax calls. (See the Grails documentation, or "The Definitive Guide to Grails" chapter 9, etc.)

More Usage

include more Mootools

the Mootools framework support "core" and "more" releases,the <g:javascript library="mootools"/> only include the core release,so if you wanna include more ,you should do like this:
that code will include mootools-1.2-more-nc.js(in Develepment) or mootools-1.2-more-yc.js


provide a basic calendar UI based on Mootools,basic usage:
in the html header,and
<moo:calendar name="date1"/>
in the html body.

more calendar parameters:

  • format:default is "Y-m-d",more format see Calendar's Multi-lingual and fancy date formatting
  • value: a java Date value,default is current time
  • localeDays: the locale week days,default is
"['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']"
  • localeMonths: the locale months,default is:
"['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']"
  • offset: the first day of week,default is 0(means Sunday is the first)