Declaring an equipment view JSF component

The equipment view JSF component displays the contents of an IlpEquipment in a JavaServerā„¢ Page (JSPā„¢) compliant with the JavaServer Faces (JSF) technology. It is implemented by the class IltFacesEquipmentView and acts as a facade to an IlpEquipment component. It provides a convenient API for the most common uses of the equipment component, such as setting or retrieving the associated data source, accessing the underlying equipment component, or accessing the equipment view directly.
JViews TGO JSF components are declared in a tag library descriptor ( .tld ) file named jviews-tgo-faces.tld that is included in the jviews-tgo-all.jar . The JViews TGO JSF tag library must be declared in the JSP page before any of its components are used.

How to define the JViews TGO JSF tag library and prefix in a JSP page

The declaration is done at the beginning of the JSP file as follows:
<%@ taglib uri="http://www.ilog.com/jviews/tlds/jviews-tgo-faces.tld" 
prefix="jvtf" %>
This statement declares the jviews-tgo-faces.tld tag library within a JSP page, and binds all its components to the jvtf prefix. Once this is done, you can declare the equipment view component as follows:

How to declare an equipment view JSF component

<jvtf:equipmentView id="myEquipment" 
                    context="#{myContext}"
The equipmentView component requires two mandatory tag attributes:
  • id (component unique identifier): Can be any given string that uniquely identifies this component within a server session.
  • context (the IlpContext to be used): Must be a value binding to an instance of IlpContext declared as a managed bean. For Web applications, the TGO context must be ilog.tgo.faces.service .IltFacesDefaultContext or a user defined subclass.
If you have started the bundled Tomcat web server, the following link will take you to the small sample illustrating this: http://localhost:8080/jsf-equipment-step-by-step/faces/example1.jsp.
You will find more information about the sample web application in <installdir> /samples/faces/jsf-equipment-step-by-step/index.html where <installdir> stands for the directory where Rogue Wave JViews TGO is installed.