Geofencing

Geofencing is actually a process of creating/defining geofence on the maps. It can be either circle,rectangle or n-sided polygon shaped. Geofence is nothing but a virtual boundary that is drawn on map. Geofence have many applications like:   If a vehicle moves...

Spring annotation in Grails 3

I was recently working on a grails project and found that it is possible to read the configuration/properties defined in application.yml using spring annotation in Grails 3. Its possible in Grails 3 because it uses Spring boot under the hood. Here is an example:...

CSS Wildcard characters

Hello Everyone! Recently, I was working on a UI task and I had to give CSS styling to a div on the basis of ID. The div was being generated dynamically(with dynamic ID/class) using jquery mobile. I observed that the ID contained some identifiable pattern(along with...

Handle session timeout in Ajax request

Recently, I was working on a grails application in which I wanted to handle session timeout when ajax request was fired. When session expires in case of normal request, the browser redirects to login page which is handled by spring security.   In case of Ajax...

Test forward method of Controller

This blogpost titled “Test forward method of Controller” explains the technique that can be used to test forward method of controller. Recently, I was writing test cases in grails to test an action : def performAction() { forward(controller:...

Working with Stripe in Grails

In a recent project, I got a requirement to integrate a Payment gateway. I choose Stripe as it is PCI Level 1 complaint which is the most stringent level of all 4. Following are the steps to integrate stripe in Grails.   Create an Account on Stripe. Goto Account...

Using dynamic path in Jasper Report

In this post, I will explain how we can add images using dynamic path in Jrxml. First of all, we need to add the image component to JRXML file. Click on Window Menu> Palette and then drag-drop the image component on the designer window.   Once we add image...

Persist Content loaded via AJAX

Hi Folks! Recently, I was working on a web application and I was thinking of making extensive use of AJAX so that the whole page would not have to be loaded again and again. These days single page web applications(SPA) are becoming quite popular. We load a main page...

Power of Liquibase

Hi Guys! I am back with a new blog post titled “Power of Liquibase”. This post is meant for those who have a basic idea of using Liquibase. As we know that Liquibase is used to keep a track of the changes that we apply to the database. It not only keeps a...

Controlling Domain Persistence using mapWith property

I am back with a new blog post titled “Controlling Domain Persistence using mapWith property”.In Grails if we want to make certain fields non-persistent we can use the transient keyword like this: class DomainClass { static transients = ['field1',...