Wednesday, August 27, 2014

How to override the deferred binding configuration of a inherit gwt module

Hi

is it possible to override the deferred binding configuration of a inherit module?

Here is a example:

In the module, I want to use, a deferred binding is declared as follows moduleA.gwt.xml:

<replace-with class="A1Impl">      <when-type-is class="A"/>  </replace-with>    <replace-with class="A2Impl">      <when-type-is class="A"/>      <when-property-is name="p" value="1"/>  </replace-with>  

The declaration says: Use A1Impl class as default and A2Impl class, if property p has the value 1.

Now, in my app I want to use that module and want P to be 1 (because this controls the above shown, but also a lot of other deferred binding configurations) mymodule.gwt.xml:

<inherits name='moduleA'/>  <set-property name="p" value="1" />  

But additionally I want to override the deferred binding configuration of the inherit module to use my own implementation of A. I tried something like this in my module, but it didn't work:

<replace-with class="B1Impl">      <when-type-is class="A"/>      <when-property-is name="p" value="1"/>  </replace-with>  

It should say something like this: Do not use A2Impl (declared in inherit module) if property p has the value 1 but use my own implementation B1Impl instead.

Is this possible?

Thanks in advance for any help.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment