updated views to display without css styles

This commit is contained in:
Scott Andrews
2008-04-02 15:12:42 +00:00
parent 765f520b6f
commit 49732977d7
7 changed files with 272 additions and 299 deletions

View File

@@ -3,105 +3,103 @@
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<div class="section">
<h1>Book Hotel</h1>
</div>
<h2>Book Hotel</h2>
<div class="section">
<portlet:actionURL var="actionUrl">
<portlet:param name="execution" value="${flowExecutionKey}" />
</portlet:actionURL>
<form:form id="booking" modelAttribute="booking" action="${actionUrl}">
<form:errors path="*" cssClass="errors" />
<fieldset>
<div class="field">
<div class="label">Name:</div>
<div class="output">${booking.hotel.name}</div>
</div>
<div class="field">
<div class="label">Address:</div>
<div class="output">${booking.hotel.address}</div>
</div>
<div class="field">
<div class="label">City, State:</div>
<div class="output">${booking.hotel.city}, ${booking.hotel.state}</div>
</div>
<div class="field">
<div class="label">Zip:</div>
<div class="output">${booking.hotel.zip}</div>
</div>
<div class="field">
<div class="label">Country:</div>
<div class="output">${booking.hotel.country}</div>
</div>
<div class="field">
<div class="label">Nightly rate:</div>
<div class="output">
<portlet:actionURL var="actionUrl">
<portlet:param name="execution" value="${flowExecutionKey}" />
</portlet:actionURL>
<form:form id="booking" modelAttribute="booking" action="${actionUrl}">
<form:errors path="*" cssClass="errors" />
<fieldset>
<table>
<tr class="field">
<td class="label">Name:</td>
<td class="output">${booking.hotel.name}</td>
</tr>
<tr class="field">
<td class="label">Address:</td>
<td class="output">${booking.hotel.address}</td>
</tr>
<tr class="field">
<td class="label">City, State:</td>
<td class="output">${booking.hotel.city}, ${booking.hotel.state}</td>
</tr>
<tr class="field">
<td class="label">Zip:</td>
<td class="output">${booking.hotel.zip}</td>
</tr>
<tr class="field">
<td class="label">Country:</td>
<td class="output">${booking.hotel.country}</td>
</tr>
<tr class="field">
<td class="label">Nightly rate:</td>
<td class="output">
<spring:bind path="booking.hotel.price">${status.value}</spring:bind>
</div>
</div>
<div class="field">
<div class="label">
</td>
</tr>
<tr class="field">
<td class="label">
<label for="checkinDate">Check In Date:</label>
</div>
<div class="input">
</td>
<td class="input">
<form:errors path="checkinDate" cssClass="errors"/>
<form:input path="checkinDate"/>
</div>
</div>
<div class="field">
<div class="label">
</td>
</tr>
<tr class="field">
<td class="label">
<label for="checkoutDate">Check Out Date:</label>
</div>
<div class="input">
</td>
<td class="input">
<form:errors path="checkoutDate" cssClass="errors"/>
<form:input path="checkoutDate"/>
</div>
</div>
<div class="field">
<div class="label">
</td>
</tr>
<tr class="field">
<td class="label">
<label for="beds">Room Preference:</label>
</div>
<div class="input">
</td>
<td class="input">
<form:select id="beds" path="beds">
<form:option label="One king-size bed" value="1"/>
<form:option label="Two double beds" value="2"/>
<form:option label="Three beds" value="3"/>
</form:select>
</div>
</div>
<div class="field">
<div class="label">
</td>
</tr>
<tr class="field">
<td class="label">
<label for="smoking">Smoking Preference:</label>
</div>
<div id="radio" class="input">
</td>
<td class="input">
<form:radiobutton id="smoking" path="smoking" label="Smoking" value="true"/>
<form:radiobutton path="smoking" label="Non Smoking" value="false"/>
</div>
</div>
<div class="field">
<div class="label">
</td>
</tr>
<tr class="field">
<td class="label">
<label for="creditCard">Credit Card #:</label>
</div>
<div class="input">
</td>
<td class="input">
<form:errors path="creditCard" cssClass="errors"/>
<form:input id="creditCard" path="creditCard"/>
</div>
</div>
<div class="field">
<div class="label">
</td>
</tr>
<tr class="field">
<td class="label">
<label for="creditCardName">Credit Card Name:</label>
</div>
<div class="input">
</td>
<td class="input">
<form:errors path="creditCardName" cssClass="errors"/>
<form:input id="creditCardName" path="creditCardName"/>
</div>
</div>
<div class="field">
<div class="label">
</td>
</tr>
<tr class="field">
<td class="label">
<label for="creditCardExpiryMonth">Expiration Date:</label>
</div>
<div class="input">
</td>
<td class="input">
<form:select id="creditCardExpiryMonth" path="creditCardExpiryMonth">
<form:option label="Jan" value="1"/>
<form:option label="Feb" value="2"/>
@@ -123,12 +121,14 @@
<form:option label="2011" value="4"/>
<form:option label="2012" value="5"/>
</form:select>
</div>
</div>
<div class="buttonGroup">
<input type="submit" name="_eventId_proceed" value="Proceed"/>&#160;
<input type="submit" name="_eventId_cancel" value="Cancel"/>&#160;
</div>
</fieldset>
</form:form>
</div>
</td>
</tr>
<tr class="field">
<td colspan="2" class="buttonGroup"
<input type="submit" name="_eventId_proceed" value="Proceed"/>&#160;
<input type="submit" name="_eventId_cancel" value="Cancel"/>&#160;
</td>
</tr>
</table>
</fieldset>
</form:form>

