Braindump

Setting Up AGXT Project In Eclipse

Create the GWT project

  • Create Eclipse project with GWT's webAppCreator shell command (e.g. webAppCreator -out subdir com.example.myapp.MyApp)
  • Import project into workspace (File -> Import... -> Existing Project into Workspace etc.)
  • Remove the GWT jar files from the project
  • Add the GWT and GXT user libraries (see Set up Eclipse for GWT and GXT) to the project

Move from GWT to GXT

Adapt the GWT module

  • Open src/com.example.myapp.MyApp.gwt.xml
  • Comment out the line <inherits name='com.google.gwt.user.User'/> (and potentially others)
  • Insert the line <inherits name='com.extjs.gxt.ui.GXT'/>

Copy GXT resources (the style) to your project

  • Create directory war/gxt
  • Copy /path/to/gxt/resources/* to the Eclipse project's war/gxt folder (i.e. there must be a file at war/gxt/css/gxt-all.css now)

Adapt the hosting HTML file

  • Open war/MyApp.html
  • Find the section in the HTML file's head part, where the CSS files are linked in (search for .css in the file)
  • Add a reference to the GXT styles (<link rel="stylesheet" type="text/css" href="gxt/css/gxt-all.css" />)

Optional part: Drop non-GUI parts

In case this application will consist of a GUI only, you can get rid of the server specific parts. To remove the non-GUI parts from the Eclipse project do this:

  • remove the com.example.myapp.server and com.example.myapp.shared packages
  • remove war/lib/gwt-servlet.jar
  • edit the war/WEB-INF/web.xml file and remove (or comment out) the servlet and servlet-mapping parts, so that only the default page section remains