google-code-export / gwt-dispatch

Automatically exported from code.google.com/p/gwt-dispatch
1 stars 0 forks source link

Problems with binding handlers with GuiceLazyActionHandlerRegistry #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When using GuiceLazyHandlerRegistry, binding action handlers has no efect.
ServerDispatchModule only registers bindings when ActionHandlerRegistry is 
subclass of InstanceActionHandlerRegistry.class.

See :
@Override 
    protected final void configure() { 
        bind( ActionHandlerRegistry.class ).to 
( getActionHandlerRegistryClass() ).in( Singleton.class ); 
        bind( Dispatch.class ).to( getDispatchClass() ); 
        // This will bind registered handlers to the registry. 
        if ( InstanceActionHandlerRegistry.class.isAssignableFrom 
( getActionHandlerRegistryClass() ) ) 
            requestStaticInjection( ActionHandlerLinker.class ); 
    } 

Problem occured in the gwt-dispatch 1.1-SNAPSHOT

I guess configure method should look like this :
@Override 
    protected final void configure() { 
        bind( ActionHandlerRegistry.class ).to 
( getActionHandlerRegistryClass() ).in( Singleton.class ); 
        bind( Dispatch.class ).to( getDispatchClass() ); 
        // This will bind registered handlers to the registry. 
            requestStaticInjection( ActionHandlerLinker.class ); 
    } 

Original issue reported on code.google.com by misq...@gmail.com on 3 Nov 2009 at 8:18

GoogleCodeExporter commented 9 years ago
Need to investigate this further. There was a reason that it was checking the 
class - need to figure out what it 
was...

Original comment by Bitmei...@gmail.com on 25 Apr 2010 at 4:58

GoogleCodeExporter commented 9 years ago
Ok, looked over the code, and I think you're correct. The static 'linkHandlers' 
method in ActionHandlerLinker will 
check the class type itself.

Original comment by Bitmei...@gmail.com on 28 Apr 2010 at 2:51

GoogleCodeExporter commented 9 years ago
Fix checked in.

Original comment by Bitmei...@gmail.com on 28 Apr 2010 at 6:59