Chandan Luthra

I am an Open Source Enthusiast...A great lover of Java Technologies. Apart from server side coding and configurations, I love to optimize applications on the client side (browser) as well. I also co-authored a book on Firebug. I am a software developer by profession and Heart. I Love to code using Groovy and Grails with JQuery sauce on it to beautify an app ;)

Grails

Groovy & Grails eXchange 2014, London: Day 1

The day finally arrived for which we crossed couple of continents. The onening day of the GGX conference went beyond our expectations and had just the right blend of enthusiasm from the presenters and the audience alike. All the while we were travelling to the venue, we had an inkling that something new was about to be experienced.. and...

12-Dec-2014

Technology

Sleep in Jquery.

Few days earlier, for achieving "Thread.sleep()" functionality in Jquery, I use javascript's "setTimeout()" method. I found that Jquery has a finer and better way for doing this, The "delay()" method Example: If I want to show an element after 1000 mili seconds then I would do it in following way: $("div...

15-Dec-2010

Grails

Grails way for rendering the GSP templates: The tmpl namespace.

Today while working on a project, I paired up with my colleague (Uday)  and we found that we can render a gsp template in a different manner also. Grails provide us a "tmpl" namespace for rendering the GSP templates. The old way that we use to render a gsp template The other way for  rendering the template. Like me,...

01-Oct-2010

Grails

Changing the behaviour/Scope of Services in Grails.

Sometimes our services are so tightly bound with the Controllers that we actually think that a new Service instance should be get created on every request or the member variables in the services can be defined only for the current user. But by default the Services are "singleton" scoped which means that clients of a service only ever use...

15-Sep-2010

Technology

JavaScript Profiling through Firebug’s Console API.

Sometimes we want to know which line of codes or methods in the JavaScript is taking time which slows up the page load. Many times our browser gets hanged due to the execution of JavaScript. Firebug allows us to profile the JavaScript. Following are the two methods that are used for profiling JavaScript: console.profile() ...

16-Aug-2010

Technology

How to send a POST request in window.open() function of JavaScript.

Hey, Recently, I need to show some printing stuff using window.open() method of JavaScript. I got stuck when the implementation demands sending POST call to the server for generating the print view. I googled a lot and found few JavaScript code snippets that provides some workaround for doing this stuff. Finally, I found some cool...

14-Jun-2010

Grails

Reloading a GSP in test & production environment.

In one of my project I need to generate GSP (groovy server pages) on the fly and write them on the file system. There was a quartz job that updates the GSP page on regular intervals. The problem was, this functionality worked flawless in the development environment but fails in test and production environment. In test and production...

15-Apr-2010

Grails

Grails Functional Testing: Uploading a file using G-Func plugin

At Intelligrape we face many challenges while developing web-applications. One of the small challenge was to test the web pages that contains file input field <input type="File">(to upload files). After few hours drilling with Canoo webtest plugin I decided to use the new fabulous plugin, Grails functional Testing by Marc Palmer...

22-Apr-2009

Grails

How to use $.getJSON() method of jQuery with grails?

How to use $.getJSON() method of jQuery with grails? Retriving a JSON string from Grails is very easy. You have to just write the following in your controller's action Let me explain you with an example of populating a HTML table using JSON response: In this example, we have table with columns - name,address and gender. We want the...

02-Mar-2009