HTML and CSS Reference
In-Depth Information
Figure 2-4. The example flow
Listing 2-34 shows the code of the starting input page ( input.xhtml ).
Listing 2-34. The input.xhtml Page
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html>
<html xmlns=" "
xmlns:h=" "
xmlns:f=" " >
<title>Sleeping hours checker</title>
<h1>Sleeping hours checker</h1>
<h:outputText value="Enter your sleeping hours: "/>
<h:inputText id="sleepingHours"
<f:convertNumber integerOnly="true" maxIntegerDigits="2" />
<h:commandButton action="proceed" value="Check my sleeping hours"/>
The form contains an input text, sleepingHours , which is required and accepts only integer numbers with two
digits by using the <f:convertNumber integerOnly="true" maxIntegerDigits="2" /> converter.
Search WWH ::

Custom Search