One of the important part of any Installer is integrating and defining launchers for GUI. This post will demonstrate adding entries in menu bar and panel, using scripts in context of creating a GUI launcher for IDEA IDE. currently IDEA does not come with any GUI Launcher but this does not mean that we cant […]
In one of the sessions in SpringOne2GX, there was a session on Uber-Scaffolding by Jean Barmarsh. The session was quite incredible and opened up a world of possibilities. We all know that the scaffolded code generated by grails is modifiable if we install the base templates. This is done simply by saying: [java]grails install-templates[/java] The […]
Hi, In my recent grails project, i came across the situation where i needed to convert the date in given timezone to the date in another timezone. I searched a lot about it and got many solutions for this problem and then i came out with a simple way to do so. Lets i have […]
We have been coming across a certain use case in a couple of projects that the Email credentials/settings used for sending email should be different based on the from address. This is because the applications act as software services that are used by different organizations, which operate in the same business. And each needed their […]
As we all know the default port for grails application is 8080, though we can change the port by running the application by following command [java] grails -Dserver.port=7070 run-app [/java] What if you want the application to run on 7070 by default. Grails provide a very easy way to that as well. You just need […]
Usually, when we deal with databases, we don’t face such kind of situation because we query database to get result-set in required order. But let’s say you have a List of objects that you want to sort on the basis of two fields. Let’s discuss it with an example. I have a list of Tasks […]
Still in my early days of using Git. Recently just to make sure that I have merged two branches and have pushed changes to QA server successfully,I often used command “find | xargs grep” .But to deal with this kind of situations Git provides “grep” command. Just as name suggests this commands searches for regex pattern […]
Server to server POST request can be made using Apache Commons HttpClient library. You need to include http-client jar file in project/lib folder and execute following lines of code: HttpClient client = new HttpClient() String url = “http://localhost:8080/test/person/delete/1” PostMethod method = new PostMethod(url) int returnCode = client.executeMethod(method) //Response Code: 200, 302, 304 etc. def response […]
Luckily, I got some time outside my usual obligations in the project, to learn something new and I devoted the time to getting up and running with cassandra . Getting starting up with it was a bit bumpy, as the case almost always is when you start with something entirely new. Lets get Started.. 1) […]
Hello friends, In my grails project, I was finding it difficult to write a query using criteria which can be read as ‘list all customers whose current account balance is more than minimum account balance of that customer’. The simplified form of the domain is given below : [java] class Customer { String name Account […]
We use internationalization feature in grails using message tag in GSP pages. However arbitrary Groovy/Grails (e.g. tags) code can not be used in JavaScript as they are not executed on server side. To overcome this I used the following way : Declare a JSON object in js file or any where else so that this […]
Audio tag is a html 5 element. You can play audio file on web page without any third party plug-in. This will work only on html5 compliant browser. Flash player is widely used to play audio and video files on web. There are some third party plug-ins likes Flash Player, QuickTime, Real Player etc available […]