Grails

Executing linux shell command using ProcessBuilder

We often need to execute linux shell command from our groovy code. What I had to do in my project was to resize the image saved on file system. I was doing something like : [java]String command = "convert -adaptive-resize ${width}x${height}! ${sourceFilePath} ${destinationFilePath}" Process process=command.execute() process.waitFor() [/java] The above code makes a new image file […]

Divya Setia
Divya Setia
Read

Grails

Dbconsole in Grails.

So, Grails 2.0 was released a few days back and I upgraded my application to it as soon as I came to know of its final release and it rocks.!! Among the many things which are making a lot of noise on grails 2.0, there seems to be a lack of noise over the GUI […]

Sachin
Sachin
Read

Grails

Way to check if user has “Liked” the Facebook Fan Page or Not

Hi, In my recent grails project, i was working on creating Apps for Facebook Fan Page and needed to show data to the user in such a way so that if he/she has “Liked” the page, then the content would be different from the case when the user has not liked it. In simple words, […]

Vishal Sahu
Vishal Sahu
Read

Grails

Detecting mobile browsers in Javascript

In my recent grails project, I was working on mobile version of the application and needed to redirect users to the mobile version of our application, if they are accessing the application from any mobile device. I looked at various techniques/codes to detect the mobile device and redirect users to the specific URL. I encountered […]

Vishal Sahu
Vishal Sahu
Read

Grails

Install Apps on Facebook Fan page using API

Hi, In my current grails project, we are using Facebooks Apps for our application so that any user who wish to use that app, can attach it with his/her Facebook Fan Page manually by visiting the App Profile Page and then adding it to the Fan Page. Then the attached facebook app can fetch data […]

Vishal Sahu
Vishal Sahu
Read

Grails

Integrating Google plus in grails application

In my current project, i needed to integrate Google+ in the application using server-side API. Google uses OAuth2.0 protocol for authorization when our application tries to access the data. All we require is an access token to fetch data from Google using REST calls which serves data in JSON format. I implemented it using Web […]

Vishal Sahu
Vishal Sahu
Read

Grails

Grails productivity enhancer. The unsung hero ‘grails interactive mode’

Of late, I have been thinking about the popularity of grails interactive mode amongst developers. I found that though most of us are aware of this mode but we don’t use it as often, as it should be. Where should I use grails –interactive mode while developing in grails? The answer may vary from person […]

Mohd Farid
Mohd Farid
Read

Grails

Grails:Domain Design Via Intellij Idea’s Diagrams

Here is an example of how to design Grails domain class with Intellij Idea.For this we need to have blank domain classes. So lets say we created  three Domain Classes Company,Book,Author To see relationship diagram, Selected Domain Class, and selected tab Domain Class Dependencies.It should look like this Lets assume the relation that publication has many […]

Hitesh Bhatia
Hitesh Bhatia
Read

Grails

uploading multiple files with same name

Grails does not support accessing multiple file input fields with same name using params.fieldName. We need to use request.multiFileMap (available in Spring 3.0) instead of request.fileMap. The blog provides sample code to achieve this feature via Grails Filter.

Bhagwat Kumar
Bhagwat Kumar
Read
Services