Skip to content

Commit 73a89d9

Browse files
BAEL-151 - added dep, minor changes
1 parent cc5f477 commit 73a89d9

2 files changed

Lines changed: 49 additions & 42 deletions

File tree

‎jsf/pom.xml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@
3131
<version>${javax.el.version}</version>
3232
</dependency>
3333

34+
<!-- JSTL -->
35+
36+
<dependency>
37+
<groupId>javax.servlet</groupId>
38+
<artifactId>jstl</artifactId>
39+
<version>1.2</version>
40+
</dependency>
3441

3542
<!-- Spring -->
3643

‎jsf/src/main/webapp/el_intro.xhtml‎

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
11
<?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">
34
<html xmlns="http://www.w3.org/1999/xhtml"
45
xmlns:h="http://java.sun.com/jsf/html"
56
xmlns:c="http://java.sun.com/jsp/jstl/core"
67
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>
911

10-
</h:head>
12+
<h:body>
13+
<h:form id="elForm">
1114

12-
<h:body>
13-
<h:form id="elForm">
1415

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>
5151
</html>
5252

0 commit comments

Comments
 (0)