GWT Composite best practices

I'm not sure if I understand what you are trying to do. But for all the Composite's I've written I've never overridden the initWidget method. Because Composite itself doesn't need to be initialized with a constructor, i.e. no need to call super() my constructors of widgets extending composite look something like:

public mywidget() {
  SomePanel p = new SomePanel();
  ....
  initWidget(p);
}

As a best practice, imo, only the widget extending Composite should call it's 'own' initWidget.


"GWT Conference: Best Practices for Building Libraries" gives a couple of tips. You should also look at the source of GWT and at the source of one of the libraries for GWT (like gwt-ext)

[EDIT] I just saw another option: suco. From the description:

A micro library that helps to maintain your GWT client code clean and modular.

Tags:

Gwt

Composite