Learning Flex

I have implemented the majority of the edit grid functionality for gwt-yui-ext. I have a hit a snag though and keep meaning to get back to it.

For now, I have been working my way through Adobe Flex 2: Training from the Source. I’m about a quarter of the way through so far and reckon it will take me another two weeks to finish since I am only getting about an hour each evening to look at this.

The reason I started to look at Flex was because of my trial implementation of the Flex/GWT integration through FABridge. I figured I’d be better off knowing it well before I tried to skin some of the actionscript classes using GWT. Whether I’ll ever try this or not is debatable but in the meantime Flex has caught my interest. My only gripe so far is that FlexBuilder 2 is horrendously expensive! Particularly in the UK. I can’t afford it, so once the trial is up it’s back to the command line for me.

gwt-yui-ext #3

There is a big update in the offing. I am working to get this into shape.

I really like the Google Code interface but can I just complain that it is ridiculously slow. The svn interface is like using a 56k modem and the web interface isn’t much better. I don’t know what sourceforge is like but attempting to use the svn interface is a frustrating experience.

gwt-yui-ext update #2

I have made an important update to the gwt-yui-ext library. The grid control wasn’t much use if you couldn’t click on it and select items for editing etc so I have implemented the GridEventManager and GridEventListener classes. These will let you listen for clicks, double clicks etc and response by defining your own functions sub-classed from the GridEventListener.


GridEventListener rowListener = new TestGridEventListener();
rowListener, grid.getGrid());

The onRowClick function in the class TestGridEventListener will get called when the use clicks on a row.

I have to make some changed to the example to extract the row data when the row is selected or double-clicked to show this off. The example at the moment merely shows a window alert with the contents of the first column.

The important point about this is now I can move the component parts of the gTraffic site into the yui-ext framework which will show this off better than the sample app ever could.

gwt-yui-ext – update #1

Some minor updates:

– Added default column sorting types for grid.
– Added ability to define custom formatting for columns.


gwt-yui-ext is my (partial) wrapper around (some) of the yui-ext components. The yui-ext library is built upon the YUI library by Yahoo which is a javascript library of routines for page layout and animation (among other things). Jack Slocum has taken this and developed an amazing set of controls including a layout with sliding panels and a blinding grid control which could take on any commercial library. So… I like his controls and I thought was it possible to wrap them in a way that GWT could use them? Well the answer is yes but now I am not so sure it was really worth the bother. On reflection I don’t think this is _entirely_ what Google had in mind for their JSNI mechanism. I suspect they were hoping that people would write cool controls like this in GWT. Well it aint happened yet so I suppose some of the gwt-yui-ext will suffice in the meantime.

I started off on this with the BorderLayout control and fairly quickly got something to work. A lot of debugging later I realised that basing the control upon a ‘ComplexPanel’ would do a lot of the things that I was having to reproduce in my code. One rewite later and it seem to be sortof complete with a few funnies hanging around:

– The right panel doesn’t seem to force a resize of the central panel unlike the left??
– Grabbing the split-panel resize bar is a bit hit and miss??

I was going to publish this then I had the thought ‘who actually wants this layout’. I can’t see it anywhere other than Jacks blog, where it integrates well, but I was still having a kind of ‘what’s the point’ feeling.

Enter the ‘grid’ control. Everyone loves a data grid. The yui-ext grid is a cracker with lots of functionality and looks the business.

So, I have made a start on this. The sorting function for the columns is the last piece of the jigsaw but I have held back to have a think about how to do this in a way that can hook into GWT and let people write their own.

Here is the demo. Either it’s good idea or a bad one. Developers please mail me at


Also, if you are interested in getting involved in implementing a particular feature then mail me.