Modifying the same-color.jsp file, Modifying the show-preview.jsp file – HP Integrity NonStop J-Series User Manual
Page 167

NOTE:
•
JSP directives for using JSF and HTML tag libraries
The following JSP directives allow the JSP page to use the JSF Core and HTML tag libraries
that are provided in the JSF specification’s Reference Implementation.
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
•
MyFaces User Interface components
JSF components, such as <h:selectBooleanCheckbox> and <h:selectOneMenu>
provide Faces enabled User Interface.
<h:selectOneMenu value="#{resumeBean.bgColor}"
is called the JSF value binding
expression and provides direct linkage to the bgColor property of the managed bean
resumeBean
.
Creating the same-color.jsp and show-preview.jsp Files
Create two new JSP files, same-color.jsp and show-preview.jsp, in the SkinSelector/
WebContent/WEB-INF/results
folder, by following the steps explained in the
section.
Modifying the same-color.jsp File
To modify the same-color.jsp file, complete the following steps:
1.
Double-click the same-color.jsp file in the Project Explorer frame to open it.
2.
Replace the default content of the same-color.jsp file with the following code:
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:view>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD><TITLE>Color Error</TITLE>
<LINK REL="STYLESHEET"
HREF="./css/styles.css"
TYPE="text/css">
</HEAD>
<BODY>
<CENTER>
<TABLE BORDER=5>
<TR><TH CLASS="TITLE">Color Error</TH></TR>
</TABLE>
<P>
You chose
"<h:outputText value="#{resumeBean.fgColor}"/>"
as both the foreground and background color.
<P>
<A HREF="customize.faces">try again</A>.
</CENTER></BODY></HTML>
</f:view>
Modifying the show-preview.jsp File
To modify the show-preview.jsp file, complete the following steps:
1.
Double-click the show-preview.jsp file in the Project Explorer frame to open it.
2.
Replace the default content of the show-preview.jsp file with the following code:
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:view>
Getting Started with MyFaces
167