Perforce JViews Gantt Sample: Gantt Chart Viewer (JSF and JavaScript)
Description
This sample shows how to display and interact on a Gantt chart using Perforce JViews Gantt JavaServer Faces components.
How to Use the Sample
-
Select an activity on the activity drop-down list
.
The view is zoomed on the activity, the tree is expanded. - Select another activity with the select interactor by selecting the interactor from the toolbar and clicking the desired activity.
- You can explore by expanding or collapsing rows , panning , zooming in , zooming out and fitting the view .
- You can also explore by triggering the contextual pop-up menu on a view by right-clicking.
- The JSP source code is available by clicking the button.
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 Perforce 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:
- Perforce JViews Gantt Sample: Gantt Chart Viewer (JSF and JavaScript)
http://localhost:8080/jsf-gantt-chart
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-gantt-chart
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
- JavaServer Faces Gantt
- Thin client
Detailed Description
This sample shows some of the possible interactions between the JViews Gantt
Faces component and the JavaServer Faces (JSF) framework. An activity can be
selected either from a combo box or by clicking it on the
Gantt component. A pop-up menu can be shown by right-clicking an activity.
It has support for multiple browser pages, meaning that you can open it in
different browser tabs: the state of each page is preserved.
Installation Directory
The Gantt Chart Viewer (JSF and JavaScript) sample is installed here.
Classes Involved
- ilog.views.gantt.IlvHierarchyChart
- ilog.views.gantt.faces.component.IlvFacesHierarchyChartView
- ilog.views.gantt.faces.component.data.IlvFacesGanttXMLDataSource
- ilog.views.util.servlet.IlvMenuFactory
Source Files
-
demo.gantt.faces.DemoBean
The Bean that contains the logic of the JSF Gantt Chart sample.
-
demo.gantt.faces.DemoFactory
The contextual pop-up menu model factory implementation class.
-
demo.gantt.faces.ContextDataBean
A bean storing all context data for every page accessing the web application.