Hi! We had a myForm.html file (accessible only from the third party) where in we needed to update the form containing input/select/check boxes with the values we had in the request params and then render it. So we used xmlslurper for the same. Without much effort, it just worked great. Following is the code we […]
In one of the projects recently, we had to generate the thumbnails dynamically from the client-provided images. We decided to use the Grails plugin named: ImageTools. This is a very basic plugin but provided very quick and stable solution to our use-case. You can read more about the plugin and how to install it here […]
If you want to keep track of the errors and exceptions on the view, after making an ajax call, then this might be something of your interest : jQuery().ready(function() { jQuery.ajaxSetup({ error: function(x, e) { if (x.status == 0) { alert(‘You are offline!!\n Please Check Your Network.’); } else if (x.status == 404) { alert(‘Requested […]
On a project, we needed to configure the redelivery mechanism for the JMS queue. That is, a poisonous message was to be sent to a Dead Letter Queue if a set number of attempts failed, so that the other messages in the queue could be processed. The JMS Plugin version used was 0.5 Merely configuring […]
In my project we needed to generate pdf reports. The tool we used to design reports is IReport 2.0.5 & the plugin used is grails jasper plugin.The plugin works fine with simple reports but fails when it come to complex report which uses subreport.The problem is that the plugin compiles .jrxml file to .jasper file […]
Recently I encountered a StaleObjectStateException which said “Row was updated or deleted by another transaction.” We were just updating multiple objects of the same domain inside a loop. So we used executeUpdate statement instead of myClass.save() method to update the records, which worked. ReserveAccount.executeUpdate(“update ReserveAccount set currentBalance=(:balance) where id=(:id)”, [balance: currBalance, id: reserveAccount.id]) Later we […]
In our current project we are using jsecurity plugin and some of our bootstrap code required a user to be logged in. I found a nice blog http://www.tothenew.com/blog/?p=335 on this topic but it was using groovy metaprogramming to override the normal behaviour of SecurityUtils.getSubject() which is suitable for test environment. After a few minutes of […]
Recently I have faced a problem of monitoring all the ajax calls. Based on the response from server I have to perform some task depending on the contents of response. If the html response contains some text input field, the first text input field should be automatically focused otherwise leave the response as it is. […]
Recently I migrated my project which is in development from grails version 1.1.1 to grails 1.2.1 using grails upgrade.. and it worked like charm, though there were some issues with a couple of plugins, just upgrading their versions took care of them. The problem came while submitting the forms. we had created some forms and […]
Recently I encountered an error , while working on iReports , iReport it was not able to compile .jrxml file to generate .jasper file , whilst it used to show compile time. Error : Compiling to file… ./<filename>.jasper -> /usr/share/iReport/bin/<filename>.java Errors compiling ./<filename>.jasper. net.sf.jasperreports.engine.JRException: Error saving expressions class file : /usr/share/iReport/bin/<filename>_1267071292035_83340.java Compilation running time: 80 Basically I found two way out this […]
Implementing search functionality on the keyup event using ajax has one pitfall. It can bombard our server with unnecessary ajax calls. So it becomes imperative for us to introduce some delay between the ajax calls. One way to implement it will be to make an ajax call after some delay(say 500 ms) after the first […]
In my project we needed to generate certain pdf reports. Then while exploring the options available, I encountered a PDF plugin, which renders gsp page and returns the PDF report. It looked good for the simple reports but may not be a good idea if the report are complex. Then with the help of one […]