Thursday, November 20, 2008

ColdFusion string operations

A few string operations in Coldfusion: 1) Mid: determines the subString between the given startindex , and a total of n characters. Mid(String, startindex, n) 2) Left : Substring containing the first n characters Left(String, n) 3) Right : Substring containing the last n characters. Right(String, n) and strings can be concatenated using &

Thursday, November 13, 2008

Adding events to widgets

Well in gxt, if a component or a widget doesnot have an event that is required to handle then the developer can actually add the event to the DOM and then can handle it. The el method of the widget should be called first and then try to add the events to the Events list using the l.el().addEventsSunk(Event.ONCLICK);
The Event class is the one in GWT. 
And then the event handler can be handled for this event as a regular listener.

Tuesday, November 11, 2008


I had the problem of placing a different widgets at the same location with only showing up at a particular time. I was using the cardPanel which is just a layoutContainer with a card layout. The widgets as such cannot be added to the cardPanel but each of them should be placed in a panel and that panel should be added to the cardPanel. cardPanel.add(contentPanel); The user can make the widgets active by using the setActiveItem method in the cardPanel. cardPanel.setActiveItem(contentPanel); Then the widgets should be rendered, using the layout method of the cardPanel, which actually renders all the children of the cardPanel. cardPanel.layout(); It should be understood that the widgets cannot be added to cardPanel as such but they should be placed in another panel