View File

@@ -3,63 +3,63 @@
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<div class="section">
<h1>Confirm Hotel Booking</h1>
</div>
<h2>Confirm Hotel Booking</h2>
<div class="section">
<portlet:actionURL var="actionUrl">
<portlet:param name="execution" value="${flowExecutionKey}" />
</portlet:actionURL>
<form:form id="confirm" modelAttribute="booking" action="${actionUrl}">
<portlet:actionURL var="actionUrl">
<portlet:param name="execution" value="${flowExecutionKey}" />
</portlet:actionURL>
<form:form id="confirm" modelAttribute="booking" action="${actionUrl}">
<fieldset>
<div class="field">
<div class="label">Name:</div>
<div class="output">${booking.hotel.name}</div>
</div>
<div class="field">
<div class="label">Address:</div>
<div class="output">${booking.hotel.address}</div>
</div>
<div class="field">
<div class="label">City, State:</div>
<div class="output">${booking.hotel.city}, ${booking.hotel.state}</div>
</div>
<div class="field">
<div class="label">Zip:</div>
<div class="output">${booking.hotel.zip}</div>
</div>
<div class="field">
<div class="label">Country:</div>
<div class="output">${booking.hotel.country}</div>
</div>
<div class="field">
<div class="label">Total payment:</div>
<div class="output">
<spring:bind path="total">${status.value}</spring:bind>
</div>
</div>
<div class="field">
<div class="label">Check In Date:</div>
<div class="output">
<spring:bind path="checkinDate">${status.value}</spring:bind>
</div>
</div>
<div class="field">
<div class="label">Check Out Date:</div>
<div class="output">
<spring:bind path="checkoutDate">${status.value}</spring:bind>
</div>
</div>
<div class="field">
<div class="label">Credit Card #:</div>
<div class="output">${booking.creditCard}</div>
</div>
<div class="buttonGroup">
<input type="submit" name="_eventId_confirm" value="Confim"/>&#160;
<input type="submit" name="_eventId_revise" value="Revise"/>&#160;
<input type="submit" name="_eventId_cancel" value="Cancel"/>&#160;
</div>
<table>
<tr class="field">
<td class="label">Name:</td>
<td class="output">${booking.hotel.name}</td>
</tr>
<tr class="field">
<td class="label">Address:</td>
<td class="output">${booking.hotel.address}</td>
</tr>
<tr>
<td class="label">City, State:</td>
<td class="output">${booking.hotel.city}, ${booking.hotel.state}</td>
</tr>
<tr class="field">
<td class="label">Zip:</td>
<td class="output">${booking.hotel.zip}</td>
</tr>
<tr class="field">
<td class="label">Country:</td>
<td class="output">${booking.hotel.country}</td>
</tr>
<tr class="field">
<td class="label">Total payment:</td>
<td class="output">
<spring:bind path="total">${status.value}</spring:bind>
</td>
</tr>
<tr class="field">
<td class="label">Check In Date:</td>
<td class="output">
<spring:bind path="checkinDate">${status.value}</spring:bind>
</td>
</tr>
<tr class="field">
<td class="label">Check Out Date:</div>
<td class="output">
<spring:bind path="checkoutDate">${status.value}</spring:bind>
</td>
</tr>
<tr class="field">
<td class="label">Credit Card #:</td>
<td class="output">${booking.creditCard}</td>
</tr>
<tr>
<td colspan="2" class="buttonGroup">
<input type="submit" name="_eventId_confirm" value="Confim"/>&#160;
<input type="submit" name="_eventId_revise" value="Revise"/>&#160;
<input type="submit" name="_eventId_cancel" value="Cancel"/>&#160;
</td>
</tr>
</table>
</fieldset>
</form:form>
</div>
</form:form>

