MVC Architecture Lab 1

Bind the Presenter and the View

  1. Checkout the gwt-training project (as a Maven project) from -
  2. Your goal is two fold
    1. Make the Create button work
    2. Make the Search work

Run the project

Right click on gwt-training-web

  Select Google -> Web Toolkit Settings ...
  Expand Google
     Select Web Application (in the tree)
        Check "This project has a WAR directory"
        For WAR directory: src/main/webapp
        Check "Launch and deploy from this directory"
     Select Web Toolkit (in the tree)
        Check "Use Google Web Toolkit" checkbox
   Click OK

Right click on gwt-training-web again

  Select Debug As -> Debug Configurations ...
  Enter an appropriate name
  On the Main tab
     Make sure Project is: gwt-training-web
     Make sure the Main class is:
  On the Server tab
     Uncheck "Run built-in server"
  On the GWT tab
     For the Url enter: http://localhost:8080/gwt-training/index.jsp
  Select Apply and then Close

Click the red GWT button in the top menu of the IDE

  For Project, select: gwt-training-web
  Press compile
  For the war directory select gwt-training/web/src/main/webapp
  Press OK

Right click on a server in the Servers tab (of the LDSTech perspective)

  Select Add and Remove...
  Add gwt-training-web to the server
  Start the server by clicking the Run (red > icon) or Debug (bug icon)

Start the development mode plugin

  At the top of the IDE, just below the Window menu click the arrow next to the start or debug icons
  Select the configuration that you named previously
  If prompted for a WAR directory, select the webapp directory again

This should be the URL http://localhost:8080/gwt-training/index.jsp?gwt.codesvr=

Hookup Create button

  1. Open the AppController
  2. Bind the AddPresenter and AddView in the appropriate place

Hookup Search

  1. Attach a click handler to the Search button in the SearchPresenter (perform the search)
  2. Attach a key handler to the search text field in the SearchPresenter (perform the search when the user presses Enter in the field)

The following code will probably be helpful:

if (event.getCharCode() == KeyCodes.KEY_ENTER) {
This page was last modified on 10 June 2010, at 12:05.

Note: Content found in this wiki may not always reflect official Church information. See Terms of Use.