Hello:
I was wondering if someone has ran into the following:
Code:
ClientFactory clientFactory = GWT.create(ClientFactory.class);
clientFactory.run();
<replace-with class="com.test.client.ClientFactoryWebImpl"> <!-- Class -->
<when-type-is class="com.test.client.ClientFactory"/> <!-- Interface -->
<when-property-is name="mobilefactor" value="desktop"/>
</replace-with>
<when-type-is class="com.test.client.ClientFactory"/> <!-- Interface -->
<when-property-is name="mobilefactor" value="mobile"/>
</replace-with>
Rebind result 'com.test.client.ClientFactory' must be a class
<define-property name="mobilefactor" values="desktop,tablet,mobile" />
<collapse-property name="mobilefactor" values="*" />
What values can "mobilefactor" take?For instance, the FormFactory module from the mobilewebapp sample defines 3 values: desktop, table, and mobile. You have to define a rebind rule for each one of these values, or set the property to a subset of the values (e.g. <set-property name="formfactor" value="mobile,desktop" />) otherwise the compiler will use the "when-type-is" value (i.e. the interface here) when it cannot find a rule, which would cause the error you're seeing.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/mPLfSxXM-QoJ.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
FYI, it's not about a "default case", it's because you didn't have a rebind rule for the case where mobilefactor=tablet (which the "default case" now accounts for). It worked in DevMode because you then running with mobilefactor=desktop, which had a rebind rule.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/7iBWp3eGUE8J.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.