Grails

ISO-8859 Based URL Encoding in Grails

The web application we are developing at the moment interacts with quite a few third party services via REST calls. Most of the third party services use UTF-8 encoding and there was no issues with using the URLCodec, that grails provides out of the box. However, one of the applications our application interacts with, was […]

Grails

How to Recover lost Commits in GIT

Recently while working on Git I had accidentally lost my commits. But since Git has a fantastic revision control system, it remembers what I committed. In other words, it records where its HEAD is every time user commits. Here’s is the example of how I got my lost commits back. Below are my 5 recent […]

Grails

Interaction based testing using Spock in Grails

In my recent project we are using spock test cases to test our application and spock really made it easy for us to test those things we were not able to test in Grails Unit Test or testing such things dont look so intuitive in Grails Unit tests . One of the powerful method of […]

Grails

Handling Instance Based Security

In my current project, we were required to implement Instance Based Security. The idea was to find a clean solution separate from the main business logic of the application. We took a clue from the Spring Security Plugin to use the Annotations to do our job. All we wanted to do was to develop annotations […]

Grails

Implementing saveOrUpdate() for domain classes

Some times in our applications, while saving a domain object we may desire to have a save or update behavior on the basis of certain fieldSupp Suppose we have a domain class Personwith following definition: [java]class Person{ String name String source String description def static saveOrUpdateBy = [‘name’, ‘source’] } [/java] Details of a person […]

Mohd Farid
Mohd Farid
Read

Grails

Paypal Integration : Auto redirecting to application after processing payment

Hi, In my recent grails project, i needed to return back to the application after processing payment at the paypal website. I searched a lot about it. Then i found the solution to do so and thought it worth sharing. Here are the steps i followed:- 1. The Paypal button:- This is the code for […]

Grails

Using transactional behaviour with Gorm

All communication between Hibernate and the database runs within the context of a database transaction but the Session itself is lazy in that it only ever initiates a database transaction at the last possible moment.Given that there is a transaction, you would think that if something went wrong, any problems would be rolled back. However, […]

Grails

Remote-pagination : support for javascript events added

Hi Friends, I have released the version 0.2.5 of Remote-Pagination, which now provides the support for all the events as supported by grails tags like remote-link.  Events supported are listed below : onSuccess  – The javascript function to call if successful onFailure  – The javascript function to call if the call failed on_ERROR_CODE – The […]

Amit Jain
Amit Jain
Read

Grails

InLink tag : To provide links to important words in the contents.

Hi , this is a very simple but yet useful tag to provide links to important words in the content given in between the starting and end inLink tag. Taking an Example of contents :- “No One Killed Jessica is a 2011 Hindi film starring Vidya Balan and Rani Mukherjee , produced by UTV Spotboy and […]

shweta
shweta
Read
Services