Overcomming MS’s Local Machine Zone Lockdown in GWT

GWT developers will notice an annoying problem running the basic default GWT app locally in web mode in IE every time i try this I get a red warning message: “Your web browser must have JavaScript enabled in order for this application to display correctly”. I had to allow the active content  in order to see the web app screen. running in GWT dev mode seems not to raise this warning message. So what’s this all about? it seems IE doesn’t like people opening JavaScript-laced web pages from the local drive for security concern. there is a detailed article here that speaks about this issue  of Microsoft blocking local domain for web applications .

The article above speaks about a new concept introduced by Microsoft called Mark of the web. i tried the method of Mark of the web by adding these two lines at the begining of my GWT html file :

<!-- saved from url=(0014)about:internet -->
<!-- saved from url=(0016)http://localhost --> 

but when i add these two lines and then compile GWT app and open the html file with IE the web app doesn’t show even though the warning message is gone . The reason probably is that -by default- a GWT app is loaded within an iframe, i.e. as another HTML page (*.cache.html), which doesn’t contain the MotW (Mark of the web).
to overcome this problem we can try using the “xs” or “xsiframe” linker, i.e. add one of these lines to our *.gwt.xml:

<add-linker name="xs" />
<add-linker name="xsiframe" />

Those linkers use *.cache.js” files, so the MotW in our host page should be enough. adding the linker to GWT xml module file makes IE warning message go away and I can run the GWT web app locally with IE.
but The “xs” linker has one drawback : it prevents us from using GWT DevMode . another annoyance that we can overcome by using two *.gwt.xml module files: one for web mode testing with ‘xs’ linker and the other without the linker for testing in GWT DevMode.

This may give you an Idea about the coding acrobatics one should go through to overcome the weired Microsoft decision to block totally the Machine local zone for web applications!

GWT KeyPressHandler getCharCode issues

Like hundreds of GWT developers I stepped into the annoying GWT KeyPressEvent.getCharCode() bug problem described here
To turn around this bug i tried using:


the purpose is to access the native event to get the unprocessed code. However if you try the


you will knock your head against browser-specific inconsistencies. For example the getCharCode() from NativeEvent works for me in FireFox 3 but it doesn’t work in Chrome . in Chrome if i press “ENTER” key




