In a GWT (Google Web Toolkit), there is usually a default package "client". What should I do if I add a new package "lib?
Method 1 (directly add the resource path ):
For example, if your project name is "ax", there will be a corresponding file "ax. GWT. xml", which includes the following content:
<Module>
.....
<Source Path = "lib"/>
.....
</Module>
Method 2 (Multi-Inclusion ):
First, find the file "ax. GWT. xml" to add a reference to another file (such as "YY. GWT. xml") in the file, as follows:
....
<Inherits name = 'com. KF. yy'> </inherits>
....
Add code similar to method 1 to the file "YY. GWT. xml", as shown below:
<Module>
<Source Path = "lib"/>
</Module>
Method 3 (when the new package and the package "client" are not in the same directory) (reference)
Here is an example of defining components.
The custom component package is
com.gwt.components.client
"
Add a file:
com.gwt.components
Add the file "user. GWT. xml"
Content:
<Module>
<Inherits name = "com. Google. GWT. Core. Core"/>
</Module>
In
Add the following to ax. GWT. xml:
....
<Inherits name ='
com.gwt.components.user
'> </Inherits>
....
By default, the file "user. GWT. "client" in the directory where XML is located. If you have other directories in this directory, you need to use the file "user. GWT. add "<Source Path = 'your directory'" to XML '".
On Google's site there is a more professional description of the module: http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.Fundamentals.Modules.html