> Moreover, in Composite it says "All composites must call initWidget() in their constructors." Yes, and you should if you extend directly from Composite, because Composite doesn't contain any lazy loading behavior.
But the SimpleComposite contains lazy loading behavior and will automatically ask your subclass to create the widget when required. I have attached the SimpleComposite class, just extends from it and implement the create method.. I use it for years with success in several large gwt projects. To go one step further and make your widget better testable (my other remark above), I use a SimpleIsWidget class that extends from GWT IsWidget interface and can be created outside GWT (instead of classes that extend from Widget like Composite). I contains all the widget presentation logic that can be tested. For details, see this post: http://groups.google.com/group/google-web-toolkit/browse_thread/thread/87030a9ae66fe012/ I you take testing in to account right from the beginning and setup your widget testing-friendly, it will cost you a lot of work afterwards when testing becomes more important (my experience)... - Ed -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
SimpleComposite.java
Description: Binary data
