BAEL-151 - added dep, minor changes
This commit is contained in:
parent
cc5f4770dd
commit
73a89d9400
|
@ -31,6 +31,13 @@
|
||||||
<version>${javax.el.version}</version>
|
<version>${javax.el.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- JSTL -->
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.servlet</groupId>
|
||||||
|
<artifactId>jstl</artifactId>
|
||||||
|
<version>1.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Spring -->
|
<!-- Spring -->
|
||||||
|
|
||||||
|
|
|
@ -1,52 +1,52 @@
|
||||||
<?xml version='1.0' encoding='UTF-8' ?>
|
<?xml version='1.0' encoding='UTF-8' ?>
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||||
xmlns:h="http://java.sun.com/jsf/html"
|
xmlns:h="http://java.sun.com/jsf/html"
|
||||||
xmlns:c="http://java.sun.com/jsp/jstl/core"
|
xmlns:c="http://java.sun.com/jsp/jstl/core"
|
||||||
xmlns:f="http://java.sun.com/jsf/core">
|
xmlns:f="http://java.sun.com/jsf/core">
|
||||||
<h:head>
|
<h:head>
|
||||||
<title>Baeldung | The EL Intro</title>
|
<title>Baeldung | The EL Intro</title>
|
||||||
|
</h:head>
|
||||||
|
|
||||||
</h:head>
|
<h:body>
|
||||||
|
<h:form id="elForm">
|
||||||
<h:body>
|
|
||||||
<h:form id="elForm">
|
|
||||||
|
|
||||||
|
|
||||||
<h:messages />
|
<h:messages/>
|
||||||
<h:panelGrid columns="2">
|
<h:panelGrid columns="2">
|
||||||
<h:outputText value="First Name"/>
|
<h:outputText value="First Name"/>
|
||||||
<h:inputText id="firstName" binding="#{firstName}" required="true" value="#{ELBean.firstName}"/>
|
<h:inputText id="firstName" binding="#{firstName}" required="true" value="#{ELBean.firstName}"/>
|
||||||
<h:outputText value="Last Name"/>
|
<h:outputText value="Last Name"/>
|
||||||
<h:inputText id="lastName" required="true" value="#{ELBean.lastName}"/>
|
<h:inputText id="lastName" required="true" value="#{ELBean.lastName}"/>
|
||||||
<h:outputText value="Save by value binding"/>
|
<h:outputText value="Save by value binding"/>
|
||||||
<h:commandButton value="Save" action="#{ELBean.save}">
|
<h:commandButton value="Save" action="#{ELBean.save}">
|
||||||
|
|
||||||
</h:commandButton>
|
</h:commandButton>
|
||||||
<h:outputText value="Evaluate backing bean EL"/>
|
<h:outputText value="Evaluate backing bean EL"/>
|
||||||
<h:commandButton value="Save" action="#{ELBean.saveByELEvaluation}">
|
<h:commandButton value="Save" action="#{ELBean.saveByELEvaluation}">
|
||||||
|
</h:commandButton>
|
||||||
|
<h:outputText value="Save by passing value to method"/>
|
||||||
|
<h:commandButton value="Save"
|
||||||
|
action="#{ELBean.saveFirstName(firstName.value.toString().concat('(passed)'))}"/>
|
||||||
|
<h:outputText value="JavaScript (click after saving First Name)"/>
|
||||||
|
<h:button value="Alert" onclick="alert('Hello #{ELBean.firstName}')"/>
|
||||||
|
</h:panelGrid>
|
||||||
|
|
||||||
</h:commandButton>
|
<br/>
|
||||||
<h:outputText value="Save by passing value to method"/>
|
<h:outputText value="Current Request HTTP Headers:"/>
|
||||||
<h:commandButton value="Save" action="#{ELBean.saveFirstName(firstName.value.toString().concat('(passed)'))}"/>
|
<table border="1">
|
||||||
<h:outputText value="JavaScript (click after saving First Name)"/>
|
<th>Key</th>
|
||||||
<h:button value="Alert" onclick="alert('Hello #{ELBean.firstName}')"/>
|
<th>Value</th>
|
||||||
</h:panelGrid>
|
<c:forEach items="#{header}" var="header">
|
||||||
|
<tr>
|
||||||
|
<td>#{header.key}</td>
|
||||||
|
<td>#{header.value}</td>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
</table>
|
||||||
|
|
||||||
<br/>
|
</h:form>
|
||||||
<h:outputText value="Current Request HTTP Headers:"/>
|
</h:body>
|
||||||
<table border="1">
|
|
||||||
<th>Key</th>
|
|
||||||
<th>Value</th>
|
|
||||||
<c:forEach items="#{header}" var="header">
|
|
||||||
<tr>
|
|
||||||
<td>#{header.key}</td>
|
|
||||||
<td>#{header.value}</td>
|
|
||||||
</tr>
|
|
||||||
</c:forEach>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</h:form>
|
|
||||||
</h:body>
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue