Sunday, November 23, 2014

Bootstrap CSS templating in Grails.

There are three ways of integrating Bootstrap CSS templating to Grails.

1. Using twitter bootstrap plugin
2. Using kick start bootstrap plugin
3. Manually downloading boostrap source files from and putting the files in grails-app/assets (for Grails 2.4.3 and above) or in web-app/css and web-app/js folders

There is one good blog post about using bootstrap as a default template by Iraklis at (althought the blog entry is old)
Another video by Joe Rinehart explains how to integrate Twitter Bootstrap into a Grails application (can be found at

The github project of twitter-boostrap plugin at is also a good help.

You can also look at my simple blogging system developed in grails which uses Bootstrap 3 at

Importing your git repository from bitbucket (or any other VCS) to GitHub

Go to 

 1. and enter the url of the old repository
 2. give it a repository name (or it will import the name automatically)
 3. select public vs private repo
 4. Click import

Good luck!

Friday, November 21, 2014

Edit/Update Page Implementation in JQuery and Grails

I have a page with a form where a user enters first name and last name.

When the 'Edit' button is clicked, I want the button's name to change to 'Update' and the textboxes to become editable.

Then, when the user finishes editing the fields, I want to call a controller method in Grails.

What I want is to call the controller method WHEN 'UPDATE' BUTTON IS CLICKED (NOT WHEN 'EDIT' BUTTON IS CLICKED).

Here is the solution!