View File

@@ -5,42 +5,38 @@
<portlet:actionURL var="actionUrl">
<portlet:param name="execution" value="${flowExecutionKey}" />
</portlet:actionURL>
<form:form modelAttribute="searchCriteria" action="${actionUrl}">
<div class="section">
<span class="errors">
<form:errors path="*"/>
</span>
<h1>Search Hotels</h1>
<fieldset>
<form:input path="searchString"/>
<label for="pageSize">Maximum results:</label>
<form:select path="pageSize">
<form:option label="5" value="5"/>
<form:option label="10" value="10"/>
<form:option label="20" value="20"/>
</form:select>
<input type="submit" class="button" name="_eventId_search" value="Find Hotels" />
</fieldset>
</div>
<form:form modelAttribute="searchCriteria" action="${actionUrl}">
<h2>Search Hotels</h2>
<span class="errors">
<form:errors path="*"/>
</span>
<fieldset>
<form:input path="searchString"/>
<label for="pageSize">Maximum results:</label>
<form:select path="pageSize">
<form:option label="5" value="5"/>
<form:option label="10" value="10"/>
<form:option label="20" value="20"/>
</form:select>
<input type="submit" class="button" name="_eventId_search" value="Find Hotels" />
</fieldset>
</form:form>
<div class="section">
<h1>Current Hotel Bookings</h1>
<table class="summary">
<thead>
<tr>
<th>Name</th>
<th>Address</th>
<th>City, State</th>
<th>Check in Date</th>
<th>Check out Date</th>
<th>Confirmation Number</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<c:forEach var="booking" items="${bookings}">
<h2>Current Hotel Bookings</h2>
<table class="summary">
<thead>
<tr>
<th>Name</th>
<th>Address</th>
<th>City, State</th>
<th>Check in Date</th>
<th>Check out Date</th>
<th>Confirmation Number</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<c:forEach var="booking" items="${bookings}">
<tr>
<td>${booking.hotel.name}</td>
<td>${booking.hotel.address}</td>
@@ -57,12 +53,11 @@
<a href="${actionUrl}">Cancel</a>
</td>
</tr>
</c:forEach>
<c:if test="${empty bookings}">
<tr>
<td colspan="7">No booking history</td>
</tr>
</c:if>
</tbody>
</table>
</div>
</c:forEach>
<c:if test="${empty bookings}">
<tr>
<td colspan="7">No booking history</td>
</tr>
</c:if>
</tbody>
</table>

View File

@@ -3,51 +3,51 @@
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<div class="section">
<h1>View Hotel</h1>
</div>
<h2>View Hotel</h2>
<div class="section">
<portlet:actionURL var="actionUrl">
<portlet:param name="execution" value="${flowExecutionKey}" />
</portlet:actionURL>
<form:form id="hotel" modelAttribute="hotel" action="${actionUrl}">
<input type="hidden" name="execution" value="${flowExecutionKey}" />
<fieldset>
<div class="field">
<div class="label">Name:</div>
<div class="output">${hotel.name}</div>
</div>
<div class="field">
<div class="label">Address:</div>
<div class="output">${hotel.address}</div>
</div>
<div class="field">
<div class="label">City:</div>
<div class="output">${hotel.city}</div>
</div>
<div class="field">
<div class="label">State:</div>
<div class="output">${hotel.state}</div>
</div>
<div class="field">
<div class="label">Zip:</div>
<div class="output">${hotel.zip}</div>
</div>
<div class="field">
<div class="label">Country:</div>
<div class="output">${hotel.country}</div>
</div>
<div class="field">
<div class="label">Nightly rate:</div>
<div class="output">
<portlet:actionURL var="actionUrl">
<portlet:param name="execution" value="${flowExecutionKey}" />
</portlet:actionURL>
<form:form id="hotel" modelAttribute="hotel" action="${actionUrl}">
<input type="hidden" name="execution" value="${flowExecutionKey}" />
<fieldset>
<table>
<tr class="field">
<td class="label">Name:</td>
<td class="output">${hotel.name}</td>
</tr>
<tr class="field">
<td class="label">Address:</td>
<td class="output">${hotel.address}</td>
</tr>
<tr class="field">
<td class="label">City:</td>
<td class="output">${hotel.city}</td>
</tr>
<tr class="field">
<td class="label">State:</td>
<td class="output">${hotel.state}</td>
</tr>
<tr class="field">
<td class="label">Zip:</td>
<td class="output">${hotel.zip}</td>
</tr>
<tr class="field">
<td class="label">Country:</td>
<td class="output">${hotel.country}</td>
</tr>
<tr class="field">
<td class="label">Nightly rate:</td>
<td class="output">
<spring:bind path="price">${status.value}</spring:bind>
</div>
</div>
<div class="buttonGroup">
<input type="submit" name="_eventId_book" value="Book Hotel"/>&#160;
<input type="submit" name="_eventId_cancel" value="Back to Search"/>&#160;
</div>
</fieldset>
</form:form>
</div>
</td>
</tr>
<tr class="field">
<td colspan="2" class="buttonGroup">
<input type="submit" name="_eventId_book" value="Book Hotel"/>&#160;
<input type="submit" name="_eventId_cancel" value="Back to Search"/>&#160;
</td>
</tr>
</table>
</fieldset>
</form:form>

