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

Reply via email to