On 27 oct, 00:09, "yunhui song" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Actually, Gin is used to implements Ioc Container. It can bind everything
> not only event Listener.
>
> Guice or Spring can do that naturally, but because GWT can not support
> Java reflection, such as forClass("className").getInstance. So Gin use
> generic and annotation to do that.
Sorry, I should have been clearer: I know what Guice (and Gin) and
Spring are. Just that they cannot AFAIK inject listeners (i.e. call
some addXListener method, eventually several times on a single
instance). Of course you can use method injection with a
setXListeners(List<XListener>) method (should be supported by Gin as
of today) but I wouldn't call it "injecting event listeners"; or
inject event sources or event targets but that's not flexible at all
(why having "event listeners" in this case, just keep references to
the injected widgets and call the appropriate methods on them)
> I have a open source project to do that. GinModule and GindInjector are
> key players for that.
> please check out here, that's a real world project.
> http://openorg.googlecode.com/svn/trunk/magpie
I've seen some widgets be injected other widgets but not a single
event listener (or I missed something).
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---