Hello

Reading the documentation for the module xml files, i just realize
that the tag <replace-with .../> allows for dependency injection.

Suppose i need to use different class implementation depending on my
environment (real class for production, mock for development ...). I
just have to have two (or more) module xml like this

For production use file FooProd.gwt.xml

<module>
  <replace-with class="foo.FooProdImpl">
    <when-type-is class="foo.Foo" />
  </replace-with>
  ...

For development use file FooDev.gwt.xml

<module>
  <replace-with class="foo.FooMockImpl">
    <when-type-is class="foo.Foo" />
  </replace-with>
  ...

Am i wrong?

Regards

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to