>> More Visual Web Pack Documentation
Installing the Currency Trader Sample Application
Contributed and maintained by Chris Kutler
May 2007 [Revision number: V1-1]
This publication is applicable to
the NetBeans Visual Web Pack 5.5.1 release.
This document describes how to download, install, deploy, and
run the Currency Trader sample application. The sample application
demonstrates how to use the Dynamic Faces technology to
employ Ajax techniques with Ajax-unaware JavaServer Faces components.
The application uses both the Dynamic Faces Ajax Zone component
and the fireAjaxTransaction function from the Dynamic Faces JavaScript
API. The web application comprises one rendered page, shown below, and
is entirely Ajax-based. No conventional page submissions occur.
Figure 1: Currency Trader Sample Application |
Contents
|
|
 |
Software Needed for This Tutorial
Before installing the Currency Trader sample application,
you need to have the following software installed on your computer.
- NetBeans IDE 5.5.1 (download)
- NetBeans Visual Web Pack 5.5.1 (download)
- Sun Java System Application Server 9.1 (
download)
- Either the Firefox or IE 7 browser
Note: You must register a local instance of the Sun Java System
Application Server with the IDE. See the
Configuration Information section in the NetBeans Visual Web Pack
5.5.1 Installation Instructions for more information.
top
Obtaining the Sample Application
Follow these steps to download the Dynamic Faces 0.1.1 component library and
the Currency Trader sample application from the update center.
- From the main toolbar, choose Tools > Update Center.
- Select the checkbox for the NetBeans Visual Web Pack Update Center, as shown
below, and click Next.
Figure 2: Update Center
Selection |
Note: If you are behind a firewall, you might need to first click Proxy
Configuration to configure your HTTP proxy.
- The update center displays the modules that you have not yet installed.
If you see the NetBeans Visual Web Pack Update Center > Sample Custom Components
> Dynamic Faces Components (Technology Preview) node, select this node
and click Add.
If you do not see the node, you have already installed the module.
- If you see the NetBeans Visual Web Pack Update Center > Sample Custom
Components > Latest Visual Web Pack Sample node, select this node and click
Add. If you do not see the node, you have already installed the module.
The Include in Install list should look similar to the following figure, unless
you previously installed either module.
Figure 3: Module Selection |
- Click Next, and click Accept to start the download.
- When the download completes, click Next.
- The Update Center Wizard dispays the list of modules to install, as shown
below. Click Next to install the modules.
Figure 4: Modules List |
- When prompted, click OK to restart the IDE, as shown below.
Figure 5: Restart Prompt |
top
Installing the Dynamic Faces Component Library
Follow these steps to add the Dynamic Faces 0.1.1 component library to the
IDE's component library manager. You can skip this section if you have
already installed version 0.1.1 of the component library.
- From the main menu, choose Tools > Component Library Manager.
- In the Component Library Manager, click Import.
- In the Import Component Library dialog box, click Browse.
An Open dialog box appears, which displays the files of type Component Library
File in the netbeans-installation-directory/rave2.0/samples
folder, as shown below.
Figure 6: Open Dialog Box |
- Select dynamicfaces.complib and click Open.
- Click OK.
If prompted, click OK to overwrite the existing library.
- The Component Library Manager displays the contents of the component library,
as shown below. Click Close to dismiss the manager.
Figure 7: Component
Library Manager |
top
Creating the Currency Trader Web Application
You are now ready to create the Currency Trader web application.
- From the main menu, choose File > New Projects.
- In the New Project dialog box, select Samples > Visual Web from the Categories list,
and select Currency Trader from the Projects list, as shown below, and click Next.
Figure 8: Currency Trader Visual Web Project |
- Specify a project location and ensure that Set as Main Project is selected, as shown below.
Figure 9: Project Location |
- Click Finish to create the project.
The IDE displays Page1 in the Visual Designer. As shown below, there are errors
because there are dependencies on the Dynamic Faces component library, which
needs to be added to the project.
Figure 10: Source File Errors |
- In the Projects window, right-click Component Libraries and choose Add Component Library from the popup menu.
Figure 11: Add Component Library |
- Select Dynamic Faces Components (0.1.1) and click Add Component Library.
- In the Visual Designer, click the x in the Page1 tab to close the page.
- In the Projects window, double-click Web Pages > Page1 to reopen the page.
The source errors should be resolved and the
page should display correctly in the Visual Designer.
- Double-click Web Pages > README.txt to learn about the sample application.
- You must view the web application from either
IE 7 or Firefox 1.5 or higher. Follow these steps to ensure
that the IDE opens the web application in one of these browsers.
- Choose Tools > Options from the main menu.
- Choose Firefox or Internet Explorer, whichever is applicable.
- Click OK.
- Click Run Main Project to run the web application.
top
See Also
This page was last modified: May 4, 2007