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].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.