To add a JSF manager view:
-
Open the new index.jsp file located in the WebContent folder and add the code shown in bold in the following code example:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%> <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%> <%@ taglib uri="http://www.ilog.com/jviews/tlds/jviews-framework-faces.tld" prefix="jvf" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> <f:view> <h:form id='jviewsForm'> <jvf:view id="managerView" style="width:500px;height:300px" view="#{support.view}" /> </h:form> </f:view> </body> </html>
The component<jvf:view>
enables you to show the JViews graphic presentation. Theview
attribute of this component is bound to the view attribute of theSupportBean
configured in the previous section. Note also that<jvf:view>
must be inserted with in a<h:form>
component.
This completes the coding of your JViews
JSF application. You can now proceed to deploy and test it.