Antoine, I think the Appearance plan is closer to what you want than you realize.
In particular, you should know that we're working on a change to UiBinder to allow it to generate SafeHtmlRenderer instances, and then to allow those instances to manage cell event handling. We'll share a design proposal soon. That said, there is still too much boilerplate and hackery required to make a new one of these things. It does seem like we should be able to require a lot less mindless configuration than we do. Making FooWidget.java, Foo.css and Foo.ui.xml just work by existing, perhaps allowing me to GWT.create(FooWidget.class) with no extra configuration, seems like something we should make an explicit goal. On Wed, Mar 23, 2011 at 6:31 AM, Jens <[email protected]> wrote: > With the appearance pattern your proposed Theme class would be the same as a > GWT module containing all the deferred bindings for changing all the > appearance classes of all widgets. So you would inherit this theme module > and you are done. I think you could also overwrite a specific deferred > binding in your app module if the compiler always picks the last matching > rule. Or am I missing something? > But indeed it would be nice to have a UiBinder template (or a general xml > template) which defines the DOM structure of a widget instead of a render > method. That way we could pass the widget.ui.xml and its widget.css file to > a designer and the developer only has to deal with the appearance class and > event handling. > But with a separate xml template I guess it may be difficult for a developer > to implement the onBrowserEvent method because he can not assume any given > DOM structure for a widget (each theme may have changed it drastically). So > as you pointed out, event handling will be the major issue. > But maybe there is a solution for it? I really like the idea of decoupling > the DOM structure and having a separate xml file for it. > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
