Thanks Chris! Thats work for me.. with little changes..
in fact , i was kind of implementing an observer pattern for the uis.. and the things get complicated wuth the uibinder.. :s in my implementation.. i have a "AbstractComposite" extending from composite who receives a Main Presenter wich receives an eventBus... the solution went fine when i build "everybody" including Widgets in Gin module now.. my injected dependency in Widget was children widgets..and now with the provided annotation binder do not create things by its own. thanks! On Thu, Mar 4, 2010 at 3:19 PM, Chris Lercher <[email protected]>wrote: > Hi Fabio, > > I think this should be possible: > > public class MyComposite extends Composite { > > private static MyCompositeUiBinder uiBinder = > GWT.create(MyCompositeUiBinder.class); > > interface MyCompositeUiBinder extends UiBinder<Widget, MyComposite> > { > } > > @UiField(provided=true) > Button button; > > @Inject > public MyComposite(@Named("myButton") Button button) { > this.button = button; > initWidget(uiBinder.createAndBindUi(this)); > } > > } > > Then you'll only have to bind myButton in your module, and create the > button in the ui.xml like this: > > <g:Button ui:field="button"/> > > Chris > > > On Mar 4, 7:05 pm, Fabio Kaminski <[email protected]> wrote: > > Anyone has an elegant solution merging GIN DI + UiBinder? > > > > how can UiBinder created objects(even "provided=true" ones) be visible to > > GIN Injector and vice-versa? > > > > or GIN DI cant work anyway on the UiBinder ground ? > > > > like.. if i have a singleton..created by GIN and want that the UIBinder > DI > > can get the same object > > to inject on its widgets. > > can i have this?? > > > > how the two apis can work together elegantly? > > > > Thanks > > -- > 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]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- 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.
