Perforce JViews Gantt Code Example: JViews Gantt Chart JSF in a Facelets and Trinidad context
Description
This code example shows how to use the Perforce JavaServer Faces components in a Facelets or Trinidad context.
Installing the Thin-Client Code Example
The code example contains a WAR file (Web Archive) that allows you to easily install the code example 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 Code Example 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-facelets 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 code example by opening the following page:
- Perforce JViews Gantt Code Example: JViews Gantt Chart JSF in a Facelets and Trinidad context
http://localhost:9090/jsf-gantt-facelets
Running the Code Example 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 code example
by opening the following page:
http://localhost:9443/jsf-gantt-facelets
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 Chart
- Facelets
- Apache Trinidad
Detailed Description
This code example gathers several code fragments together. Each code fragment is an XHTML Facelets page.
It also includes several XML configuration files that enable you to use JViews components in a Facelets and Trinidad context.
Installation Directory
The JViews Gantt Chart JSF in a Facelets and Trinidad context code example is installed here.
Classes Involved
Source Files
-
demo.editing.EditingBean
The Bean that contains the logic of this code example.
-
demo.editing.PropertyAccessor
The property accessor that filters the property displayed.
-
gantt
This page shows how to display JViews Diagrammer JSF Components in a Facelets context.
-
gantt-trinidad
This page shows how to display JViews JSF Diagrammer and Framework components in a Facelets and Trinidad context.
-
WEB-INF/faces-config
This configuration file shows how to set up Trinidad and Facelets rendering for JSF.
-
WEB-INF/faces-config-std
This configuration file shows how to set up Facelets rendering for JSF.
-
WEB-INF/web-std
This configuration file shows how to set up a Facelets application for JViews.
-
demo.editing.faces.PropertySheet
The property sheet custom JSF component.
-
demo.editing.faces.PropertySheetRenderer
The property sheet custom JSF renderer.
-
data/GanttPropertySheet
The JavaScript code for the property sheet component.
-
WEB-INF/facelets/custom
The custom facelets description for the PropertySheet component.