Skip to main content

Posts

Partial form submit with Grails and JQuery

At times you would want process a part of the form and refresh the page with the results obtained from the partial form submission. Given below is a screen shot of the typical use case. It is a form used in a sales application. Take a look at the section "Particulars" in the screen. The fields - Item, Unit Price, Quantity, Discount%, Tax% are editable and fields - Total Discount, Total Tax and Grand Total are calculated as the result of clicking "Calculate" link in this section. There is on option to add multiple rows to this table by selecting "Add" in the first cell of this table. The section of the code used for the table "Particulars" is given below.

Grails - Import data from excel spreadsheets

Importing data from excel spreadsheets to a grails application is quiet simple. You could your favorite spreadsheet processing libraries for Java like Jexcelapi or Apache POI . In this example, I used Apache POI. Step1: Copy the required libraries to libraries/lib folder of your grails applications. Step2: Create a grails controller class. Eg: Uploader

Clicktale with Blogger/ Blogspot

I am curious to know how visitors are finding my blog content. I heard lot of good things about this tool, Clicktale , and I implemented for my blog. Just two steps to get started: 1) Create an account with Clicktale and get the tracking code for your domain. I used http://sguthula.blogspot.com as domain. The instructions to get the tracking code are simple and easy to follow. 2) Login to your Blogspot account. Choose "Layout" and "Edit HTML" as shown in the picture below. Copy the tracking code provided by Clicktale. CAUTION: Take a backup of your html in the "Edit HTML" box to revert back to your previous state of the blog when you do not need the tracking.

Overlay Graphs in Grails Application - Open Flash Chart

Ofchart plugin available for Grails, makes it is easy to integrate Open Flash Chart. The plugin can be downloaded from http://grails.org/plugin/ofchart The documentation is available at http://mybytes.wordpress.com/2009/03/09/grails-open-flash-chart-06-is-out/ Though the Open Flash Chart has number of chart options - ofchart plugin documentation has limited information. I believe the documentation work is in progress and may be available anytime soon. An inquisitive mind can experiment and try to accomplish most of the features in Open Flash Chart. Best place to start is to read the API documentation A simple example I tried - overlaying a Bar chart and Line chart on a single Chart. It requires a Grails controller and a GSP as listed below. We can include the "action" to render the chart in any of your existing controllers.

How software project development teams slip deadlines?

Poor quality of the project estimation is often attributed as the main reason for missing deadlines in most of the software projects. Slipping deadlines is most common and even management teams anticipates this event and accordingly negotiate pricing with their customers. As this happens to be "known Risk" and corrective actions are taken upfront, the people involved in the wrong estimates are not penalised. Even if they do, it is only going to impact their "annual" appraisal. They might slip just "one" grade. Most people try their best to arrive at right estimates but there are few scenarios I will try to discuss later in this post that may impact the success. On the otherhand there are certain cases where there is higher propabiliy of failures. 1) Manager/Project Lead, who is estimating the project, divides the task into various functional tasks, allocates tasks to individual developers to provide estimates. He/She uses their prior experience to adjust ...

Bind Exception, Netbeans 6.7.1 and Jetty server running Grails applications

While developing Grails applications on Netbeans IDE 6.7.1, I noticed an issue with the inbuilt servlet container, Jetty that is packaged with Netbeans IDE. Sometimes, Jetty server wouldn't stop even if we stop from the "Services" tab of the Netbeans IDE. It might show that it is already stopped under the "Services" section while it is still running in the background. Any attempts to Run the grails application after this event, will fail. You may get errors saying "Port already in Use" or "Address already in use: bind". The environment is windows/xp/vista. I'm assuming Jetty is using Port 8080 by default. The exception message in the console says " Server failed to start: java.net.BindException " Run the following command from the command prompt. netstat -o -n -a | findstr 8080 You may get output as below: TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 7972 In the above line, the PID(Process Identi...

Paging techniques for applications using google appengine for java

Paging technique is implemented in tons of websites and there are many libraries, both opensource and commercial components, that are easy to integrate into any website. Ajax based tables (excel like) with navigators for paging to and fro, are integral part of RIA applications. Why do we need a different technique to implement paging for Google appengine application when so many components exists today? To answer this, we need to understand two aspects. 1) How majority of the "paging" components are designed for usability? 2) How data is stored and retreived in applications that use Google Appengine? I used my favourite "paging" library Jqgrid to explain the techniques. The component is based on JQuery and is well documented. Click the link for jqgrid demo The above picture shows, - options to navigate page by page - total number of records available - total number of pages etc