Comment by [email protected]:

@OsorioJaques, we're still stumbling toward just how to use UiBinder  
effectively in a themed app. The last example, "Apply Different XML  
Templates..." is a hint of how it might be done, though its a bit over  
complex.

I expect we'll wind up with widgets that have default UiBinder instances as  
final static fields, GWT.created to allow substitutions; and which accept  
binder instances as constructor arguments to use instead. Something like:

{{{
   class MyWidget {
     public interface Binder extends Binder<Widget, MyWidget>{}
     private static final DEFAULT_BINDER = GWT.create(Binder.class);

     MyWidget() {
       this(DEFAULT_BINDER);
     }

     MyWidget(Binder binder) {
       ...
     }
   }
}}}

The ugly bit here is that it would effectively require the themed Widget's  
bound fields to be public and non-final, so we'll probably have to teach  
UiBinder some new tricks to make it more palatable.


For more information:
http://code.google.com/p/google-web-toolkit/wiki/UiBinder

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Reply via email to