View File

@@ -2,24 +2,20 @@
<%@ taglib prefix="portlet" uri="http://java.sun.com/portlet" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<div class="section">
<h1>Hotel Results</h1>
</div>
<h2>Hotel Results</h2>
<c:if test="${not empty hotels}">
<div class="section">
<table class="summary">
<thead>
<tr>
<th>Name</th>
<th>Address</th>
<th>City, State</th>
<th>Zip</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<c:forEach var="hotel" items="${hotels}">
<table class="summary">
<thead>
<tr>
<th>Name</th>
<th>Address</th>
<th>City, State</th>
<th>Zip</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<c:forEach var="hotel" items="${hotels}">
<tr>
<td>${hotel.name}</td>
<td>${hotel.address}</td>
@@ -34,13 +30,11 @@
<a href="${actionUrl}">View Hotel</a>
</td>
</tr>
</c:forEach>
<c:if test="${empty hotels}">
<tr>
<td colspan="5">No hotels found</td>
</tr>
</c:if>
</tbody>
</table>
</div>
</c:if>
</c:forEach>
<c:if test="${empty hotels}">
<tr>
<td colspan="5">No hotels found</td>
</tr>
</c:if>
</tbody>
</table>

View File

@@ -1,33 +1,28 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="portlet" uri="http://java.sun.com/portlet" %>
<div class="section">
<h1>Welcome to Spring Travel</h1>
<p>
This reference application shows how to use Spring MVC and Web Flow together with JavaServerPages (JSP) and Tiles to power web applications.
</p>
<p>
The key features illustrated in this sample include:
</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>Modularization of web application functionality by domain use case, illustrating project structure best-practices</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 JSP, JSTL, and Spring MVC's form tag library
<li>Applying reusable page layouts with Tiles</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 align="right">
<portlet:actionURL var="actionUrl">
<portlet:param name="execution" value="${flowExecutionKey}" />
<portlet:param name="_eventId" value="main" />
</portlet:actionURL>
<a href="${actionUrl}">
Start your Spring Travel experience
</a>
</p>
</div>
<h2>Welcome to Spring Travel</h2>
<p>
This reference application shows how to use Spring MVC and Web Flow together with JavaServerPages (JSP) in a portlet.
</p>
<p>
The key features illustrated in this sample include:
</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>Managed persistence contexts with the Java Persistence API (JPA)</li>
<li>Unified Expression Language (EL) integration</li>
<li>Declarative page authoring with JSP, JSTL, and Spring MVC's form tag library
<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 align="right">
<portlet:actionURL var="actionUrl">
<portlet:param name="execution" value="${flowExecutionKey}" />
<portlet:param name="_eventId" value="main" />
</portlet:actionURL>
<a href="${actionUrl}">
Start your Spring Travel experience
</a>
</p>

View File

@@ -25,18 +25,7 @@
</bean>
<!-- Handles requests mapped to the Spring Web Flow system -->
<bean id="flowHandlerAdapter" class="org.springframework.webflow.portletmvc.FlowHandlerAdapter">
<constructor-arg ref="flowExecutor" />
</bean>
<!-- Enables annotated POJO @Controllers -->
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter" />
<!-- Enables plain Controllers -->
<bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter" />
<!-- Enables FlowHandlers -->
<bean class="org.springframework.webflow.mvc.FlowHandlerAdapter">
<bean id="flowHandlerAdapter" class="org.springframework.webflow.mvc.portlet.FlowHandlerAdapter">
<constructor-arg ref="flowExecutor" />
</bean>