I have an ENUM that is used on the server-side. I want to be ably to use this enum on the client side (GWT) aswell.
This is the structure:
se.mycompany.core
se.mycompany.core.TheEnum <-- this Enum.
se.mycomapny.web.gwtproject <-- The GWT project.
se.mycomapny.web.gwtproject.client
I have tried to add
<inherits name="se.mycompany.core.TheEnum"/>
to my gwtproject.gwt.xml file. But I get the following error message:
[ERROR] Unable to find 'se/mycompany/core/TheEnum.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
I have tried to add the file TheEnum.gwt.xml to 'se/mycompany/core/' with the following context.
<module>
<inherits name='com.google.gwt.user.User'/>
<source path="TheEnum"></source>
</module>
But it still complains about the same thing.
I'm guessing I need to add the se.mycompany.core.TheEnum to the classpath in build.xml somehow, but I dont know how or where.
The "inherits" tag is used to import other modules, not individual classes. You could achieve what you want by creating a simple GWT module under the core
package, and then inherit that module in the existing one:
Create a file called Core.gwt.xml
under package se.mycompany.core
with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<module>
<source path="" includes="TheEnum.java"/>
</module>
Then in your existing module add:
<inherits name='se.mycompany.core.Core'/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With