Friday, July 30, 2010

Can Gin inject eventBus into a widget that's created from uiBinder?

Hello,

I have a class called Mailboxes that derives from Composite. (This
widget contains a tree control to allow the user to select the mail
folder to view).

The Mailboxes instance is created by uiBinder within another widget
called Shortcuts. Here is the fragment of the Shortcuts.ui.xml file
that shows Mailboxes being created:

<g:stack>
<g:header size='3'>Mailboxes</g:header>
<mail:Mailboxes ui:field='mailboxes'/>
</g:stack>

What I've shown so far is from Google's sample Mail application. I
want to dependency inject the event bus into this instance. What is
the best way of doing this? I wasn't sure if Gin could do it because
GWT.create() is used within uiBinder to create the instance. I'm not
sure if I would even need Gin for this? I tried to see if ui:with
might help me but I haven't figured out how to use that properly yet
(very steep learning curve at the moment and I can't take much more
info at this stage!).

Thanks,

Pete

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment