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:...