Introduction to JavaServer Faces Part 2 - Console Message
(Page 4 of 6 )
And, in the console, you will see the following message:
Model Object Created
getFirstNumber:0
getSecondNumber: 0
getResult: 0
getPhaseId called
Viewing the source, you can see the following HTML tags:
<html>
<head>
<title>Add 2 numbers</title>
</head>
<body>
<form method="post"
action="/JSFCh02a/faces/adder.jsp;jsessionid=
1EF862DDA5B0B99F69E73A32F417552B">
<br/>First Number:
<input type="text" name="firstNumber"
id="firstNumber" value="0"/>
<br/>Second Number:
<input type="text" name="secondNumber"
id="secondNumber" value="0"/>
<br/>Result:
0
<br/>
<input type="submit" name="submitButton"
value=" Add "/>
</form>
</body>
</html>

Figure 6 Running the application

Figure 7 The result of the addition
Now, type two numbers into the input boxes and click the Add button. You can see the browser now displays the result of the addition, as shown in Figure 7.
Remember: This is part one of the second chapter of JavaServer Faces Programming, by Budi Kurniawan (McGraw-Hill/Osborne, ISBN 0-07-222983). Stay tuned for more helpful chapters from McGraw-Hill/Osborne. Buy this book! |
Next: And the Message >>
More Java Articles
More By McGraw-Hill/Osborne