Blog
Fetch data from multiple datasource in grails
17 Sep, 13

Fetch data from multiple datasource in grails

Please refer to my other blog titled “Configuring Multiple datasources in Grails” to know how to configure multiple datasources in Grails application. Now here I am writing about how to make finders work with multiple datasources in Grails. Lets say there...
Configure Multiple datasources in grails
17 Sep, 13

Configure Multiple datasources in grails

In my one of assignment, requirement was to support multiple datasources for the application. I searched through the web for the same and found that Grails 2.X.X support the multiple datasources out of the box. You just have to configure it in your DataSource.groovy...
Parse date in grails 2.x.x regardless format
17 Sep, 13

Parse date in grails 2.x.x regardless format

In my last project I had to parse the date but format was not fixed. I have googled for the same and found that grails 2.x.x added a new method in params using that you can parse the date regardless format. Code looks like : def date= params.date('myDate',...
Resume SCP connection
12 Sep, 13

Resume SCP connection

I am in the middle of moving a big database dump or a tarball from production server to qa server and the connection gets stalled at 90%. Imagine this to be a file whose size is around 500MB and i will have to login again and redo the whole process. In the meantime i...
Advance feature of ckeditor with grails
20 Apr, 13

Advance feature of ckeditor with grails

Hi, I would like to share few advanced things about ckeditor.If you want some basic knowledge and how to install it, go to its home page. CK Editor 1. If you want to use more than one ckeditor on a single page then name must differ. e.g.: [code lang="groovy"]...
Backbone.js Models
8 Apr, 13

Backbone.js Models

Backbone.js is a JavaScript frameworks for creating MVC-like web applications. Defining Model in Backbone.js Models can be created by extending Backbone.Model A model is basically a Javascript object, i.e. key-value pairs, with some helper functions to handle event...
Groovy count
8 Apr, 13

Groovy count

Groovy collections never fail to impress me. There are so many useful methods in Collections and count is one of them. Let’s take a look at 3 variants of this method ​def dataList = ['1','2','1','3','4','1','2','1','3','4'] count() method allows us to find out...
Grails Environment Setup Ubuntu 12.04
3 Apr, 13

Grails Environment Setup Ubuntu 12.04

Setup JDK in Ubuntu Steps: 1.Extract jdk to opt folder command: sudo unzip jdk1.*.zip -d '/opt' 2.Edit your .bashrc file command: gedit ~/.bashrc 3.Add the following lines at the end of .bashrc export JAVA_HOME=/opt/jdk1.* PATH=.:$PATH:$JAVA_HOME/bin export PATH...
Understanding Flash Scope in Grails
30 Mar, 13

Understanding Flash Scope in Grails

The flash object is a map and one of the more common use cases for flash scope is to store a message that will display when some form of validation fails. Storing a Message in Flash Scope [php]class SampleController{ def index() { flash.message =...
Grails Basics
1 Mar, 13

Grails Basics

This is my first blog post since i joined our Grails programming team. Let me try to explain MVC by breaking it down into simple components. Basically model is used to work with back-end. View is what gets displayed to user. Controller is one of most important place...
Simple pattern to use jQuery Plugins
4 Feb, 13

Simple pattern to use jQuery Plugins

There are lot of jquery plugin which we use in our projects like jQuery ui, Number Formatter, mask, select2 etc. One of the simple pattern is to use these plugins through out the application is to make a common javascript file which defines rules by id or class. For...