Perforce JViews Diagrammer Sample: Diagram Gallery
Description
A JSF diagrammer showing a set of
.idpr
files.
How to Use the Sample
- Choose a diagram from the project box on the right side of the view. The default selection is the diagrammer project.
- Use the toolbar on the left side of the view to zoom, pan, fit the view and show or hide tooltips.
- You can inspect the data model by clicking a node or link with the select interactor to display its properties.
- Right click to display the contextual pop-up menu.
-
To easily display a project created with the Designer for
Perforce JViews Diagrammer, set the
data
attribute of thejvdr:diagrammerView
tag with the project URL (idpr
file). - For more details on using the Perforce JViews JavaServer Faces components, see the code fragments here.
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 Diagrammer Sample: Diagram Gallery
http://localhost:8080/jsf-diagrammer-gallery
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-diagrammer-gallery
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 Diagrammer
- Thin client
- Load Perforce JViews Diagrammer project files
Detailed Description
This sample is the JavaServer Faces version of the diagram
gallery sample. It displays different
diagrammer projects (.idpr
files) in a single view.
The diagrams in this sample are chosen to show typical
applications for Perforce JViews Diagrammer. This example also shows
the different Perforce JViews Diagrammer Diagrammer JSF components
available to display and interact on a diagram.
Installation Directory
The Diagram Gallery sample is installed here.
Classes Involved
- ilog.views.servlet.IlvImageMapAreaGenerator
- ilog.views.faces.dhtml.event.FacesViewActionEvent
- ilog.views.util.servlet.IlvMenuFactory
- ilog.views.util.servlet.model.IlvMenu
- ilog.views.diagrammer.faces.dhtml.component.IlvFacesDHTMLDiagrammerView