in FF3 the two values are equal (’13’).
It appears that a fix for KeyPressHandler was completed and reviewed for this issue . but it is not clear when we could expect it to be released. The fix appears fairly complex, with different browser-specific implementations.
it turns out that this change set is actually exactly what causes the current behavior in Firefox. See the rationale and a workaround/fix (i.e. only use getNativeEvent() when getCharCode returns 0).
the workaround above works but we need to replace ’13’ with ’10’ in the fix code portion below :

} else if (charCode == 13) {


using ’10’ instead of ’13’ in the else if conditional:

} else if (charCode == 10) {


with this new change code works both in chrome and FF3.

Hope this could be helpful for anyone experiencing these GWT keyPress getCharCode() problems.

Eclipse GWT plugin Installation issue

I have been encountering a problem installing GWT eclipse plugin using the update site :


using this update url seems to raise an error:

Unable to Read repository at http://dl.google.com/eclipse/plugin/3.6/content.xml.
Connection reset

A workaround that works for me is to replace gwt eclipse update site with:


Eclipse Helios Crash on Linux

I have eclipse Helios installed in a opensuse 10.3 box. it seems the eclipse editor keeps crashing eclipse application every time i type a dot ‘.’ to access object methods.
if you experience same problem you can try the following two fixes:

  • if you don’t have xulrunner package then install it (example using Yast2 in opensuse).
    make sure you only install latest xulrunner version. if you install two different xulrunner versions in your linux OS the two versions might conflict and cause eclipse to crash again. this was my problem. when i removed old xulrunner 191 and only kept xulrunner 192 then eclipse helios stops crashing and works well.
  • The second fix (that doesn’t require to install xulrunner but seamonkey) is to specify to the Java VM the location of xulrunner .
    To do this :
    1-Edit file : ~/eclipse/eclipse.ini
    2- add the following text below the ‘-vmargs’ line :


    For further information on this second fix see this thread discussion.

Java's Age of Anxiety

The collapse of Sun Inc. , steward of Java technology, was a saddening and frightening event. After Oracle bought Sun and addressed java community with their optimistic plans for advancing Java; most community looked forward for happier times. they hoped that java developers lives would return to normal after the trauma of Sun collapse. they hoped that once again Java development would make sense in the familiar pre-Oracle terms of openness, community participation and freedom. These hopes were in vain. The Break of Sun, dismantling of multiple open source java/Sun based projects and the patent war that waged between giant software building competitors had mangled too many things beyond repair. Java Development would no longer fit neatly into the old molds.
Great numbers of us feel themselves increasingly adrift in a strange , uncertain and uncontrollable world. even the father of Java has expressed these same feelings in very similar words : Quite the firestorm!. No doubt Java is living now in an age of anxiety, an age of continual crisis.

In fact i used Java as an example to express a wider and broader sentiment of the return of the so called Age of Anxiety. In almost every area of human experience today , people are searching for ways to put meaning back into life. am i the only one who have this sentiment? or is it a realistic fact?
I hate to be pessimistic but that’s how i see the world today ;and i hope deeply I’m wrong.

SugarCRM and Java Integration : Introduction

Overview Of The SugarCRM Platform:

SugarCRM is a widely adopted Customer Relationship Management System. the product is basically built on the LAMP (Linux, Apache, MySQL & PHP) open source stack. However, ever since the version 4.5 release in August 2006, the application also runs reasonably well on Microsoft’s Windows Server operating system and SQL Server database.
SugarCRM is released under the Mozilla Public License and the GNU-GPL license and has taken a lead among the approximately 20 open source CRM applications.

In my opinion SugarCRM company Has adopted a modern philosophy in software development .The company opted for a strategy to open their technology to complementors and create economic incentives (such as free or low licensing fees, or financial subsidies) for other firms to join their CRM ecosystem and adopt the SugarCRM platform technology as their own. In fact SugarCRM firm followed two main strategies in their software development model .The first strategy is based on the mantra of “free, but not free”. SugarCRM give one part of the system away to some users (community or the general consumer) but charge others (corporate users). However it seems they didn’t opted for the strategy of “open, but “not open” make access to the interfaces easily available but keep critical parts of the technology proprietary or very distinctive. Instead they choose to give complete access to the underlying source code , allowing clients & companies to customize, integrate and extend the SugarCRM application with in-house technical resources to control their own requirements.

By looking to their SugarForge.org web site, you can see the wealth of projects that have been developed as extensions or Integrations to the SugarCRM system. Available source code, good documentation, training programs and a relatively active community provide the hallmarks for a successful open source effort.

SugarCRM Integration:

While the core of SugarCRM application is designed to manage a Company’s Customer Relationship, it is very likely that at some points the company might feel the need to do some integration with its CRM system. For example it might integrate its phone system to automatically make entries to SugarCRM when inbound or outbound calls have been made, connect registration of a web application with sugar system to create new accounts automatically to SugarCRM, connect a LIMS in various ways to Sugar ..and so on…

I had the chance to be involved in a project to Integrate SugarCRM with OpenOffice.org suite applications using the Java Programming language. This project was first funded by Appinux.com who hired me to develop a “OpenOffice Addon for SugarCRM. The project is open sourced and freely available to sugarCRM community.
Unfortunately -due to funding limitations-I could only release a minimal version of the plugin which I’m hosting at sourceforge.net : “OpenOffice Addon for SugarCRM
I’m now in charge of the project & have future plans to enhance it with more features and better design. Due to luck of funding and limitation of time, my progress might be slow in this project . but i’m committed to bring it to a decent degree of maturity in future. Of-course Java Developers are welcome to join the project if they are interested!

This being said , I’m planning to blog every now and then about the “OpenOffice Addon for SugarCRM project ; covering topics on SugarSoap API , Sugar and Java Integration , Sugar and OpenOffice Integration and other topics that might raise interesting during the ongoing project development process.

In the next article I’ll introduce the SugarSoap In Java Tutorial. SugarSoap is the SOAP Based SugarCRM webservice which enables Java developers to connect to Sugarcrm and interface with the variety of sugar services exposed by SugarSoap API.