简体   繁体   中英

How to use Textresource in GWT


I'm using GWT for a Webapplication. Now I tried to include a Textresource (HTML-File) like it's described here: http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html#TextResource
I got a errormessage like:

No source code is available for type my.package.resources.MyHTMLResource; did you forget to inherit a required module?    

When I remove the MyHTMLResource.java and the resources from the package "my.package.resources" and putting them into the package "my.package.client" where the EntryPointClass is, everything works fine. But I'd like to seperate the resourcefiles from the other files.

So how can I move the resourcefiles and the MyHTMLResource.java File in an other package? Do I have to change something in the .gwt.xml file?

Thanks in advance

I put my resources into a subpackage of the client package:

my.package.client.resources

You can also fix it by adding a source entry to your gwt.xml .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM