GXT (GWT-EXT) Development Environment Construction

Source: Internet
Author: User

The process of building this development environment is carefully written. Reposted from [http://musicmmm.iteye.com/blog/687645]

For how to download and configure, refer to "Ext GWT 2.0 development getting started". This post was searched by Google when I first came into contact with GXT (Ext-Gwt, although I tried to call the test example according to this post, it was still confused. What are the parameters added in the example? I don't understand it because there is no comment, I have taken a lot of detours. Based on this post, I have sorted out my experiences on how to create, configure, and deploy GXT.


I started from the creation of the project, in fact, how to create a project in the download from the official website gxt-2.1.1 package written quite clearly. (When you open the gxt2.1.1file package, you can see that setup.txt already describes how to create a GXT project and what each added parameter does)
 
 
The creation procedure is as follows:
1. If you have installed the GXT plug-in, you can see the one marked as red on eclipse3.4.
(Download the GWT plug-in, cypal. studio. for. gwt-1.0. Copy to the eclipse plugins directory)
 
2. Click and enter the project name. After the package name is selected, click Finish to create a new project.
 
3. In fact, this project can be run once it is created, because the related interface classes and implementation classes in this project have been written, and the running effect is as follows:
 
4. Now, on the basis of this project, modify
(1) first Delete the three interfaces and implementation classes in the highlighted red box.
 
(2) modify the code in GXT_test.java to the following. Delete irrelevant code and comments and leave only the onModuleLoad () method.
 
(3) Delete the blue code in web. xml
 
(4) Put the gxt. jar package in lib
(5) Add JARs… in Properties-Java Build Path-Libraries... To add the gxt. jar package just copied to lib.
 
(6) copy the resources file in gxt2.1.1 to the war.
 
 
(7)in gxt_test.html
 
Add the following style sheet to the Home Page. Of course, the comments are deleted from the home page.
<Link rel = "stylesheet" type = "text/css" href = "{resource file name}/css/gxt-all.css"/>
To use charts, add the following script to the home page.
<Script language = 'javascript 'src = '{resource file name}/flash/swfobject. js'> </script>
Because no chart is used, you can add the style sheet above.
 
(8) Add the following sentence to GXT_test.gwt.xml.
 
 
 
(9) Well, write a few lines of code in GXT_test.java to open a new window and check whether the code can run normally.
 
(10) When you see a window, it means that the project configuration is complete and the project can run normally.

(11) If you want to make a small demo, you can refer to the official small example. Open assumer.html directly.
 
There are a wide range of examples here. If you can see more than half of them, there will be no problem in future projects.
 
5. Deploy to Tomcat
(1) Select the icon with a red box and a prompt box will pop up. There will be a project name in it. After selecting it, click Compile to Compile it.
 
(2) After compilation is successful, an additional gxt_test is added under the war of the project.
 
(3) Find the directory where the project is stored, copy and paste the war folder to the webapps directory of tomcat.

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.