HTML and CSS Reference
In-Depth Information
Finally, in order to define the Faces flow, you should declare it in the Faces configuration file ( faces-config.xml )
as shown in Listing 10-11.
Listing 10-11. Defining the Faces Flow in the Faces Configuration File
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
xmlns=" "
xmlns:xsi=" "
xsi:schemaLocation=" ">
<flow-definition id="registration">
<flow-return id="flowReturn">
In order to define the flow, you use the <flow-definition> tag specifying the ID of the flow. The <flow-return>
tag represents the flow return and it must have one <from-outcome> element; in our weather application, the flow
return ID is "flowReturn" and the flow returns when the outcome "/home" is returned (which represents the home
page). Now, let's go through the registration pages. Listing 10-12 shows the registration.xhtml page.
Listing 10-12. registration.xhtml Page
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html>
<html xmlns=" "
xmlns:ui=" "
xmlns:h=" "
xmlns:f=" " >
<ui:composition template="/WEB-INF/templates/main.xhtml">
<ui:define name="title">
<ui:define name="content">
<h:panelGrid columns="3">
<h:outputText value="#{bundle['']}"></h:outputText>
<h:inputText id="userID"
<h:message for="userID" styleClass="errorMessage"/>
Search WWH ::

Custom Search