Skip to content

Commit 8a19546

Browse files
authored
Add files via upload
Page to demo EL examples
1 parent 8d768c6 commit 8a19546

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

jsf/src/main/webapp/el_intro.xhtml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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">
3+
<html xmlns="http://www.w3.org/1999/xhtml"
4+
xmlns:h="http://java.sun.com/jsf/html"
5+
xmlns:f="http://java.sun.com/jsf/core">
6+
<h:head>
7+
<title>Baeldung | The EL Intro</title>
8+
9+
</h:head>
10+
11+
<h:body>
12+
<h:form id="elForm">
13+
14+
15+
<h:messages />
16+
<h:panelGrid columns="2">
17+
<h:outputText value="First Name"/>
18+
<h:inputText id="firstName" binding="#{firstName}" required="true" value="#{ELBean.firstName}"/>
19+
<h:outputText value="Last Name"/>
20+
<h:inputText id="lastName" required="true" value="#{ELBean.lastName}"/>
21+
<h:outputText value="Save by value binding"/>
22+
<h:commandButton value="Save" action="#{ELBean.save}">
23+
24+
</h:commandButton>
25+
<h:outputText value="Evaluate backing bean EL"/>
26+
<h:commandButton value="Save" action="#{ELBean.saveByELEvaluation}">
27+
28+
</h:commandButton>
29+
<h:outputText value="Save by passing value to method"/>
30+
<h:commandButton value="Save" action="#{ELBean.saveFirstName(firstName.value.toString().concat('(passed)'))}"/>
31+
<h:outputText value="JavaScript (click after saving First Name)"/>
32+
<h:button value="Alert" onclick="alert('Hello #{ELBean.firstName}')"/>
33+
</h:panelGrid>
34+
35+
</h:form>
36+
</h:body>
37+
</html>
38+

0 commit comments

Comments
 (0)