Update booking-portflet-faces sample

This commit is contained in:
Rossen Stoyanchev
2014-05-29 21:24:00 -04:00
parent e62cb1d394
commit 2b8187e1db
5 changed files with 22 additions and 20 deletions

View File

@@ -12,7 +12,7 @@
<springwebflow-version>2.4.0.RELEASE</springwebflow-version>
<spring-framework-version>4.0.5.RELEASE</spring-framework-version>
<slf4j-version>1.7.5</slf4j-version>
<myfaces-version>2.1.6</myfaces-version>
<mojarra-version>2.2.6</mojarra-version>
</properties>
<repositories>
@@ -88,14 +88,14 @@
</dependency>
<!-- JSF -->
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>${myfaces-version}</version>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>${mojarra-version}</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<version>${myfaces-version}</version>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>${mojarra-version}</version>
</dependency>
<!-- Logging -->
<dependency>

View File

@@ -5,11 +5,11 @@
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
http://www.springframework.org/schema/tx/spring-tx-4.0.xsd">
<!-- Activates annotation-based bean configuration -->
<context:annotation-config />

View File

@@ -7,9 +7,9 @@
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/webflow-config
http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd
http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.4.xsd
http://www.springframework.org/schema/faces
http://www.springframework.org/schema/faces/spring-faces-2.2.xsd">
http://www.springframework.org/schema/faces/spring-faces-2.4.xsd">
<!-- Maps portlet modes to handlers -->
<bean id="portletModeHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping">
@@ -51,7 +51,7 @@
</webflow:flow-registry>
<!-- Configures the Spring Web Flow JSF integration -->
<faces:flow-builder-services id="facesFlowBuilderServices" />
<faces:flow-builder-services id="facesFlowBuilderServices" development="true" />
<!-- Installs a listener that creates and releases the FacesContext for each request. -->
<bean id="facesContextLifecycleListener" class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener"/>

View File

@@ -1,10 +1,12 @@
<?xml version="1.0"?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<?xml version="1.0" encoding="UTF-8"?>
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version="2.0">
<faces-config>
<application>
<view-handler>org.springframework.faces.webflow.context.portlet.PortletViewHandler</view-handler>
</application>
</faces-config>

View File

@@ -13,7 +13,7 @@
</p>
<div id="searchResults">
<h:outputText id="noHotelsText" value="No Hotels Found" rendered="#{hotels.rowCount == 0}"/>
<h:dataTable id="hotels" styleClass="summary" value="#{hotels}" var="hotel" rendered="#{hotels.rowCount > 0}">
<h:dataTable id="hotelsTable" styleClass="summary" value="#{hotels}" var="hotel" rendered="#{hotels.rowCount > 0}">
<h:column>
<f:facet name="header">Name</f:facet>
#{hotel.name}
@@ -32,7 +32,7 @@
</h:column>
<h:column>
<f:facet name="header">Action</f:facet>
<h:commandLink id="viewHotelLink" value="View Hotel" action="select"/>
<h:commandLink value="View Hotel" action="select"/>
</h:column>
</h:dataTable>
<div class="next">