Recent Posts
Archives

Posts Tagged ‘GWT’

PostHeaderIcon GWT to GXT migration

These days, I am discovering GWT, and more accurately ExtGWT, aka GXT.

Case

I have to write a “Hello World” application based on GXT.

Steps

  • Firstly, follow Lars Vogel’s tutorial to have a “Hello World” in GWT.
  • In Eclipse, add a dependancy from your project to extjs-gxt-lib-2.1.1.jar (version compatible with your GWT version: 1.7 or 2.0), available at this link.
  • In your *.gwt.xml file, remove:
    [xml]<inherits name=’com.google.gwt.user.theme.standard.Standard’/>[/xml]

    and add:

    [xml]<inherits name=’com.extjs.gxt.ui.GXT’/>[/xml]

  • Get the gxt-all.css file, copy it into war/css/ folder
  • In your *.html file, add the lines:
    [xml]<link rel="stylesheet" type="text/css" href="css/gxt-all.css" />[/xml]
  • Now, adapt your Java entry point source class, replacing GWT widgets with GXT ones.
  • Restart your server and refresh the page in your browser. You have your “Hello World” in GXT!