Nope.  In fact, it's even more powerful because you can put in complex
conditionals.  Ideally, you wouldn't even need to files because you could
just pick 1 class when in production, 1 class when in development, but that
selection would still be in a single Foo.gwt.xml.

Also, you may find it helpful to use

<module rename-to="actual_module_name">

so that if you do use multiple module xml files, you don't have to change
any other configuration files (i.e. servlet definitions etc).

On Fri, Apr 10, 2009 at 11:52 AM, Yves <[email protected]> wrote:

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