|
1 | 1 | <?xml version='1.0' encoding='UTF-8' ?> |
2 | | -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| 3 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
3 | 4 | <html xmlns="http://www.w3.org/1999/xhtml" |
4 | 5 | xmlns:h="http://java.sun.com/jsf/html" |
5 | 6 | xmlns:c="http://java.sun.com/jsp/jstl/core" |
6 | 7 | xmlns:f="http://java.sun.com/jsf/core"> |
7 | | - <h:head> |
8 | | - <title>Baeldung | The EL Intro</title> |
| 8 | +<h:head> |
| 9 | + <title>Baeldung | The EL Intro</title> |
| 10 | +</h:head> |
9 | 11 |
|
10 | | - </h:head> |
| 12 | +<h:body> |
| 13 | + <h:form id="elForm"> |
11 | 14 |
|
12 | | - <h:body> |
13 | | - <h:form id="elForm"> |
14 | 15 |
|
15 | | - |
16 | | - <h:messages /> |
17 | | - <h:panelGrid columns="2"> |
18 | | - <h:outputText value="First Name"/> |
19 | | - <h:inputText id="firstName" binding="#{firstName}" required="true" value="#{ELBean.firstName}"/> |
20 | | - <h:outputText value="Last Name"/> |
21 | | - <h:inputText id="lastName" required="true" value="#{ELBean.lastName}"/> |
22 | | - <h:outputText value="Save by value binding"/> |
23 | | - <h:commandButton value="Save" action="#{ELBean.save}"> |
24 | | - |
25 | | - </h:commandButton> |
26 | | - <h:outputText value="Evaluate backing bean EL"/> |
27 | | - <h:commandButton value="Save" action="#{ELBean.saveByELEvaluation}"> |
28 | | - |
29 | | - </h:commandButton> |
30 | | - <h:outputText value="Save by passing value to method"/> |
31 | | - <h:commandButton value="Save" action="#{ELBean.saveFirstName(firstName.value.toString().concat('(passed)'))}"/> |
32 | | - <h:outputText value="JavaScript (click after saving First Name)"/> |
33 | | - <h:button value="Alert" onclick="alert('Hello #{ELBean.firstName}')"/> |
34 | | - </h:panelGrid> |
35 | | - |
36 | | - <br/> |
37 | | - <h:outputText value="Current Request HTTP Headers:"/> |
38 | | - <table border="1"> |
39 | | - <th>Key</th> |
40 | | - <th>Value</th> |
41 | | - <c:forEach items="#{header}" var="header"> |
42 | | - <tr> |
43 | | - <td>#{header.key}</td> |
44 | | - <td>#{header.value}</td> |
45 | | - </tr> |
46 | | - </c:forEach> |
47 | | - </table> |
48 | | - |
49 | | - </h:form> |
50 | | - </h:body> |
| 16 | + <h:messages/> |
| 17 | + <h:panelGrid columns="2"> |
| 18 | + <h:outputText value="First Name"/> |
| 19 | + <h:inputText id="firstName" binding="#{firstName}" required="true" value="#{ELBean.firstName}"/> |
| 20 | + <h:outputText value="Last Name"/> |
| 21 | + <h:inputText id="lastName" required="true" value="#{ELBean.lastName}"/> |
| 22 | + <h:outputText value="Save by value binding"/> |
| 23 | + <h:commandButton value="Save" action="#{ELBean.save}"> |
| 24 | + |
| 25 | + </h:commandButton> |
| 26 | + <h:outputText value="Evaluate backing bean EL"/> |
| 27 | + <h:commandButton value="Save" action="#{ELBean.saveByELEvaluation}"> |
| 28 | + </h:commandButton> |
| 29 | + <h:outputText value="Save by passing value to method"/> |
| 30 | + <h:commandButton value="Save" |
| 31 | + action="#{ELBean.saveFirstName(firstName.value.toString().concat('(passed)'))}"/> |
| 32 | + <h:outputText value="JavaScript (click after saving First Name)"/> |
| 33 | + <h:button value="Alert" onclick="alert('Hello #{ELBean.firstName}')"/> |
| 34 | + </h:panelGrid> |
| 35 | + |
| 36 | + <br/> |
| 37 | + <h:outputText value="Current Request HTTP Headers:"/> |
| 38 | + <table border="1"> |
| 39 | + <th>Key</th> |
| 40 | + <th>Value</th> |
| 41 | + <c:forEach items="#{header}" var="header"> |
| 42 | + <tr> |
| 43 | + <td>#{header.key}</td> |
| 44 | + <td>#{header.value}</td> |
| 45 | + </tr> |
| 46 | + </c:forEach> |
| 47 | + </table> |
| 48 | + |
| 49 | + </h:form> |
| 50 | +</h:body> |
51 | 51 | </html> |
52 | 52 |
|
0 commit comments