GWT learning-New Package (1)

Source: Internet
Author: User
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.componentsAdd 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
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.