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

ModalBox Plugin

  • Tags: rich client
  • Latest: 0.4
  • Last Updated: 02 December 2009
  • Grails version: *
  • Authors: null
3 votes
compile "org.grails.plugins:modalbox:0.4"




This plugin adds the ModalBox to your Grails applications.

ModalBox ( is a JavaScript technique for creating modern (Web 2.0-style) modal dialogs or even wizards (sequences of dialogs) without using conventional popups and page reloads. It's inspired by Mac OS X modal dialogs. And yes, it may also be useful for showing larger versions of images. :-)

Current Version (0.3)

  • You can open standard ModalBox dialogs.. ;-)


grails install-plugin modalbox


ModalBox Plugin needs the following attributes:

  • controller/action/id/url (required - the url to open. Use parameters as per Tag - createLink)
  • title (required - the title in the popup)
  • width (required - the width of the popup)
  • linkname (required - name of the link. Alternatively place complex markup in the body of the tag as per 2nd example)
  • event (optional - the javascript event that triggers the dialog. Defaults to "onclick", but can be set to "onmouseover" etc)
You have to include <g:javascript library="application" /> and <modalbox:modalIncludes /> in the head of your template to include the required css and javascript source.


<g:javascript library="application" />
<modalbox:modalIncludes />

<modalbox:createLink url="akopopup.gsp" title="Hello Grails!" width="600" linkname="This is the Link" />

or (more dynamically)

<modalbox:createLink controller="book" action="show" id="${}" title="Show book!" width="500">Book Lorem ipsum</modalbox:createLink>



2008-08-17 Released version 0.3. Bugfixing-Release

2008-07-21 Released version 0.2. Now you are able to use also the "controller" and "action" attribute in the <createLink> tag - the old way is also working. (see the example for more information - thanks to Jason Morris!).

2008-05-29 Updated Documentation; you must also include <g:javascript library="application" /> in the header of your gsp.

Plugin Author

Alexander Köhn

[email protected]