Hi Thomas, Thanks.
Was also referred to -> https://groups.google.com/d/topic/gwt-platform/V_Qqn9j6hj4/discussion Cheers Rob On Nov 7, 1:58 am, Thomas Broyer <t.bro...@gmail.com> wrote: > Deferred binding only occurs when you use GWT.create(). If you "new > ViewFactory()", there's no reason you'll be given a TableViewFactory. GWT > doesn't change Java's semantics. > > What you have to do is to use a distinct Ginjector depending on the form > factor, and you can re-use the same GinModule(s) for all the shared binding > configurations, and add a specific GinModule per form factor. > Unfortunately, you cannot use both a generate-with (GIN's Ginjector) and > replace-with (chose the right Ginjector depending on form factor), so > you'll have to use a replace-with rule on a "provider class" for you > Ginjector: > > interface MyGinjector extends Ginjector { > // all your accessors} > > @GinModules(SharedGinModule.class, DesktopGinModule.class) > interface DesktopGinjector extends Ginjector { > // nothing special here; it's only used for the @GinModules annotation} > > @GinModules(SharedGinModule.class, TabletGinModule.class) > interface TabletGinjector extends Ginjector { } > @GinModules(SharedGinModule.class, PhoneGinModule.class) > interface PhoneGinjector extends Ginjector { } > > interface GinjectorProvider { > MyGinjector get();} > > class DesktopGinjectorProvider implements GinjectorProvider { > public MyGinjector get() { return GWT.create(DesktopGinjector.class); }} > > class TabletGinjectorProvider implements GinjectorProvider { > public MyGinjector get() { return GWT.create(TabletGinjector.class); }} > > class PhoneGinjectorProvider implements GinjectorProvider { > public MyGinjector get() { return GWT.create(PhoneGinjector.class); } > > } > > <replace-with class="...DesktopGinjectorProvider"> > <when-type-is class="...GinjectorProvider" /> > <when-property-is name="formfactor" value="desktop" /> > </replace-with> -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.