With the plotCity example, you can plot a city on a map by performing the following tasks:
Select a state from a Dojo combobox widget, thereby populating another Dojo combobox widget with a list of cities located in that state.
Select a city from the second Dojo combobox widget, thereby causing the application to access the city's coordinates from an external service and plot the city on a map represented by a Google map widget.
This tutorial uses the plotCity example to demonstrate using the primary features of jMaki:
An extensive widget tag library for use in JSP pages.
Easy access to server—side data from jMaki widgets.
Mechanisms to perform widget-to-widget communication.
A proxy service to access external services.
This section tells you how to get the example, build it, and run it.
Go to the jMaki sample WAR files download area .
Download one of the following files:
If you downloaded the plotCity.zip file, extract the zip file.
With this task, you'll be able to run plotCity in your browser.
Select File->Open Project in NetBeans IDE 6.1.
Select the plotCity project that you extracted from the zip file in the previous task, and click OK.
Right click on the plotCity application in the Projects pane and select Run Project.
This will compile the classes, package the files into a WAR file, deploy the WAR to your GlassFish v3 Technology Preview 2 Application server instance, and open a web browser to the following URL:
Select a state from the State combobox. Then select a city from the City combobox. You'll see that city plotted on the map.