Rogue Wave JViews TGO Sample: JSF Integration - Equipment Viewer


Description

This sample shows how to use both the network and equipment components together on a Faces application.

How to Use the Sample

Installing the Thin-Client Sample

The sample contains a WAR file (Web Archive) that allows you to easily install the sample on any server that supports the Servlet API 2.1 or later. For your convenience, the WAR will be copied to the Tomcat web server that is supplied with the Rogue Wave JViews installation when you start the server using the supplied scripts. Tomcat is the official reference implementation of the Servlet and JSP specifications. If you are already using an up-to-date Web or application server, there is a good chance that it already has everything you need. The sample can also be deployed to WebSphere Application Server (WAS).

Running the Sample Using Tomcat

If you intend to use the Tomcat Web server provided with this installation, follow these instructions to start the server: Running the Server-Side Samples. The scripts to start the server can be found in the tools/tomcat-jsf directory.
Note: if you are running on Windows then you will find menu items in the Windows "start" menu to start and stop the Tomcat server.

Once the server is running, you can see the sample by opening the following page:

Running the Sample Using WebSphere Application Server

In addition to the instructions provided for using Tomcat, the samples can be viewed on WebSphere Application Server. Follow the instructions: Running the Server-Side Samples and use the scripts to start the server and deploy the sample.

Once the server is running, you can see the sample by opening the following page: http://localhost:9443/jsf-integration-equipment-viewer
The WAS administrative console can be used to verify or modify server settings: http://localhost:9043/ibm/console/

Note: the WAS server can start on a range of port numbers, therefore the value is not guaranteed to remain the same. The scripts provided with the samples can be used to obtain the port numbers used by the Admin Console and by the deployed Web applications. To retrieve a list of all the WAS port numbers, run the command line instruction: ant -f build_was.xml ws.list.ports

Topics Covered

Detailed Description

This sample shows how to use both the network and equipment components together on a Faces application, by illustrating how to:

It is important to understand that this sample re-uses the code provided in the standard AbstractSampleContext that is used in the other JViews TGO Faces samples in a standalone class, namely the SampleContext. This SampleContext emcopasses in one file the same design and functionality as the standard AbstractSampleContext, see the SampleContext description below for more details.
So in the same manner as the AbstractSampleContext, the SampleContext serves as: So before proceeding it is recommended that you review the section Common Features of Faces Samples in the JViews TGO documentation to ensure that you understand the design behind the sample, see Starting the samples as this section contains more details on how the JViews TGO JSF samples are designed around the AbstractSampleContext, which despite not directly subclassing from it, is (as noted above) the underlying code base for this sample.

This sample uses the following types: This sample is composed of one JSP file: index.jsp that is located in webpages directory. This JSP file defines all the JViews Framework and JViews TGO Faces components that compose and support the sample's user interface. For example, the Network and Equipment View Faces components are initialized in this file to use as their IlpContext and their associated component (IlpNetwork and IlpEquipment respectively), the IlpContext and component instances that are contained in the SampleContext. The standard JSF Expression Language syntax is used to specify these associations: <jvtf:networkView context="#{sampleContext.context}" network="#{sampleContext.network}" ... > or <jvtf:equipmentView context="#{sampleContext.context}" equipment="#{sampleContext.equipment}" ... >.

This sample has the following directory structure: For more details see the resource and source files themselves.

Installation Directory

The JSF Integration - Equipment Viewer sample is installed here.

Classes Involved

Source Files

Copyright © Rogue Wave Software, Inc. 1997, 2015. All rights reserved. Legal terms.