Amit Jain

Grails

Grails: caching using cron jobs

Hi, We needed to cache the result of a webservice. We were using grails 1.1.1 version and springcache plugin for caching. Unfortunately, current springcache version didn't work with grails 1.1.1. So we decided to cache the results using cron jobs, which will run in the background after every 1hr and store the results in a list, which...

21-Aug-2009

Technology

Alfresco : Render html code written in tinymce

Hi, We were using tinymce on alfresco labs 3 stable version. Lately, client came up with the new requirement to display video's in the page rendered from text given in tinymce. Since coupling between alfresco and current version of tinymce was so tight, we did not include the latest version of tinymce, which might have supported...

18-Aug-2009

Grails

WordPress plugin : workaround to get excerpt of recent posts & only published messages

While integrating the blogs using wordpress plugin in one of the project I am working on. I observed that using current version(0.1) of wordpress plugin, when we request for recent posts, it returns not only published blogs but also blogs with status as draft(which are not yet published). Along with that, we needed to show excerpt of...

07-Aug-2009

Grails

Grails : Mutliple Paginations Using g:paginate tag

In my project, we needed a support for multiple paginations on the same page. For the same, we maintained the state of offset of different pagination tags and let tag use its specific offset rather than the general i.e from param.offset. Assuming, we need two paginations on the same page. Lets assume the scenario where we have a...

23-Apr-2009

Grails

Grails : Upload and Render File

Lets discuss how can we upload a file and store it in a database, along with that how do we render it on the gsp page. I am taking an example to upload and render the image in this blog, though the code would be same for any other file. So Lets consider I have a domain class with the name Person class Person { . ...

16-Apr-2009