Wednesday, April 14, 2010

Nitobi Excel Grid beaks in FireFox 3.6

Nitobi provides a JavaScript toolkit for a number of Web 2.0 solutions. One of them is a table Grid that supports "cut & paste" from Microsoft Excel sheet.
Basically, you can populate the table value by "cut & paste" from an excel sheet. It is a very useful feature, if you have a web form that needs to be filled in with data from an excel sheet.

Unfortunately, the functionality doesn't work in Firefox 3.6. The bad boy here is the proprietary API "document.getBoxObjectFor" provided by Firefox. This is not a standard API approved by industry and is available only in Firefox.
Firefox decided to scrap this API since version 3.6. The replaced API is "getBoundingClientRect", that is industry standard and is available in IE and Firefox previous versions as well.

Fixing the Issue
To fix the issue, replace the "document.getBoxObjectFor" with "getBoundingClientRect" carefully. It is not a straight forward replacement. The following code can help explaining how to do this replacement.

Old API:
var x = document.getBoxObjectFor(elem);//where elem is a sample DOM element

New API
var x = elem.getBoundingClientRect()

njoy
Sajith

Thursday, January 14, 2010

Can you believe Java API's can fool you sometimes?

Recently I run into an issue with streaming large files (specifically PDF files) from WebSphere application server (version 5.x and 6.x). I have a servlet that reads a large file (300 MB) from Application server and stream the bytes to the browser. naturally i have used a buffered output stream and used a buffer size as 1024 bytes. and every time 1024 bytes is written to the servlet output stream i used the "flush" API to clear the buffer and thinking it may send the bytes immediately to the browser. But unfortunately I have observed a strange error! can you guess what could be that?

Saturday, November 7, 2009

Cloud Computing Providers & Existing Infrastructure - Thoughts

I have attended the Recent Business Technology Summit on Cloud Computing held at Indian Institute of Science (IISc) Bangalore and got a chance to attend a session with Amazon Web Services team. The most interesting feature attracted me is the concept of "elastic IP". I wanted to share my thoughts on a practical situation that may come up when enterprises adopt to the cloud computing world.

Tuesday, December 23, 2008

OpenSSO and Liferay Integration - Life is not easier

Summary
Recently I tried to integrate Liferay 5.1.2 with OpenSSO Enterprise 8.0 but I was unlucky to complete it. The Liferay documentation explains a very simple steps to do the integration and is very easy to do. But when I run the Liferay server first time I got NullPointerException, then I figured out it was URL connection issue, I fixed it using a proxy server but then I got
ArrayIndexOutOfBoundsException, I am still debugging to find out the cause for this error.

Saturday, November 15, 2008

WebSphere Portal V4.x, 5.x, 6.x Home Page Design Flow!

Recently I noticed a design flow in WebSphere Portal that may leads to performance issue for portal pages. At first glance it looks harmless but when looked closely it revealed as a trojen horse. Ok no more suspense here it is.