Building Web Applications > The Network View Faces Component > Declaring a Network View Faces Component

JViews TGO faces components are declared in a tag library descriptor (.tld) file named jviews-tgo-faces.tld that is included in the jview-tgo-faces.jar. The JViews TGO faces tag library must be declared in the JSP page before any of its components are used.

How to Define the JViews TGO Faces 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 network view component as follows:

How to Declare a Network View Faces Component
<jvtf:networkView id="myNetwork" 
                    context="#{myContext}"

The networkView component requires two mandatory tag attributes:

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-network-step-by-step/faces/example1.jsp

You will find more information about the sample web application in:

<installdir>/samples/faces/jsf-network-step-by-step/index.html

where <installdir> stands for the directory where ILOG JViews TGO is installed.