SWF-1368 Update booking-faces to use PrimeFaces components
@@ -51,6 +51,7 @@
|
||||
<dependency org="org.springframework.webflow" name="org.springframework.js" rev="latest.integration" conf="compile->runtime"/>
|
||||
<dependency org="org.springframework.webflow" name="org.springframework.webflow" rev="latest.integration" conf="compile->runtime"/>
|
||||
<dependency org="org.springframework.webflow" name="org.springframework.faces" rev="latest.integration" conf="compile->mojarra20"/>
|
||||
<dependency org="org.primefaces" name="primefaces" rev="2.2.M1-SNAPSHOT" changing="true" conf="compile->default"/>
|
||||
|
||||
<!-- test-time only dependencies -->
|
||||
<dependency org="org.easymock" name="com.springsource.org.easymock" rev="2.3.0" conf="test->runtime" />
|
||||
|
||||
@@ -152,6 +152,11 @@
|
||||
<artifactId>jsf-impl</artifactId>
|
||||
<version>2.0.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.primefaces</groupId>
|
||||
<artifactId>primefaces</artifactId>
|
||||
<version>2.2.M1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- build time only dependencies -->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
@@ -217,6 +222,12 @@
|
||||
<name>Repository for Projects On Hosted on java.net</name>
|
||||
<url>http://download.java.net/maven/2</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>prime-repo</id>
|
||||
<name>Prime Technology Maven Repository</name>
|
||||
<url>http://repository.prime.com.tr</url>
|
||||
<layout>default</layout>
|
||||
</repository>
|
||||
</repositories>
|
||||
<build>
|
||||
<finalName>swf-booking-faces</finalName>
|
||||
|
||||
@@ -18,9 +18,12 @@ public interface BookingService {
|
||||
/**
|
||||
* Find hotels available for booking by some criteria.
|
||||
* @param criteria the search criteria
|
||||
* @param firstResult the index of the first result to return
|
||||
* @param sortBy the field to sort by
|
||||
* @param ascending true if the sorting should be in ascending order, false for descending
|
||||
* @return a list of hotels meeting the criteria
|
||||
*/
|
||||
public List<Hotel> findHotels(SearchCriteria criteria);
|
||||
public List<Hotel> findHotels(SearchCriteria criteria, int firstResult, String sortBy, boolean ascending);
|
||||
|
||||
/**
|
||||
* Find hotels by their identifier.
|
||||
@@ -43,4 +46,11 @@ public interface BookingService {
|
||||
*/
|
||||
public void cancelBooking(Booking booking);
|
||||
|
||||
/**
|
||||
* Return the total number of hotels for the given criteria.
|
||||
* @param criteria the criteria to use
|
||||
* @return the number of matching hotels
|
||||
*/
|
||||
int getNumberOfHotels(SearchCriteria criteria);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.springframework.webflow.samples.booking;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.primefaces.model.LazyDataModel;
|
||||
|
||||
public class HotelLazyDataModel extends LazyDataModel<Hotel> {
|
||||
|
||||
private static final long serialVersionUID = -8832831134966938627L;
|
||||
|
||||
SearchCriteria searchCriteria;
|
||||
|
||||
BookingService bookingService;
|
||||
|
||||
private Hotel selected;
|
||||
|
||||
public HotelLazyDataModel(SearchCriteria searchCriteria, BookingService bookingService) {
|
||||
this.searchCriteria = searchCriteria;
|
||||
this.bookingService = bookingService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Hotel> load(int first, int pageSize, String sortField, boolean sortOrder, Map<String, String> filters) {
|
||||
searchCriteria.setCurrentPage(first / pageSize + 1);
|
||||
return bookingService.findHotels(searchCriteria, first, sortField, sortOrder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRowCount() {
|
||||
return bookingService.getNumberOfHotels(searchCriteria);
|
||||
}
|
||||
|
||||
public Hotel getSelected() {
|
||||
return selected;
|
||||
}
|
||||
|
||||
public void setSelected(Hotel selected) {
|
||||
this.selected = selected;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.springframework.webflow.samples.booking;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
@@ -17,7 +18,9 @@ import org.springframework.util.StringUtils;
|
||||
*/
|
||||
@Service("bookingService")
|
||||
@Repository
|
||||
public class JpaBookingService implements BookingService {
|
||||
public class JpaBookingService implements BookingService, Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private EntityManager em;
|
||||
|
||||
@@ -39,13 +42,25 @@ public class JpaBookingService implements BookingService {
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<Hotel> findHotels(SearchCriteria criteria) {
|
||||
public List<Hotel> findHotels(SearchCriteria criteria, int firstResult, String orderBy, boolean ascending) {
|
||||
String pattern = getSearchPattern(criteria);
|
||||
orderBy = (orderBy != null) ? orderBy : "name";
|
||||
String orderDirection = (ascending) ? " ASC" : " DESC";
|
||||
return em.createQuery(
|
||||
"select h from Hotel h where lower(h.name) like " + pattern + " or lower(h.city) like " + pattern
|
||||
+ " or lower(h.zip) like " + pattern + " or lower(h.address) like " + pattern + " order by h."
|
||||
+ criteria.getSortBy()).setMaxResults(criteria.getPageSize()).setFirstResult(
|
||||
criteria.getPage() * criteria.getPageSize()).getResultList();
|
||||
"select h from Hotel h where lower(h.name) like :pattern or lower(h.city) like :pattern "
|
||||
+ "or lower(h.zip) like :pattern or lower(h.address) like :pattern order by h." + orderBy
|
||||
+ orderDirection).setParameter("pattern", pattern).setMaxResults(criteria.getPageSize())
|
||||
.setFirstResult(firstResult).getResultList();
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
public int getNumberOfHotels(SearchCriteria criteria) {
|
||||
String pattern = getSearchPattern(criteria);
|
||||
Long count = (Long) em.createQuery(
|
||||
"select count(h.id) from Hotel h where lower(h.name) like :pattern or lower(h.city) like :pattern "
|
||||
+ "or lower(h.zip) like :pattern or lower(h.address) like :pattern").setParameter("pattern",
|
||||
pattern).getSingleResult();
|
||||
return count.intValue();
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
@@ -75,9 +90,9 @@ public class JpaBookingService implements BookingService {
|
||||
|
||||
private String getSearchPattern(SearchCriteria criteria) {
|
||||
if (StringUtils.hasText(criteria.getSearchString())) {
|
||||
return "'%" + criteria.getSearchString().toLowerCase().replace('*', '%') + "%'";
|
||||
return "%" + criteria.getSearchString().toLowerCase().replace('*', '%') + "%";
|
||||
} else {
|
||||
return "'%'";
|
||||
return "%";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ package org.springframework.webflow.samples.booking;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.faces.model.DataModel;
|
||||
|
||||
/**
|
||||
* A backing bean for the main hotel search form. Encapsulates the criteria needed to perform a hotel search.
|
||||
*/
|
||||
@@ -20,18 +22,16 @@ public class SearchCriteria implements Serializable {
|
||||
private int pageSize = 5;
|
||||
|
||||
/**
|
||||
* The current page of the Hotel result list.
|
||||
* The page the user is currently on.
|
||||
*/
|
||||
private int page;
|
||||
private int currentPage = 1;
|
||||
|
||||
private String sortBy = "name";
|
||||
|
||||
public String getSortBy() {
|
||||
return sortBy;
|
||||
}
|
||||
|
||||
public void setSortBy(String sortBy) {
|
||||
this.sortBy = sortBy;
|
||||
/**
|
||||
* Returns a {@link DataModel} based on the search criteria.
|
||||
* @param bookingService the service to use to retrieve hotels.
|
||||
*/
|
||||
public DataModel<Hotel> getDataModel(BookingService bookingService) {
|
||||
return new HotelLazyDataModel(this, bookingService);
|
||||
}
|
||||
|
||||
public String getSearchString() {
|
||||
@@ -50,28 +50,16 @@ public class SearchCriteria implements Serializable {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public int getPage() {
|
||||
return page;
|
||||
public int getCurrentPage() {
|
||||
return currentPage;
|
||||
}
|
||||
|
||||
public void setPage(int page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public void nextPage() {
|
||||
page++;
|
||||
}
|
||||
|
||||
public void previousPage() {
|
||||
page--;
|
||||
}
|
||||
|
||||
public void resetPage() {
|
||||
page = 0;
|
||||
sortBy = "name";
|
||||
public void setCurrentPage(int currentPage) {
|
||||
this.currentPage = currentPage;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "[Search Criteria searchString = '" + searchString + "'";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,10 +9,11 @@
|
||||
http://www.springframework.org/schema/security/spring-security-3.0.xsd">
|
||||
|
||||
<!-- Configure Spring Security -->
|
||||
<security:http auto-config="true">
|
||||
<security:http auto-config="true" use-expressions="true">
|
||||
<security:form-login login-page="/spring/login" login-processing-url="/spring/loginProcess"
|
||||
default-target-url="/spring/main" authentication-failure-url="/spring/login?login_error=1" />
|
||||
<security:logout logout-url="/spring/logout" logout-success-url="/spring/logoutSuccess" />
|
||||
<security:intercept-url pattern="/secure" method="POST" access="hasRole('ROLE_SUPERVISOR')"/>
|
||||
</security:http>
|
||||
|
||||
<!--
|
||||
|
||||
@@ -3,8 +3,15 @@
|
||||
xmlns:ui="http://java.sun.com/jsf/facelets"
|
||||
xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:f="http://java.sun.com/jsf/core"
|
||||
xmlns:p="http://primefaces.prime.com.tr/ui"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="notes">
|
||||
<p>
|
||||
Check the calendar widget and the tooltips on the credit card fields.
|
||||
The form uses Ajax-based validations to redisplay server-side errors without refreshing the entire page.
|
||||
The booking bean backing the form is a flow-scoped object (see <strong>booking-flow.xml</strong>).
|
||||
</p>
|
||||
</ui:define>
|
||||
<ui:define name="content">
|
||||
<div class="span-5">
|
||||
<h3>${booking.hotel.name}</h3>
|
||||
@@ -16,137 +23,130 @@
|
||||
${booking.hotel.country}
|
||||
</address>
|
||||
</div>
|
||||
<h:panelGroup id="bookingsFragment" styleClass="span-12" layout="block">
|
||||
<h:messages errorClass="error" layout="table"/>
|
||||
<h:form id="bookingForm">
|
||||
<fieldset>
|
||||
<legend>Book Hotel</legend>
|
||||
<div>
|
||||
<div class="span-4 label">
|
||||
Nightly rate:
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p>
|
||||
<h:outputText value="#{booking.hotel.price}">
|
||||
<f:convertNumber type="currency" currencySymbol="$"/>
|
||||
</h:outputText>
|
||||
</p>
|
||||
</div>
|
||||
<h:form id="bookingForm">
|
||||
<p:fieldset legend="Book Hotel">
|
||||
<p:messages />
|
||||
<div>
|
||||
<div class="span-4 label">
|
||||
Nightly rate:
|
||||
</div>
|
||||
<div>
|
||||
<div class="span-4">
|
||||
<h:outputLabel for="checkinDate">Check In:</h:outputLabel>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p>
|
||||
<h:inputText id="checkinDate" value="#{booking.checkinDate}" required="true">
|
||||
<f:convertDateTime pattern="MM-dd-yyyy" timeZone="EST"/>
|
||||
</h:inputText>
|
||||
</p>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p>
|
||||
<h:outputText value="#{booking.hotel.price}">
|
||||
<f:convertNumber type="currency" currencySymbol="$"/>
|
||||
</h:outputText>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="span-4">
|
||||
<h:outputLabel for="checkinDate">Check In:</h:outputLabel>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="span-4">
|
||||
<h:outputLabel for="checkoutDate">Check Out:</h:outputLabel>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p>
|
||||
<h:inputText id="checkoutDate" value="#{booking.checkoutDate}" required="true">
|
||||
<f:convertDateTime pattern="MM-dd-yyyy" timeZone="EST"/>
|
||||
</h:inputText>
|
||||
</p>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p>
|
||||
<p:calendar id="checkinDate" value="#{booking.checkinDate}" pattern="MM-dd-yyyy" timeZone="EST" required="true" />
|
||||
</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="span-4">
|
||||
<h:outputLabel for="beds">Room Preference:</h:outputLabel>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p>
|
||||
<h:selectOneMenu id="beds" value="#{booking.beds}">
|
||||
<f:selectItems value="#{referenceData.bedOptions}"/>
|
||||
</h:selectOneMenu>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="span-4">
|
||||
<h:outputLabel for="checkoutDate">Check Out:</h:outputLabel>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="span-4">
|
||||
<h:outputLabel for="smoking">Smoking Preference:</h:outputLabel>
|
||||
</div>
|
||||
<div id="radio" class="span-7 last">
|
||||
<h:selectOneRadio id="smoking" value="#{booking.smoking}" layout="pageDirection">
|
||||
<f:selectItems value="#{referenceData.smokingOptions}"/>
|
||||
</h:selectOneRadio>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p>
|
||||
<p:calendar id="checkoutDate" value="#{booking.checkoutDate}" pattern="MM-dd-yyyy" timeZone="EST" required="true" />
|
||||
</p>
|
||||
</div>
|
||||
<!--
|
||||
The "amenities" section commented out due to the following issue:
|
||||
|
||||
https://issues.apache.org/jira/browse/MYFACES-2739
|
||||
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=817
|
||||
https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1694
|
||||
|
||||
<div class="field">
|
||||
<div class="span-4">
|
||||
<h:outputLabel for="amenities">Amenities:</h:outputLabel>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<h:selectManyCheckbox id="amenities" value="#{booking.amenities}" layout="pageDirection">
|
||||
<f:selectItem itemValue="OCEAN_VIEW" itemLabel="Ocean View" />
|
||||
<f:selectItem itemValue="LATE_CHECKOUT" itemLabel="Late Checkout" />
|
||||
<f:selectItem itemValue="MINIBAR" itemLabel="Minibar" />
|
||||
</h:selectManyCheckbox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="span-4">
|
||||
<h:outputLabel for="beds">Room Preference:</h:outputLabel>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p>
|
||||
<h:selectOneMenu id="beds" value="#{booking.beds}">
|
||||
<f:selectItems value="#{referenceData.bedOptions}"/>
|
||||
</h:selectOneMenu>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="span-4">
|
||||
<h:outputLabel for="smoking">Smoking Preference:</h:outputLabel>
|
||||
</div>
|
||||
<div id="radio" class="span-7 last">
|
||||
<h:selectOneRadio id="smoking" value="#{booking.smoking}" layout="pageDirection">
|
||||
<f:selectItems value="#{referenceData.smokingOptions}"/>
|
||||
</h:selectOneRadio>
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
The "amenities" section commented out due to the following issue:
|
||||
|
||||
https://issues.apache.org/jira/browse/MYFACES-2739
|
||||
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=817
|
||||
https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1694
|
||||
|
||||
<div class="field">
|
||||
<div class="span-4">
|
||||
<h:outputLabel for="amenities">Amenities:</h:outputLabel>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<h:selectManyCheckbox id="amenities" value="#{booking.amenities}" layout="pageDirection">
|
||||
<f:selectItem itemValue="OCEAN_VIEW" itemLabel="Ocean View" />
|
||||
<f:selectItem itemValue="LATE_CHECKOUT" itemLabel="Late Checkout" />
|
||||
<f:selectItem itemValue="MINIBAR" itemLabel="Minibar" />
|
||||
</h:selectManyCheckbox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
-->
|
||||
<div class="field">
|
||||
<div class="span-4">
|
||||
<h:outputLabel for="creditCard">Credit Card #:</h:outputLabel>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p>
|
||||
<h:inputText id="creditCard" value="#{booking.creditCard}">
|
||||
<f:validateRegex pattern="[0-9]{16}" />
|
||||
</h:inputText>
|
||||
</p>
|
||||
</div>
|
||||
-->
|
||||
<div class="field">
|
||||
<div class="span-4">
|
||||
<h:outputLabel for="creditCard">Credit Card #:</h:outputLabel>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="span-4">
|
||||
<h:outputLabel for="creditCardName">Credit Card Name:</h:outputLabel>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p>
|
||||
<h:inputText id="creditCardName" value="#{booking.creditCardName}">
|
||||
<f:validateLength minimum="3" />
|
||||
</h:inputText>
|
||||
</p>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p>
|
||||
<h:inputText id="creditCard" value="#{booking.creditCard}">
|
||||
<f:validateRegex pattern="[0-9]{16}" />
|
||||
</h:inputText>
|
||||
<p:tooltip for="creditCard" value="16-digit credit card number." style="cream" position="bottomLeft" />
|
||||
</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="span-4">
|
||||
<h:outputLabel for="creditCardExpiryMonth">Expiration Date:</h:outputLabel>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p>
|
||||
<h:selectOneMenu id="creditCardExpiryMonth" value="#{booking.creditCardExpiryMonth}">
|
||||
<f:selectItems value="#{referenceData.creditCardExpMonths}" />
|
||||
</h:selectOneMenu>
|
||||
<h:selectOneMenu id="creditCardExpiryYear" value="#{booking.creditCardExpiryYear}">
|
||||
<f:selectItems value="#{referenceData.creditCardExpYears}"/>
|
||||
</h:selectOneMenu>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="span-4">
|
||||
<h:outputLabel for="creditCardName">Credit Card Name:</h:outputLabel>
|
||||
</div>
|
||||
<div>
|
||||
<h:commandButton id="proceed" action="proceed" value="Proceed">
|
||||
<f:ajax render=":bookingsFragment" execute="@form" />
|
||||
</h:commandButton> 
|
||||
<h:commandButton id="cancel" value="Cancel" action="cancel" immediate="true" />
|
||||
</div>
|
||||
</fieldset>
|
||||
</h:form>
|
||||
</h:panelGroup>
|
||||
<div class="span-7 last">
|
||||
<p>
|
||||
<h:inputText id="creditCardName" value="#{booking.creditCardName}">
|
||||
<f:validateLength minimum="3" />
|
||||
</h:inputText>
|
||||
<p:tooltip for="creditCardName" value="The name as it appears on the credit card" style="cream" position="bottomLeft" />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="span-4">
|
||||
<h:outputLabel for="creditCardExpiryMonth">Expiration Date:</h:outputLabel>
|
||||
</div>
|
||||
<div class="span-7 last">
|
||||
<p>
|
||||
<h:selectOneMenu id="creditCardExpiryMonth" value="#{booking.creditCardExpiryMonth}">
|
||||
<f:selectItems value="#{referenceData.creditCardExpMonths}" />
|
||||
</h:selectOneMenu>
|
||||
<h:selectOneMenu id="creditCardExpiryYear" value="#{booking.creditCardExpiryYear}">
|
||||
<f:selectItems value="#{referenceData.creditCardExpYears}"/>
|
||||
</h:selectOneMenu>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<p:commandButton id="proceed" action="proceed" value="Proceed" update="@form" />
|
||||
<p:commandButton id="cancel" value="Cancel" action="cancel" immediate="true" />
|
||||
</div>
|
||||
</p:fieldset>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
@@ -3,8 +3,14 @@
|
||||
xmlns:ui="http://java.sun.com/jsf/facelets"
|
||||
xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:f="http://java.sun.com/jsf/core"
|
||||
xmlns:p="http://primefaces.prime.com.tr/ui"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="notes">
|
||||
<p>
|
||||
Note that the command button actions raise events (e.g. "revise") instead of specifying method expressions.
|
||||
The events result in transitions on the server side (see reviewBooking state in <strong>booking-flow.xml</strong>).
|
||||
</p>
|
||||
</ui:define>
|
||||
<ui:define name="content">
|
||||
<div class="span-5">
|
||||
<h3>${booking.hotel.name}</h3>
|
||||
@@ -17,9 +23,8 @@
|
||||
</address>
|
||||
</div>
|
||||
<div class="span-12 last">
|
||||
<h:form id="confirm">
|
||||
<fieldset>
|
||||
<legend>Confirm Booking Details</legend>
|
||||
<h:form>
|
||||
<p:fieldset legend="Confirm Booking Details">
|
||||
<div>
|
||||
<div class="span-3">Check In:</div>
|
||||
<div class="span-8 last">
|
||||
@@ -67,11 +72,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h:commandButton id="confirm" value="Confirm" action="confirm"/> 
|
||||
<h:commandButton id="revise" value="Revise" action="revise"/> 
|
||||
<h:commandButton id="cancel" value="Cancel" action="cancel" />
|
||||
<p:commandButton id="confirm" value="Confirm" action="confirm"/> 
|
||||
<p:commandButton id="revise" value="Revise" action="revise"/> 
|
||||
<p:commandButton id="cancel" value="Cancel" action="cancel" />
|
||||
</div>
|
||||
</fieldset>
|
||||
</p:fieldset>
|
||||
</h:form>
|
||||
</div>
|
||||
</ui:define>
|
||||
|
||||
@@ -3,78 +3,72 @@
|
||||
xmlns:ui="http://java.sun.com/jsf/facelets"
|
||||
xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:f="http://java.sun.com/jsf/core"
|
||||
xmlns:p="http://primefaces.prime.com.tr/ui"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="notes">
|
||||
<p>
|
||||
This page uses the PrimeFaces panel component to display a search form.
|
||||
Mouse over the "Search String" field to see its tooltip.
|
||||
If you are logged a second panel will show your current bookings.
|
||||
Both panels can be toggled on and off.
|
||||
</p>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
|
||||
<h:panelGroup id="hotelSearch" layout="block">
|
||||
<h2>Search Hotels</h2>
|
||||
<span class="errors">
|
||||
<h:messages globalOnly="true" />
|
||||
</span>
|
||||
<h:form id="mainForm" styleClass="inline">
|
||||
<fieldset>
|
||||
<div class="span-8">
|
||||
<h:outputLabel for="searchString">Search String: </h:outputLabel>
|
||||
<h:inputText id="searchString" value="#{searchCriteria.searchString}" />
|
||||
</div>
|
||||
<div class="span-6">
|
||||
<h:outputLabel for="pageSize">Maximum Results: </h:outputLabel>
|
||||
<h:selectOneMenu id="pageSize" value="#{searchCriteria.pageSize}">
|
||||
<f:selectItems value="#{referenceData.pageSizeOptions}" />
|
||||
</h:selectOneMenu>
|
||||
</div>
|
||||
<div class="span-3 last">
|
||||
<h:commandButton id="findHotels" value="Find Hotels" action="search" >
|
||||
<f:ajax render="@form" execute="@form" />
|
||||
</h:commandButton>
|
||||
</div>
|
||||
</fieldset>
|
||||
</h:form>
|
||||
</h:panelGroup>
|
||||
<p:panel header="Search Hotels" toggleable="true" toggleSpeed="100">
|
||||
<h:form>
|
||||
<p:messages globalOnly="true" />
|
||||
<h:panelGrid columns="2">
|
||||
<h:outputLabel for="searchString">Search String: </h:outputLabel>
|
||||
<h:inputText id="searchString" value="#{searchCriteria.searchString}" />
|
||||
<h:outputLabel for="pageSize">Maximum Results: </h:outputLabel>
|
||||
<h:selectOneMenu id="pageSize" value="#{searchCriteria.pageSize}">
|
||||
<f:selectItems value="#{referenceData.pageSizeOptions}" />
|
||||
</h:selectOneMenu>
|
||||
<p:commandButton id="findHotels" value="Find Hotels" action="search" update="@form" />
|
||||
</h:panelGrid>
|
||||
<p:tooltip for="searchString" targetPosition="topRight" position="bottomLeft"
|
||||
value="Search hotels by name, address, city, or zip." style="cream" />
|
||||
</h:form>
|
||||
</p:panel>
|
||||
|
||||
<h:panelGroup id="bookingsFragment" rendered="#{currentUser!=null}" layout="block">
|
||||
<h2>Current Hotel Bookings</h2>
|
||||
<p:panel id="bookings" header="Your Hotel Bookings" rendered="#{currentUser!=null}" toggleable="true" toggleSpeed="100" style="margin-top: 10px">
|
||||
<h:outputText value="No Bookings Found" rendered="#{bookings.rowCount==0}"/>
|
||||
<h:form id="bookingsForm" rendered="#{bookings.rowCount > 0}">
|
||||
<h:dataTable id="bookings" styleClass="summary" value="#{bookings}" var="booking">
|
||||
<h:column>
|
||||
<f:facet name="header">Name</f:facet>
|
||||
#{booking.hotel.name}
|
||||
</h:column>
|
||||
<h:column>
|
||||
<f:facet name="header">Address</f:facet>
|
||||
#{booking.hotel.address}
|
||||
</h:column>
|
||||
<h:column>
|
||||
<f:facet name="header">City, State</f:facet>
|
||||
#{booking.hotel.city}, #{booking.hotel.state}
|
||||
</h:column>
|
||||
<h:column>
|
||||
<f:facet name="header">Check in date</f:facet>
|
||||
<h:outputText value="#{booking.checkinDate}">
|
||||
<f:convertDateTime dateStyle="short"/>
|
||||
</h:outputText>
|
||||
</h:column>
|
||||
<h:column>
|
||||
<f:facet name="header">Check out date</f:facet>
|
||||
<h:outputText value="#{booking.checkoutDate}">
|
||||
<f:convertDateTime dateStyle="short"/>
|
||||
</h:outputText>
|
||||
</h:column>
|
||||
<h:column>
|
||||
<f:facet name="header">Confirmation number</f:facet>
|
||||
#{booking.id}
|
||||
</h:column>
|
||||
<h:column>
|
||||
<f:facet name="header">Action</f:facet>
|
||||
<h:commandLink id="cancel" value="Cancel" action="cancelBooking">
|
||||
<f:ajax render=":bookingsFragment" />
|
||||
</h:commandLink>
|
||||
</h:column>
|
||||
</h:dataTable>
|
||||
</h:form>
|
||||
</h:panelGroup>
|
||||
<h:form rendered="#{bookings.rowCount > 0}">
|
||||
<p:outputPanel id="bookingsContent">
|
||||
<p:dataTable value="#{bookings}" var="booking">
|
||||
<p:column>
|
||||
<f:facet name="header">Hotel</f:facet>
|
||||
#{booking.hotel.name}<br/>
|
||||
#{booking.hotel.address}<br/>
|
||||
#{booking.hotel.city}, #{booking.hotel.state}
|
||||
</p:column>
|
||||
<p:column>
|
||||
<f:facet name="header">Check in</f:facet>
|
||||
<h:outputText value="#{booking.checkinDate}">
|
||||
<f:convertDateTime dateStyle="short"/>
|
||||
</h:outputText>
|
||||
</p:column>
|
||||
<p:column>
|
||||
<f:facet name="header">Check out</f:facet>
|
||||
<h:outputText value="#{booking.checkoutDate}">
|
||||
<f:convertDateTime dateStyle="short"/>
|
||||
</h:outputText>
|
||||
</p:column>
|
||||
<p:column>
|
||||
<f:facet name="header">Confirmation #</f:facet>
|
||||
#{booking.id}
|
||||
</p:column>
|
||||
<p:column>
|
||||
<f:facet name="header">Action</f:facet>
|
||||
<p:commandButton id="cancel" value="Cancel" action="cancelBooking" update=":bookings"/>
|
||||
</p:column>
|
||||
</p:dataTable>
|
||||
</p:outputPanel>
|
||||
</h:form>
|
||||
</p:panel>
|
||||
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
@@ -9,37 +9,25 @@
|
||||
<on-render>
|
||||
<evaluate expression="bookingService.findBookings(currentUser?.name)" result="viewScope.bookings" result-type="dataModel" />
|
||||
</on-render>
|
||||
<transition on="search" to="reviewHotels">
|
||||
<evaluate expression="searchCriteria.resetPage()" />
|
||||
</transition>
|
||||
<transition on="search" to="reviewHotels"/>
|
||||
<transition on="cancelBooking">
|
||||
<evaluate expression="bookingService.cancelBooking(bookings.selectedRow)" />
|
||||
<render fragments="bookingsFragment" />
|
||||
</transition>
|
||||
</view-state>
|
||||
|
||||
<view-state id="reviewHotels">
|
||||
<on-render>
|
||||
<evaluate expression="bookingService.findHotels(searchCriteria)" result="viewScope.hotels" result-type="dataModel" />
|
||||
</on-render>
|
||||
<transition on="sort">
|
||||
<set name="searchCriteria.sortBy" value="requestParameters.sortBy" />
|
||||
</transition>
|
||||
<transition on="previous">
|
||||
<evaluate expression="searchCriteria.previousPage()" />
|
||||
</transition>
|
||||
<transition on="next">
|
||||
<evaluate expression="searchCriteria.nextPage()" />
|
||||
</transition>
|
||||
<on-entry>
|
||||
<set name="viewScope.hotels" value="searchCriteria.getDataModel(bookingService)" />
|
||||
</on-entry>
|
||||
<transition on="select" to="reviewHotel">
|
||||
<set name="flowScope.hotel" value="hotels.selectedRow" />
|
||||
<set name="flowScope.hotel" value="hotels.selected" />
|
||||
</transition>
|
||||
<transition on="changeSearch" to="enterSearchCriteria" />
|
||||
</view-state>
|
||||
|
||||
<view-state id="reviewHotel">
|
||||
<transition on="book" to="bookHotel" />
|
||||
<transition on="cancel" to="enterSearchCriteria" />
|
||||
<transition on="cancel" to="reviewHotels" />
|
||||
</view-state>
|
||||
|
||||
<subflow-state id="bookHotel" subflow="booking">
|
||||
|
||||
@@ -3,10 +3,20 @@
|
||||
xmlns:ui="http://java.sun.com/jsf/facelets"
|
||||
xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:f="http://java.sun.com/jsf/core"
|
||||
xmlns:p="http://primefaces.prime.com.tr/ui"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="notes">
|
||||
<p>
|
||||
Clicking "Book" will launch the booking sub-flow (see the subflow state in <strong>main-flow.xml</strong>).
|
||||
</p>
|
||||
<p>
|
||||
The booking flow is protected with Spring Security (see the secured attribute in <strong>booking-flow.xml</strong>).
|
||||
</p>
|
||||
<p>
|
||||
Clicking "Back to Search" will take you to the stateful search results.
|
||||
</p>
|
||||
</ui:define>
|
||||
<ui:define name="content">
|
||||
|
||||
<h1>${hotel.name}</h1>
|
||||
<address>
|
||||
${hotel.address}
|
||||
@@ -25,10 +35,9 @@
|
||||
</h:outputText>
|
||||
</p>
|
||||
<div>
|
||||
<h:commandButton id="book" action="book" value="Book Hotel"/>  
|
||||
<h:commandButton id="cancel" action="cancel" value="Back to Search"/>
|
||||
<p:commandButton id="book" action="book" value="Book Hotel" ajax="false" />
|
||||
<p:commandButton id="cancel" action="cancel" value="Back to Search"/>
|
||||
</div>
|
||||
</h:form>
|
||||
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
@@ -3,61 +3,50 @@
|
||||
xmlns:ui="http://java.sun.com/jsf/facelets"
|
||||
xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:f="http://java.sun.com/jsf/core"
|
||||
xmlns:p="http://primefaces.prime.com.tr/ui"
|
||||
template="/WEB-INF/layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="notes">
|
||||
<p>
|
||||
This page uses the PrimeFaces data table backed by a lazily loaded DataModel (see <strong>HotelLazyDataModel.java</strong>).
|
||||
Page navigation is Ajax-based and uses JSF 2 partial rendering.
|
||||
The name and city columns support forward and reverse sorting.
|
||||
</p>
|
||||
<p>
|
||||
The DataModel is created and stored in view scope when the view is first entered (see <strong>main-flow.xml</strong>).
|
||||
When the user makes a selection, the selection is stored in a flow-scoped "hotel" variable before transitioning to the detail page.
|
||||
</p>
|
||||
</ui:define>
|
||||
<ui:define name="content">
|
||||
|
||||
<h:form id="hotelResults">
|
||||
<div>
|
||||
<h2>Hotel Results</h2>
|
||||
<p>
|
||||
<h:commandLink value="Change Search" action="changeSearch"/>
|
||||
</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="h" rendered="#{hotels.rowCount > 0}">
|
||||
<h:column>
|
||||
<f:facet name="header">
|
||||
<h:commandLink id="sortByNameLink" action="sort" value="Name">
|
||||
<f:param name="sortBy" value="name" />
|
||||
<f:ajax render="hotels" />
|
||||
</h:commandLink>
|
||||
</f:facet>
|
||||
#{h.name}
|
||||
</h:column>
|
||||
<h:column>
|
||||
<f:facet name="header">Address</f:facet>
|
||||
#{h.address}
|
||||
</h:column>
|
||||
<h:column>
|
||||
<f:facet name="header">
|
||||
<h:commandLink id="sortByCity" action="sort" value="City, State">
|
||||
<f:param name="sortBy" value="city" />
|
||||
<f:ajax render="hotels" />
|
||||
</h:commandLink>
|
||||
</f:facet>
|
||||
#{h.city}, #{h.state}, #{h.country}
|
||||
</h:column>
|
||||
<h:column>
|
||||
<f:facet name="header">Zip</f:facet>
|
||||
#{h.zip}
|
||||
</h:column>
|
||||
<h:column>
|
||||
<f:facet name="header">Action</f:facet>
|
||||
<h:commandLink id="viewHotelLink" value="View Hotel" action="select"/>
|
||||
</h:column>
|
||||
</h:dataTable>
|
||||
<div class="buttonGroup">
|
||||
<h:commandLink id="previousPageLink" value="Previous Results" action="previous" rendered="#{searchCriteria.page > 0}">
|
||||
<f:ajax render="@form" />
|
||||
</h:commandLink>
|
||||
|
||||
<h:commandLink id="nextPageLink" value="More Results" action="next" rendered="#{not empty hotels and hotels.rowCount == searchCriteria.pageSize}">
|
||||
<f:ajax render="@form" />
|
||||
</h:commandLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h:form>
|
||||
<p:dataTable id="hotels" var="h" value="#{hotels}" paginator="true" dynamic="true" lazy="true"
|
||||
rows="#{searchCriteria.pageSize}" page="#{searchCrtieria.currentPage}">
|
||||
<f:facet name="header">
|
||||
Hotel Search Results<br/>
|
||||
<p:commandLink value="Modify or start search again" action="changeSearch" styleClass="alt" />
|
||||
</f:facet>
|
||||
<p:column sortBy="#{h.name}">
|
||||
<f:facet name="header">Name</f:facet>
|
||||
#{h.name}
|
||||
</p:column>
|
||||
<p:column>
|
||||
<f:facet name="header">Address</f:facet>
|
||||
#{h.address}
|
||||
</p:column>
|
||||
<p:column sortBy="#{h.city}">
|
||||
<f:facet name="header">City, State</f:facet>
|
||||
#{h.city}, #{h.state}, #{h.country}
|
||||
</p:column>
|
||||
<p:column>
|
||||
<f:facet name="header">Zip</f:facet>
|
||||
#{h.zip}
|
||||
</p:column>
|
||||
<p:column>
|
||||
<f:facet name="header">Action</f:facet>
|
||||
<p:commandButton id="viewHotelLink" value="View" action="select" image="ui-icon-search">
|
||||
<f:setPropertyActionListener value="#{h}" target="#{hotels.selected}" />
|
||||
</p:commandButton>
|
||||
</p:column>
|
||||
</p:dataTable>
|
||||
</h:form>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
@@ -6,35 +6,39 @@
|
||||
xmlns:sf="http://www.springframework.org/tags/faces"
|
||||
template="layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="content">
|
||||
<ui:define name="notes">
|
||||
<p>
|
||||
This is a simple standalone JSF page.
|
||||
</p>
|
||||
<p>
|
||||
Clicking the "Start" link below will launch the main to search for hotels (see <strong>main-flow.xml</strong>).
|
||||
The main flow in turn launches the booking sub-flow to book the hotel (see <strong>booking-flow.xml</strong>).
|
||||
</p>
|
||||
<p>
|
||||
The main flow is accessible without logging in while the booking flow requires authentication.
|
||||
</p>
|
||||
</ui:define>
|
||||
|
||||
<ui:define name="content">
|
||||
<div>
|
||||
<h1>Welcome to Spring Travel</h1>
|
||||
<p>
|
||||
This demonstrates how to use Spring MVC and Spring Web Flow with JSF component views.
|
||||
</p>
|
||||
<h3 class="alt">Spring Web Flow and JSF 2 with PrimeFaces components</h3>
|
||||
<hr />
|
||||
<p>
|
||||
The key features illustrated in this sample include:
|
||||
Key features illustrated in this sample:
|
||||
</p>
|
||||
<ul>
|
||||
<li>A declarative navigation model enabling full browser button support and dynamic navigation rules</li>
|
||||
<li>A fine-grained state management model, including support for ConversationScope and ViewScope</li>
|
||||
<li>A fine-grained state management model, including support for conversation, view, and flash scopes</li>
|
||||
<li>Partial page rendering via Ajax with JSF 2</li>
|
||||
<li>Modularization of web application functionality by domain use case, illustrating project structure best-practices</li>
|
||||
<li>Spring Expression Language (SpEL) integration</li>
|
||||
<li>Managed persistence contexts with the Java Persistence API (JPA)</li>
|
||||
<li>Unified Expression Language (EL) integration</li>
|
||||
<li>Spring Security integration</li>
|
||||
<li>Declarative page authoring with Facelets, including applying reusable page layouts</li>
|
||||
<li>A lightweight component library for Ajax and client-side validation that employs progressive enhancement techniques</li>
|
||||
<li>A grid layout with Blueprint CSS</li>
|
||||
<li>Page layout with Blueprint CSS</li>
|
||||
<li>Exception handling support across all layers of the application</li>
|
||||
<li>Spring IDE tooling integration, with support for graphical flow modeling and visualization</li>
|
||||
</ul>
|
||||
<p>
|
||||
<a href="main">Start your Spring Travel experience</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
@@ -1,69 +1,56 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<f:view xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:ui="http://java.sun.com/jsf/facelets"
|
||||
xmlns:f="http://java.sun.com/jsf/core"
|
||||
xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:c="http://java.sun.com/jsp/jstl/core"
|
||||
contentType="text/html" encoding="UTF-8">
|
||||
<html>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:f="http://java.sun.com/jsf/core"
|
||||
xmlns:c="http://java.sun.com/jsp/jstl/core"
|
||||
xmlns:ui="http://java.sun.com/jsf/facelets"
|
||||
xmlns:p="http://primefaces.prime.com.tr/ui">
|
||||
|
||||
<f:view contentType="text/html">
|
||||
|
||||
<h:head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Spring Faces: Hotel Booking Sample Application</title>
|
||||
<!--
|
||||
Note on serving resources:
|
||||
In Spring 3.0.4 the below resources (css and images) will be served by Spring MVC's ResourceHttpRequestHandler.
|
||||
-->
|
||||
<link rel="stylesheet" href="${request.contextPath}/styles/blueprint/screen.css" type="text/css" media="screen, projection" />
|
||||
<link rel="stylesheet" href="${request.contextPath}/styles/blueprint/print.css" type="text/css" media="print" />
|
||||
<!--[if lt IE 8]>
|
||||
<link rel="stylesheet" href="<c:url value="/blueprint/ie.css" />" type="text/css" media="screen, projection" />
|
||||
<![endif]-->
|
||||
<link rel="stylesheet" href="${request.contextPath}/styles/booking.css" type="text/css" media="screen" />
|
||||
<link rel="stylesheet" href="${request.contextPath}/styles/le-frog/jquery-ui-1.8.2.custom.css" type="text/css" media="screen" />
|
||||
<ui:insert name="headIncludes"/>
|
||||
</h:head>
|
||||
<body>
|
||||
<div id="page" class="container">
|
||||
<div id="header">
|
||||
<div id="topbar">
|
||||
<p>
|
||||
<c:if test="${not empty currentUser.name}">
|
||||
Welcome, ${currentUser.name} | <a href="${request.contextPath}/spring/logout">Logout</a>
|
||||
</c:if>
|
||||
<c:if test="${empty currentUser.name}">
|
||||
<a href="${request.contextPath}/spring/login">Login</a>
|
||||
</c:if>
|
||||
</p>
|
||||
</div>
|
||||
<div id="logo">
|
||||
<p>
|
||||
<a href="#{request.contextPath}"><img src="${request.contextPath}/images/header.jpg" alt="Spring Travel"/></a>
|
||||
</p>
|
||||
</div>
|
||||
<h:body>
|
||||
<div class="container">
|
||||
<div>
|
||||
<h4 class="alt bottom">
|
||||
<c:if test="${not empty currentUser.name}">
|
||||
Welcome, ${currentUser.name} | <a href="${request.contextPath}/spring/logout">Logout</a>
|
||||
</c:if>
|
||||
<c:if test="${empty currentUser.name}">
|
||||
<a href="${request.contextPath}/spring/login">Login</a>
|
||||
</c:if>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="content">
|
||||
<div id="local" class="span-6">
|
||||
<p>
|
||||
<a href="http://www.thespringexperience.com">
|
||||
<img src="${request.contextPath}/images/diplomat.jpg" alt="generic hotel" />
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="http://www.thespringexperience.com">
|
||||
<img src="${request.contextPath}/images/springone2gx.jpeg" alt="SpringOne 2GX" />
|
||||
</a>
|
||||
</p>
|
||||
<div>
|
||||
<a href="#{request.contextPath}"><img src="${request.contextPath}/images/header.jpg" height="200" width="950" alt="Spring Travel"/></a>
|
||||
</div>
|
||||
<hr class="space" />
|
||||
<div>
|
||||
<div id="local" class="span-4 colborder">
|
||||
<h3>Comments:</h3>
|
||||
<ui:insert name="notes"/>
|
||||
</div>
|
||||
<div id="main" class="span-18 last">
|
||||
<div class="span-19 last">
|
||||
<ui:insert name="content"/>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div id="footer">
|
||||
<hr class="space" />
|
||||
<div>
|
||||
<a href="http://www.springframework.org">
|
||||
<img src="${request.contextPath}/images/powered-by-spring.png" alt="Powered by Spring" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</h:body>
|
||||
</f:view>
|
||||
</html>
|
||||
</f:view>
|
||||
@@ -3,9 +3,15 @@
|
||||
xmlns:ui="http://java.sun.com/jsf/facelets"
|
||||
xmlns:c="http://java.sun.com/jsp/jstl/core"
|
||||
template="layouts/standard.xhtml">
|
||||
|
||||
<ui:define name="notes">
|
||||
<p>
|
||||
Form-based authentication with Spring Security.
|
||||
Spring Security is first enabled in web.xml via DelegatingFilterProxy.
|
||||
It's configuration is located in <strong>security-config.xml</strong>.
|
||||
Flow definitions can further be protected using the secured attribute (see <strong>booking-flow.xml</strong>).
|
||||
</p>
|
||||
</ui:define>
|
||||
<ui:define name="content">
|
||||
|
||||
<div class="span-5">
|
||||
<p>Valid username/passwords are:</p>
|
||||
<ul>
|
||||
@@ -15,7 +21,6 @@
|
||||
<li>scott/rochester</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="span-10 append-2 last">
|
||||
<c:if test="${not empty param.login_error}">
|
||||
<div class="error">
|
||||
@@ -49,6 +54,5 @@
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE facelet-taglib PUBLIC
|
||||
"-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
|
||||
"http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
|
||||
<facelet-taglib>
|
||||
<library-class>org.springframework.faces.security.SpringSecurityTagLibrary</library-class>
|
||||
</facelet-taglib>
|
||||
@@ -30,6 +30,12 @@
|
||||
<param-value>1</param-value>
|
||||
</context-param>
|
||||
|
||||
<!-- Declare Spring Security Facelets tag library -->
|
||||
<context-param>
|
||||
<param-name>javax.faces.FACELETS_LIBRARIES</param-name>
|
||||
<param-value>/WEB-INF/springsecurity.taglib.xml</param-value>
|
||||
</context-param>
|
||||
|
||||
<!-- Enforce UTF-8 Character Encoding -->
|
||||
<filter>
|
||||
<filter-name>charEncodingFilter</filter-name>
|
||||
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 128 B |
|
After Width: | Height: | Size: 253 B |
|
After Width: | Height: | Size: 266 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 121 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 126 B |
|
After Width: | Height: | Size: 134 B |
|
After Width: | Height: | Size: 118 B |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
489
spring-webflow-samples/booking-faces/src/main/webapp/styles/le-frog/jquery-ui-1.8.2.custom.css
vendored
Normal file
@@ -0,0 +1,489 @@
|
||||
/*
|
||||
* jQuery UI CSS Framework
|
||||
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
*/
|
||||
|
||||
/* Layout helpers
|
||||
----------------------------------*/
|
||||
.ui-helper-hidden { display: none; }
|
||||
.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
|
||||
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
|
||||
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
||||
.ui-helper-clearfix { display: inline-block; }
|
||||
/* required comment for clearfix to work in Opera \*/
|
||||
* html .ui-helper-clearfix { height:1%; }
|
||||
.ui-helper-clearfix { display:block; }
|
||||
/* end clearfix */
|
||||
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
|
||||
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-disabled { cursor: default !important; }
|
||||
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
|
||||
|
||||
|
||||
/*
|
||||
* jQuery UI CSS Framework
|
||||
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
|
||||
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
|
||||
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=10px&bgColorHeader=3a8104&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=33&borderColorHeader=3f7506&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=285c00&bgTextureContent=05_inset_soft.png&bgImgOpacityContent=10&borderColorContent=72b42d&fcContent=ffffff&iconColorContent=72b42d&bgColorDefault=4ca20b&bgTextureDefault=03_highlight_soft.png&bgImgOpacityDefault=60&borderColorDefault=45930b&fcDefault=ffffff&iconColorDefault=ffffff&bgColorHover=4eb305&bgTextureHover=03_highlight_soft.png&bgImgOpacityHover=50&borderColorHover=8bd83b&fcHover=ffffff&iconColorHover=ffffff&bgColorActive=285c00&bgTextureActive=04_highlight_hard.png&bgImgOpacityActive=30&borderColorActive=72b42d&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=fbf5d0&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=f9dd34&fcHighlight=363636&iconColorHighlight=4eb305&bgColorError=ffdc2e&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=95&borderColorError=fad000&fcError=2b2b2b&iconColorError=cd0a0a&bgColorOverlay=444444&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=15&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=07_diagonals_small.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=0px&offsetTopShadow=4px&offsetLeftShadow=4px&cornerRadiusShadow=4px
|
||||
*/
|
||||
|
||||
|
||||
/* Component containers
|
||||
----------------------------------*/
|
||||
.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; }
|
||||
.ui-widget .ui-widget { font-size: 1em; }
|
||||
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; }
|
||||
.ui-widget-content { border: 1px solid #72b42d; background: #285c00 url(images/ui-bg_inset-soft_10_285c00_1x100.png) 50% bottom repeat-x; color: #ffffff; }
|
||||
.ui-widget-content a { color: #ffffff; }
|
||||
.ui-widget-header { border: 1px solid #3f7506; background: #3a8104 url(images/ui-bg_highlight-soft_33_3a8104_1x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
|
||||
.ui-widget-header a { color: #ffffff; }
|
||||
|
||||
/* Interaction states
|
||||
----------------------------------*/
|
||||
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #45930b; background: #4ca20b url(images/ui-bg_highlight-soft_60_4ca20b_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff; }
|
||||
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #ffffff; text-decoration: none; }
|
||||
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #8bd83b; background: #4eb305 url(images/ui-bg_highlight-soft_50_4eb305_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff; }
|
||||
.ui-state-hover a, .ui-state-hover a:hover { color: #ffffff; text-decoration: none; }
|
||||
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #72b42d; background: #285c00 url(images/ui-bg_highlight-hard_30_285c00_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #ffffff; }
|
||||
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; }
|
||||
.ui-widget :active { outline: none; }
|
||||
|
||||
/* Interaction Cues
|
||||
----------------------------------*/
|
||||
.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #f9dd34; background: #fbf5d0 url(images/ui-bg_glass_55_fbf5d0_1x400.png) 50% 50% repeat-x; color: #363636; }
|
||||
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
|
||||
.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #fad000; background: #ffdc2e url(images/ui-bg_diagonals-thick_95_ffdc2e_40x40.png) 50% 50% repeat; color: #2b2b2b; }
|
||||
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #2b2b2b; }
|
||||
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #2b2b2b; }
|
||||
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
|
||||
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
|
||||
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
|
||||
|
||||
/* Icons
|
||||
----------------------------------*/
|
||||
|
||||
/* states and images */
|
||||
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_72b42d_256x240.png); }
|
||||
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_72b42d_256x240.png); }
|
||||
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
|
||||
.ui-state-default .ui-icon { background-image: url(images/ui-icons_ffffff_256x240.png); }
|
||||
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
|
||||
.ui-state-active .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
|
||||
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_4eb305_256x240.png); }
|
||||
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); }
|
||||
|
||||
/* positioning */
|
||||
.ui-icon-carat-1-n { background-position: 0 0; }
|
||||
.ui-icon-carat-1-ne { background-position: -16px 0; }
|
||||
.ui-icon-carat-1-e { background-position: -32px 0; }
|
||||
.ui-icon-carat-1-se { background-position: -48px 0; }
|
||||
.ui-icon-carat-1-s { background-position: -64px 0; }
|
||||
.ui-icon-carat-1-sw { background-position: -80px 0; }
|
||||
.ui-icon-carat-1-w { background-position: -96px 0; }
|
||||
.ui-icon-carat-1-nw { background-position: -112px 0; }
|
||||
.ui-icon-carat-2-n-s { background-position: -128px 0; }
|
||||
.ui-icon-carat-2-e-w { background-position: -144px 0; }
|
||||
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
||||
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
||||
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
||||
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
||||
.ui-icon-triangle-1-s { background-position: -64px -16px; }
|
||||
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
||||
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
||||
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
||||
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
||||
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
||||
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
||||
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
||||
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
||||
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
||||
.ui-icon-arrow-1-s { background-position: -64px -32px; }
|
||||
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
||||
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
||||
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
||||
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
||||
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
||||
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
||||
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
||||
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
||||
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
||||
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
||||
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
||||
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
|
||||
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
||||
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
||||
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
||||
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
||||
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
||||
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
||||
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
||||
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
||||
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
||||
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
||||
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
||||
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
||||
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
||||
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
||||
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
||||
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
||||
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
||||
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
||||
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
||||
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
||||
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
||||
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
||||
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
||||
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
||||
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
||||
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
||||
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
||||
.ui-icon-extlink { background-position: -32px -80px; }
|
||||
.ui-icon-newwin { background-position: -48px -80px; }
|
||||
.ui-icon-refresh { background-position: -64px -80px; }
|
||||
.ui-icon-shuffle { background-position: -80px -80px; }
|
||||
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
||||
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
||||
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
||||
.ui-icon-folder-open { background-position: -16px -96px; }
|
||||
.ui-icon-document { background-position: -32px -96px; }
|
||||
.ui-icon-document-b { background-position: -48px -96px; }
|
||||
.ui-icon-note { background-position: -64px -96px; }
|
||||
.ui-icon-mail-closed { background-position: -80px -96px; }
|
||||
.ui-icon-mail-open { background-position: -96px -96px; }
|
||||
.ui-icon-suitcase { background-position: -112px -96px; }
|
||||
.ui-icon-comment { background-position: -128px -96px; }
|
||||
.ui-icon-person { background-position: -144px -96px; }
|
||||
.ui-icon-print { background-position: -160px -96px; }
|
||||
.ui-icon-trash { background-position: -176px -96px; }
|
||||
.ui-icon-locked { background-position: -192px -96px; }
|
||||
.ui-icon-unlocked { background-position: -208px -96px; }
|
||||
.ui-icon-bookmark { background-position: -224px -96px; }
|
||||
.ui-icon-tag { background-position: -240px -96px; }
|
||||
.ui-icon-home { background-position: 0 -112px; }
|
||||
.ui-icon-flag { background-position: -16px -112px; }
|
||||
.ui-icon-calendar { background-position: -32px -112px; }
|
||||
.ui-icon-cart { background-position: -48px -112px; }
|
||||
.ui-icon-pencil { background-position: -64px -112px; }
|
||||
.ui-icon-clock { background-position: -80px -112px; }
|
||||
.ui-icon-disk { background-position: -96px -112px; }
|
||||
.ui-icon-calculator { background-position: -112px -112px; }
|
||||
.ui-icon-zoomin { background-position: -128px -112px; }
|
||||
.ui-icon-zoomout { background-position: -144px -112px; }
|
||||
.ui-icon-search { background-position: -160px -112px; }
|
||||
.ui-icon-wrench { background-position: -176px -112px; }
|
||||
.ui-icon-gear { background-position: -192px -112px; }
|
||||
.ui-icon-heart { background-position: -208px -112px; }
|
||||
.ui-icon-star { background-position: -224px -112px; }
|
||||
.ui-icon-link { background-position: -240px -112px; }
|
||||
.ui-icon-cancel { background-position: 0 -128px; }
|
||||
.ui-icon-plus { background-position: -16px -128px; }
|
||||
.ui-icon-plusthick { background-position: -32px -128px; }
|
||||
.ui-icon-minus { background-position: -48px -128px; }
|
||||
.ui-icon-minusthick { background-position: -64px -128px; }
|
||||
.ui-icon-close { background-position: -80px -128px; }
|
||||
.ui-icon-closethick { background-position: -96px -128px; }
|
||||
.ui-icon-key { background-position: -112px -128px; }
|
||||
.ui-icon-lightbulb { background-position: -128px -128px; }
|
||||
.ui-icon-scissors { background-position: -144px -128px; }
|
||||
.ui-icon-clipboard { background-position: -160px -128px; }
|
||||
.ui-icon-copy { background-position: -176px -128px; }
|
||||
.ui-icon-contact { background-position: -192px -128px; }
|
||||
.ui-icon-image { background-position: -208px -128px; }
|
||||
.ui-icon-video { background-position: -224px -128px; }
|
||||
.ui-icon-script { background-position: -240px -128px; }
|
||||
.ui-icon-alert { background-position: 0 -144px; }
|
||||
.ui-icon-info { background-position: -16px -144px; }
|
||||
.ui-icon-notice { background-position: -32px -144px; }
|
||||
.ui-icon-help { background-position: -48px -144px; }
|
||||
.ui-icon-check { background-position: -64px -144px; }
|
||||
.ui-icon-bullet { background-position: -80px -144px; }
|
||||
.ui-icon-radio-off { background-position: -96px -144px; }
|
||||
.ui-icon-radio-on { background-position: -112px -144px; }
|
||||
.ui-icon-pin-w { background-position: -128px -144px; }
|
||||
.ui-icon-pin-s { background-position: -144px -144px; }
|
||||
.ui-icon-play { background-position: 0 -160px; }
|
||||
.ui-icon-pause { background-position: -16px -160px; }
|
||||
.ui-icon-seek-next { background-position: -32px -160px; }
|
||||
.ui-icon-seek-prev { background-position: -48px -160px; }
|
||||
.ui-icon-seek-end { background-position: -64px -160px; }
|
||||
.ui-icon-seek-start { background-position: -80px -160px; }
|
||||
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
||||
.ui-icon-seek-first { background-position: -80px -160px; }
|
||||
.ui-icon-stop { background-position: -96px -160px; }
|
||||
.ui-icon-eject { background-position: -112px -160px; }
|
||||
.ui-icon-volume-off { background-position: -128px -160px; }
|
||||
.ui-icon-volume-on { background-position: -144px -160px; }
|
||||
.ui-icon-power { background-position: 0 -176px; }
|
||||
.ui-icon-signal-diag { background-position: -16px -176px; }
|
||||
.ui-icon-signal { background-position: -32px -176px; }
|
||||
.ui-icon-battery-0 { background-position: -48px -176px; }
|
||||
.ui-icon-battery-1 { background-position: -64px -176px; }
|
||||
.ui-icon-battery-2 { background-position: -80px -176px; }
|
||||
.ui-icon-battery-3 { background-position: -96px -176px; }
|
||||
.ui-icon-circle-plus { background-position: 0 -192px; }
|
||||
.ui-icon-circle-minus { background-position: -16px -192px; }
|
||||
.ui-icon-circle-close { background-position: -32px -192px; }
|
||||
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
||||
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
||||
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
||||
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
||||
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
||||
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
||||
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
||||
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
||||
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
||||
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
||||
.ui-icon-circle-check { background-position: -208px -192px; }
|
||||
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
||||
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
||||
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
||||
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
||||
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
||||
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
||||
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
||||
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
||||
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
||||
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
||||
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
||||
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||
|
||||
|
||||
/* Misc visuals
|
||||
----------------------------------*/
|
||||
|
||||
/* Corner radius */
|
||||
.ui-corner-tl { -moz-border-radius-topleft: 10px; -webkit-border-top-left-radius: 10px; border-top-left-radius: 10px; }
|
||||
.ui-corner-tr { -moz-border-radius-topright: 10px; -webkit-border-top-right-radius: 10px; border-top-right-radius: 10px; }
|
||||
.ui-corner-bl { -moz-border-radius-bottomleft: 10px; -webkit-border-bottom-left-radius: 10px; border-bottom-left-radius: 10px; }
|
||||
.ui-corner-br { -moz-border-radius-bottomright: 10px; -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; }
|
||||
.ui-corner-top { -moz-border-radius-topleft: 10px; -webkit-border-top-left-radius: 10px; border-top-left-radius: 10px; -moz-border-radius-topright: 10px; -webkit-border-top-right-radius: 10px; border-top-right-radius: 10px; }
|
||||
.ui-corner-bottom { -moz-border-radius-bottomleft: 10px; -webkit-border-bottom-left-radius: 10px; border-bottom-left-radius: 10px; -moz-border-radius-bottomright: 10px; -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; }
|
||||
.ui-corner-right { -moz-border-radius-topright: 10px; -webkit-border-top-right-radius: 10px; border-top-right-radius: 10px; -moz-border-radius-bottomright: 10px; -webkit-border-bottom-right-radius: 10px; border-bottom-right-radius: 10px; }
|
||||
.ui-corner-left { -moz-border-radius-topleft: 10px; -webkit-border-top-left-radius: 10px; border-top-left-radius: 10px; -moz-border-radius-bottomleft: 10px; -webkit-border-bottom-left-radius: 10px; border-bottom-left-radius: 10px; }
|
||||
.ui-corner-all { -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; }
|
||||
|
||||
/* Overlays */
|
||||
.ui-widget-overlay { background: #444444 url(images/ui-bg_diagonals-thick_15_444444_40x40.png) 50% 50% repeat; opacity: .30;filter:Alpha(Opacity=30); }
|
||||
.ui-widget-shadow { margin: 4px 0 0 4px; padding: 0px; background: #aaaaaa url(images/ui-bg_diagonals-small_0_aaaaaa_40x40.png) 50% 50% repeat; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }/* Resizable
|
||||
----------------------------------*/
|
||||
.ui-resizable { position: relative;}
|
||||
.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
|
||||
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
|
||||
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
|
||||
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
|
||||
.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
|
||||
.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
|
||||
.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
|
||||
.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
|
||||
.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Selectable
|
||||
----------------------------------*/
|
||||
.ui-selectable-helper { border:1px dotted black }
|
||||
/* Accordion
|
||||
----------------------------------*/
|
||||
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-li-fix { display: inline; }
|
||||
.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
|
||||
.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
|
||||
/* IE7-/Win - Fix extra vertical space in lists */
|
||||
.ui-accordion a { zoom: 1; }
|
||||
.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
|
||||
.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
|
||||
.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-content-active { display: block; }/* Autocomplete
|
||||
----------------------------------*/
|
||||
.ui-autocomplete { position: absolute; cursor: default; }
|
||||
.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
|
||||
|
||||
/* workarounds */
|
||||
* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
|
||||
|
||||
/* Menu
|
||||
----------------------------------*/
|
||||
.ui-menu {
|
||||
list-style:none;
|
||||
padding: 2px;
|
||||
margin: 0;
|
||||
display:block;
|
||||
}
|
||||
.ui-menu .ui-menu {
|
||||
margin-top: -3px;
|
||||
}
|
||||
.ui-menu .ui-menu-item {
|
||||
margin:0;
|
||||
padding: 0;
|
||||
zoom: 1;
|
||||
float: left;
|
||||
clear: left;
|
||||
width: 100%;
|
||||
}
|
||||
.ui-menu .ui-menu-item a {
|
||||
text-decoration:none;
|
||||
display:block;
|
||||
padding:.2em .4em;
|
||||
line-height:1.5;
|
||||
zoom:1;
|
||||
}
|
||||
.ui-menu .ui-menu-item a.ui-state-hover,
|
||||
.ui-menu .ui-menu-item a.ui-state-active {
|
||||
font-weight: normal;
|
||||
margin: -1px;
|
||||
}
|
||||
/* Button
|
||||
----------------------------------*/
|
||||
|
||||
.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
|
||||
.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
|
||||
button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
|
||||
.ui-button-icons-only { width: 3.4em; }
|
||||
button.ui-button-icons-only { width: 3.7em; }
|
||||
|
||||
/*button text element */
|
||||
.ui-button .ui-button-text { display: block; line-height: 1.4; }
|
||||
.ui-button-text-only .ui-button-text { padding: .4em 1em; }
|
||||
.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
|
||||
.ui-button-text-icon .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
|
||||
.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
|
||||
/* no icon support for input elements, provide padding by default */
|
||||
input.ui-button { padding: .4em 1em; }
|
||||
|
||||
/*button icon element(s) */
|
||||
.ui-button-icon-only .ui-icon, .ui-button-text-icon .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
|
||||
.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
|
||||
.ui-button-text-icon .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
|
||||
.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
|
||||
|
||||
/*button sets*/
|
||||
.ui-buttonset { margin-right: 7px; }
|
||||
.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
|
||||
|
||||
/* workarounds */
|
||||
button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Dialog
|
||||
----------------------------------*/
|
||||
.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
|
||||
.ui-dialog .ui-dialog-titlebar { padding: .5em 1em .3em; position: relative; }
|
||||
.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .2em 0; }
|
||||
.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
|
||||
.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
|
||||
.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
|
||||
.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
|
||||
.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
|
||||
.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
|
||||
.ui-draggable .ui-dialog-titlebar { cursor: move; }
|
||||
/* Slider
|
||||
----------------------------------*/
|
||||
.ui-slider { position: relative; text-align: left; }
|
||||
.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
|
||||
.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
|
||||
|
||||
.ui-slider-horizontal { height: .8em; }
|
||||
.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
|
||||
.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
|
||||
.ui-slider-horizontal .ui-slider-range-min { left: 0; }
|
||||
.ui-slider-horizontal .ui-slider-range-max { right: 0; }
|
||||
|
||||
.ui-slider-vertical { width: .8em; height: 100px; }
|
||||
.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
|
||||
.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
|
||||
.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
|
||||
.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs
|
||||
----------------------------------*/
|
||||
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
|
||||
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
|
||||
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
|
||||
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
|
||||
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
|
||||
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
|
||||
.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
|
||||
.ui-tabs .ui-tabs-hide { display: none !important; }
|
||||
/* Datepicker
|
||||
----------------------------------*/
|
||||
.ui-datepicker { width: 17em; padding: .2em .2em 0; }
|
||||
.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
|
||||
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
|
||||
.ui-datepicker .ui-datepicker-prev { left:2px; }
|
||||
.ui-datepicker .ui-datepicker-next { right:2px; }
|
||||
.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
|
||||
.ui-datepicker .ui-datepicker-next-hover { right:1px; }
|
||||
.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
|
||||
.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
|
||||
.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
|
||||
.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year { width: 49%;}
|
||||
.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
|
||||
.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
|
||||
.ui-datepicker td { border: 0; padding: 1px; }
|
||||
.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi { width:auto; }
|
||||
.ui-datepicker-multi .ui-datepicker-group { float:left; }
|
||||
.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
|
||||
.ui-datepicker-row-break { clear:both; width:100%; }
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl { direction: rtl; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group { float:right; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
|
||||
|
||||
/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
|
||||
.ui-datepicker-cover {
|
||||
display: none; /*sorry for IE5*/
|
||||
display/**/: block; /*sorry for IE5*/
|
||||
position: absolute; /*must have*/
|
||||
z-index: -1; /*must have*/
|
||||
filter: mask(); /*must have*/
|
||||
top: -4px; /*must have*/
|
||||
left: -4px; /*must have*/
|
||||
width: 200px; /*must have*/
|
||||
height: 200px; /*must have*/
|
||||
}/* Progressbar
|
||||
----------------------------------*/
|
||||
.ui-progressbar { height:2em; text-align: left; }
|
||||
.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
|
||||
@@ -8,7 +8,6 @@ import javax.faces.model.DataModel;
|
||||
import org.easymock.EasyMock;
|
||||
import org.springframework.binding.mapping.Mapper;
|
||||
import org.springframework.binding.mapping.MappingResults;
|
||||
import org.springframework.faces.model.OneSelectionTrackingListDataModel;
|
||||
import org.springframework.faces.model.converter.FacesConversionService;
|
||||
import org.springframework.webflow.config.FlowDefinitionResource;
|
||||
import org.springframework.webflow.config.FlowDefinitionResourceFactory;
|
||||
@@ -62,20 +61,13 @@ public class MainFlowExecutionTests extends AbstractXmlFlowExecutionTests {
|
||||
criteria.setSearchString("Jameson");
|
||||
getFlowScope().put("searchCriteria", criteria);
|
||||
|
||||
List<Hotel> hotels = new ArrayList<Hotel>();
|
||||
hotels.add(new Hotel());
|
||||
EasyMock.expect(bookingService.findHotels(criteria)).andReturn(hotels);
|
||||
EasyMock.replay(bookingService);
|
||||
|
||||
MockExternalContext context = new MockExternalContext();
|
||||
context.setEventId("search");
|
||||
resumeFlow(context);
|
||||
|
||||
EasyMock.verify(bookingService);
|
||||
|
||||
assertCurrentStateEquals("reviewHotels");
|
||||
assertResponseWrittenEquals("reviewHotels", context);
|
||||
assertTrue(getRequiredViewAttribute("hotels") instanceof DataModel);
|
||||
assertTrue(getRequiredViewAttribute("hotels") instanceof HotelLazyDataModel);
|
||||
}
|
||||
|
||||
public void testSelectHotel() {
|
||||
@@ -86,8 +78,8 @@ public class MainFlowExecutionTests extends AbstractXmlFlowExecutionTests {
|
||||
hotel.setId(1L);
|
||||
hotel.setName("Jameson Inn");
|
||||
hotels.add(hotel);
|
||||
OneSelectionTrackingListDataModel dataModel = new OneSelectionTrackingListDataModel(hotels);
|
||||
dataModel.select(hotel);
|
||||
HotelLazyDataModel dataModel = new HotelLazyDataModel(null, null);
|
||||
dataModel.setSelected(hotel);
|
||||
getViewScope().put("hotels", dataModel);
|
||||
|
||||
MockExternalContext context = new MockExternalContext();
|
||||
|
||||