| Building Web Applications > The Equipment View Faces Component > Declaring an Equipment View Faces Component |
Declaring an Equipment View Faces Component |
INDEX
PREVIOUS
NEXT
|
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.
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:
<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): Should be a value binding to an instance of IlpContext declared as a managed bean. A default implementation is available for convenience (ilog.tgo.faces.service.IltFacesDefaultContext).
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 ILOG JViews TGO is installed.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. All rights reserved. Legal terms. | PREVIOUS NEXT |