[jboss-cvs] jboss-seam/examples/hibernate/view ...

Peter Muir peter at bleepbleep.org.uk
Sun Dec 23 14:52:59 EST 2007


  User: pmuir   
  Date: 07/12/23 14:52:59

  Added:       examples/hibernate/view           template.xhtml
                        register.xhtml main.xhtml home.xhtml book.xhtml
                        confirm.xhtml hotel.xhtml index.html password.xhtml
                        conversations.xhtml
  Log:
  JBSEAM-2387 and tidy up library usage
  
  Revision  Changes    Path
  1.6       +9 -9      jboss-seam/examples/hibernate/view/template.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: template.xhtml
  ===================================================================
  RCS file: template.xhtml
  diff -N template.xhtml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ template.xhtml	23 Dec 2007 19:52:59 -0000	1.6
  @@ -0,0 +1,35 @@
  +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  +<html xmlns="http://www.w3.org/1999/xhtml"
  +      xmlns:ui="http://java.sun.com/jsf/facelets"
  +      xmlns:h="http://java.sun.com/jsf/html"
  +      xmlns:s="http://jboss.com/products/seam/taglib">
  +<head>
  +	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  +	<title>JBoss Suites: Seam Framework</title>
  +	<link href="css/screen.css" rel="stylesheet" type="text/css" />
  +</head>
  +<body>
  +
  +<div id="document">
  +	<div id="header">
  +		<div id="title"><img src="img/hdr.title.gif" alt="JBoss Suites: seam framework demo"/></div>
  +		<div id="status">
  +            Welcome #{user.name}
  +            | <s:link id="search" view="/main.xhtml" value="Search" propagation="none"/>
  +            | <s:link id="settings" view="/password.xhtml" value="Settings" propagation="none"/>
  +            | <s:link id="logout" action="#{identity.logout}" value="Logout"/>
  +		</div>
  +	</div>
  +	<div id="container">
  +		<div id="sidebar">
  +			<ui:insert name="sidebar"/>
  +		</div>
  +		<div id="content">
  +			<ui:insert name="content"/>
  +		    <ui:include src="conversations.xhtml" />
  +		</div>
  +	</div>
  +	<div id="footer">Created with JBoss Seam 2.0, JSF 1.2, Hibernate 3 and Facelets</div>
  +</div>
  +</body>
  +</html>
  
  
  
  1.8       +78 -57    jboss-seam/examples/hibernate/view/register.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: register.xhtml
  ===================================================================
  RCS file: register.xhtml
  diff -N register.xhtml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ register.xhtml	23 Dec 2007 19:52:59 -0000	1.8
  @@ -0,0 +1,104 @@
  +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  +<html xmlns="http://www.w3.org/1999/xhtml"
  +	  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:s="http://jboss.com/products/seam/taglib"
  +      xmlns:a="http://richfaces.org/a4j">
  +<head>
  +	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  +	<title>JBoss Suites: Seam Framework</title>
  +	<link href="css/screen.css" rel="stylesheet" type="text/css" />
  +</head>
  +<body id="pgHome">
  +<div id="document">
  +	<div id="header">
  +		<div id="title"><img src="img/hdr.title.gif" alt="JBoss Suites: seam framework demo"/></div>
  +	</div>
  +	<div id="container">
  +		<div id="sidebar">
  +		</div>
  +		<div id="content">
  +			<div class="section">
  +				<h1>Register</h1>
  +			</div>
  +			<div class="section">
  +                
  +                <h:form id="register">
  +				<fieldset>
  +				
  +                    <s:validateAll>
  +
  +                       <f:facet name="aroundInvalidField">
  +                           <s:span styleClass="errors"/>
  +                       </f:facet>
  +                       <f:facet name="afterInvalidField">
  +                           <s:div styleClass="errors">
  +               	               <s:message/>
  +               	           </s:div>
  +                       </f:facet>
  +		    
  +						<div class="entry">
  +							<div class="label"><h:outputLabel for="username">Username:</h:outputLabel></div>
  +							<div class="input">
  +								<s:decorate id="usernameDecorate">
  +									<h:inputText id="username" value="#{user.username}" required="true">
  +                                        <a:support event="onblur" reRender="usernameDecorate"/>
  +                                    </h:inputText>
  +								</s:decorate>
  +							</div>
  +						</div>
  +						
  +						<div class="entry">
  +							<div class="label"><h:outputLabel for="name">Real Name:</h:outputLabel></div>
  +							<div class="input">
  +								<s:decorate id="nameDecorate">
  +									<h:inputText id="name" value="#{user.name}" required="true">
  +                                        <a:support event="onblur" reRender="nameDecorate"/>
  +                                    </h:inputText>
  +								</s:decorate>
  +							</div>
  +						</div>
  +						
  +						<div class="entry">
  +							<div class="label"><h:outputLabel for="password">Password:</h:outputLabel></div>
  +							<div class="input">
  +								<s:decorate>
  +									<h:inputSecret id="password" value="#{user.password}" required="true"/>
  +								</s:decorate>
  +							</div>
  +						</div>
  +						
  +						<div class="entry">
  +							<div class="label"><h:outputLabel for="verify">Verify Password:</h:outputLabel></div>
  +							<div class="input">
  +								<s:decorate>
  +									<h:inputSecret id="verify" value="#{register.verify}" required="true"/>
  +								</s:decorate>
  +							</div>
  +						</div>
  +
  +					</s:validateAll>
  +					
  +					<div class="entry errors">
  +						<h:messages globalOnly="true"/>
  +					</div>
  +					
  +					<div class="entry">
  +						<div class="label">&#160;</div>
  +						<div class="input">
  +							<h:commandButton id="register" value="Register" action="#{register.register}"/>&#160;
  +							<s:button id="cancel" value="Cancel" view="/home.xhtml"/>
  +						</div>
  +					</div>
  +					
  +				</fieldset>
  +                </h:form>
  +                
  +			</div>			
  +		</div>
  +	</div>
  +	<div id="footer">Created with JBoss EJB 3.0, Seam, MyFaces, and Facelets</div>
  +</div>
  +</body>
  +</html>
  
  
  
  1.10      +92 -91    jboss-seam/examples/hibernate/view/main.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: main.xhtml
  ===================================================================
  RCS file: main.xhtml
  diff -N main.xhtml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ main.xhtml	23 Dec 2007 19:52:59 -0000	1.10
  @@ -0,0 +1,120 @@
  +<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  +<ui:composition xmlns="http://www.w3.org/1999/xhtml"
  +	    		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:s="http://jboss.com/products/seam/taglib"
  +                xmlns:a="http://richfaces.org/a4j"
  +				template="template.xhtml">
  +
  +<!-- content -->
  +<ui:define name="content">
  +
  +<div class="section">
  +  <h:form id="main">
  +  
  +    <span class="errors">
  +       <h:messages globalOnly="true"/>
  +    </span>
  +    
  +	<h1>Search Hotels</h1>
  +	<fieldset> 
  +	   <h:inputText id="searchString" value="#{hotelSearch.searchString}" style="width: 165px;">
  +         <a:support event="onkeyup" actionListener="#{hotelSearch.find}" reRender="searchResults" />
  +       </h:inputText>
  +       &#160;
  +	   <a:commandButton id="findHotels" value="Find Hotels" action="#{hotelSearch.find}" reRender="searchResults"/>
  +       &#160;
  +       <a:status>
  +          <f:facet name="start">
  +             <h:graphicImage value="/img/spinner.gif"/>
  +          </f:facet>
  +       </a:status>
  +	   <br/>
  +       <h:outputLabel for="pageSize">Maximum results:</h:outputLabel>&#160;
  +       <h:selectOneMenu value="#{hotelSearch.pageSize}" id="pageSize">
  +          <f:selectItem itemLabel="5" itemValue="5"/>
  +          <f:selectItem itemLabel="10" itemValue="10"/>
  +          <f:selectItem itemLabel="20" itemValue="20"/>
  +       </h:selectOneMenu>
  +    </fieldset>
  +    
  +  </h:form>
  +</div>
  +
  +<a:outputPanel id="searchResults">
  +  <div class="section">
  +	<h:outputText value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/>
  +	<h:dataTable id="hotels" value="#{hotels}" var="hot" rendered="#{hotels.rowCount>0}">
  +		<h:column>
  +			<f:facet name="header">Name</f:facet>
  +			#{hot.name}
  +		</h:column>
  +		<h:column>
  +			<f:facet name="header">Address</f:facet>
  +			#{hot.address}
  +		</h:column>
  +		<h:column>
  +			<f:facet name="header">City, State</f:facet>
  +			#{hot.city}, #{hot.state}, #{hot.country}
  +		</h:column> 
  +		<h:column>
  +			<f:facet name="header">Zip</f:facet>
  +			#{hot.zip}
  +		</h:column>
  +		<h:column>
  +			<f:facet name="header">Action</f:facet>
  +			<s:link id="viewHotel" value="View Hotel" action="#{hotelBooking.selectHotel(hot)}"/>
  +		</h:column>
  +	</h:dataTable>
  +	<s:link value="More results" action="#{hotelSearch.nextPage}" rendered="#{hotelSearch.nextPageAvailable}"/>
  +  </div>
  +</a:outputPanel>
  +
  +<div class="section">
  +	<h1>Current Hotel Bookings</h1>
  +</div>
  +<div class="section">
  +  <h:form id="bookings">
  +	<h:outputText value="No Bookings Found" rendered="#{bookings.rowCount==0}"/>
  +	<h:dataTable id="bookings" value="#{bookings}" var="book" rendered="#{bookings.rowCount>0}">
  +		<h:column>
  +			<f:facet name="header">Name</f:facet>
  +			#{book.hotel.name}
  +		</h:column>
  +		<h:column>
  +			<f:facet name="header">Address</f:facet>
  +			#{book.hotel.address}
  +		</h:column>
  +		<h:column>
  +			<f:facet name="header">City, State</f:facet>
  +			#{book.hotel.city}, #{book.hotel.state}
  +		</h:column>
  +        <h:column>
  +            <f:facet name="header">Check in date</f:facet>
  +            <h:outputText value="#{book.checkinDate}"/>
  +        </h:column>
  +        <h:column>
  +            <f:facet name="header">Check out date</f:facet>
  +            <h:outputText value="#{book.checkoutDate}"/>
  +        </h:column>
  +		<h:column>
  +			<f:facet name="header">Confirmation number</f:facet>
  +			#{book.id}
  +		</h:column>
  +		<h:column>
  +			<f:facet name="header">Action</f:facet>
  +			<h:commandLink id="cancel" value="Cancel" action="#{bookingList.cancel}"/>
  +		</h:column>
  +	</h:dataTable>
  +  </h:form>
  +</div>
  +
  +</ui:define>
  +
  +<!-- sidebar -->
  +<ui:define name="sidebar">
  +
  +</ui:define>
  +
  +</ui:composition>
  
  
  
  1.5       +14 -40    jboss-seam/examples/hibernate/view/home.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: home.xhtml
  ===================================================================
  RCS file: home.xhtml
  diff -N home.xhtml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ home.xhtml	23 Dec 2007 19:52:59 -0000	1.5
  @@ -0,0 +1,42 @@
  +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  +<html xmlns="http://www.w3.org/1999/xhtml"
  +	  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:s="http://jboss.com/products/seam/taglib">
  +<head>
  +	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  +	<title>JBoss Suites: Seam Framework</title>
  +	<link href="css/screen.css" rel="stylesheet" type="text/css" />
  +</head>
  +<body id="pgHome">
  +<f:view>
  +<div id="document">
  +	<div id="header">
  +		<div id="title"><img src="img/hdr.title.gif" alt="JBoss Suites: seam framework demo"/></div>
  +	</div>
  +	<div id="container">
  +		<div id="sidebar">
  +            <h:form id="login">
  +			<fieldset>
  +				<div>
  +					<h:outputLabel for="username">Login Name</h:outputLabel>
  +					<h:inputText id="username" value="#{identity.username}" style="width: 175px;"/>
  +					<div class="errors"><h:message for="username"/></div>
  +				</div>
  +				<div>
  +					<h:outputLabel for="password">Password</h:outputLabel>
  +					<h:inputSecret id="password" value="#{identity.password}" style="width: 175px;"/>
  +				</div>
  +				<div class="errors"><h:messages globalOnly="true"/></div>
  +				<div class="buttonBox"><h:commandButton id="login" action="#{identity.login}" value="Account Login"/></div>
  +				<div class="notes"><s:link id="register" view="/register.xhtml" value="Register New User"/></div>
  +			</fieldset>
  +            </h:form>
  +		</div>
  +	</div>
  +	<div id="footer">Created with JBoss EJB 3.0, Seam, MyFaces, and Facelets</div>
  +</div>
  +</f:view>
  +</body>
  +</html>
  
  
  
  1.11      +139 -111  jboss-seam/examples/hibernate/view/book.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: book.xhtml
  ===================================================================
  RCS file: book.xhtml
  diff -N book.xhtml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ book.xhtml	23 Dec 2007 19:52:59 -0000	1.11
  @@ -0,0 +1,176 @@
  +<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  +<ui:composition xmlns="http://www.w3.org/1999/xhtml"
  +	    		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:s="http://jboss.com/products/seam/taglib"
  +                xmlns:a="http://richfaces.org/a4j"
  +                xmlns:rich="http://richfaces.org/rich"
  +				template="template.xhtml">
  +
  +<!-- content -->
  +<ui:define name="content">
  +<div class="section">
  +	<h1>Book Hotel</h1>
  +</div>
  +<div class="section">
  +	<h:form id="booking">
  +	<fieldset>
  +		<div class="entry">
  +			<div class="label">Name:</div>
  +			<div class="output">#{hotel.name}</div>
  +		</div>
  +		<div class="entry">
  +			<div class="label">Address:</div>
  +			<div class="output">#{hotel.address}</div>
  +		</div>
  +		<div class="entry">
  +			<div class="label">City, State:</div>
  +			<div class="output">#{hotel.city}, #{hotel.state}</div>
  +		</div>
  +		<div class="entry">
  +			<div class="label">Zip:</div>
  +			<div class="output">#{hotel.zip}</div>
  +		</div>
  +		<div class="entry">
  +			<div class="label">Country:</div>
  +			<div class="output">#{hotel.country}</div>
  +		</div>
  +        <div class="entry">
  +            <div class="label">Nightly rate:</div>
  +            <div class="output">
  +                <h:outputText value="#{hotel.price}">
  +                    <f:convertNumber type="currency"  
  +                                     currencySymbol="$"/>
  +                </h:outputText>
  +            </div>
  +        </div>
  +		
  +		<s:validateAll>
  +    
  +            <f:facet name="aroundInvalidField">
  +                <s:span styleClass="errors"/>
  +            </f:facet>
  +            <f:facet name="afterInvalidField">
  +                <s:div styleClass="errors">
  +               	    <s:message/>
  +               	</s:div>
  +            </f:facet>
  +		    
  +			<div class="entry">
  +                            <div class="label"><h:outputLabel for="checkinDate">Check In Date:</h:outputLabel></div>
  +                            <div class="input">
  +                                <s:decorate id="checkinDateDecorate">
  +									<rich:calendar id="checkinDate" value="#{booking.checkinDate}" required="true" datePattern="MM/dd/yyyy" event="onblur" reRender="checkinDateDecorate" style="width: auto;" />                                
  +								</s:decorate>
  +                            </div>
  +			</div>
  +			
  +			<div class="entry">
  +                            <div class="label"><h:outputLabel for="checkoutDate">Check Out Date:</h:outputLabel></div>
  +                            <div class="input">
  +                                <s:decorate id="checkoutDateDecorate">
  +									<rich:calendar id="checkoutDate" value="#{booking.checkoutDate}" required="true" datePattern="MM/dd/yyyy" event="onblur" reRender="checkoutDateDecorate" style="width: auto;"/>                 
  +								</s:decorate>
  +                            </div>
  +                        </div>
  +
  +			<div class="entry">
  +				<div class="label"><h:outputLabel for="beds">Room Preference:</h:outputLabel></div>
  +				<div class="input">
  +					<s:decorate>
  +						<h:selectOneMenu id="beds" value="#{booking.beds}">
  +							<f:selectItem itemLabel="One king-size bed" itemValue="1"/>
  +							<f:selectItem itemLabel="Two double beds" itemValue="2"/>
  +							<f:selectItem itemLabel="Three beds" itemValue="3"/>
  +						</h:selectOneMenu>
  +					</s:decorate>
  +				</div>
  +			</div>
  +			
  +			<div class="entry">
  +				<div class="label"><h:outputLabel for="smoking">Smoking Preference:</h:outputLabel></div>
  +				<div id="radio" class="input">
  +					<s:decorate>
  +						<h:selectOneRadio id="smoking" value="#{booking.smoking}" layout="pageDirection">
  +							<f:selectItem itemLabel="Smoking" itemValue="true"/>
  +							<f:selectItem itemLabel="Non Smoking" itemValue="false"/>
  +						</h:selectOneRadio>
  +					</s:decorate>
  +				</div>
  +			</div>
  +			
  +			<div class="entry">
  +				<div class="label"><h:outputLabel for="creditCard">Credit Card #:</h:outputLabel></div>
  +				<div class="input">
  +					<s:decorate id="creditCardDecorate">
  +						<h:inputText id="creditCard" value="#{booking.creditCard}" required="true">
  +                           <a:support event="onblur" reRender="creditCardDecorate"/>
  +                        </h:inputText>
  +					</s:decorate>
  +				</div>
  +			</div>
  +			
  +			<div class="entry">
  +				<div class="label"><h:outputLabel for="creditCardName">Credit Card Name:</h:outputLabel></div>
  +				<div class="input">
  +					<s:decorate id="creditCardNameDecorate">
  +						<h:inputText id="creditCardName" value="#{booking.creditCardName}" required="true">
  +                           <a:support event="onblur" reRender="creditCardNameDecorate"/>
  +                        </h:inputText>
  +					</s:decorate>
  +				</div>
  +			</div>
  +			
  +			<div class="entry">
  +				<div class="label"><h:outputLabel for="creditCardExpiryMonth">Credit Card Expiry:</h:outputLabel></div>
  +				<div class="input">
  +					<s:decorate>
  +						<h:selectOneMenu id="creditCardExpiryMonth" value="#{booking.creditCardExpiryMonth}">
  +							<f:selectItem itemLabel="Jan" itemValue="1"/>
  +							<f:selectItem itemLabel="Feb" itemValue="2"/>
  +							<f:selectItem itemLabel="Mar" itemValue="3"/>
  +							<f:selectItem itemLabel="Apr" itemValue="4"/>
  +							<f:selectItem itemLabel="May" itemValue="5"/>
  +							<f:selectItem itemLabel="Jun" itemValue="6"/>
  +							<f:selectItem itemLabel="Jul" itemValue="7"/>
  +							<f:selectItem itemLabel="Aug" itemValue="8"/>
  +							<f:selectItem itemLabel="Sep" itemValue="9"/>
  +							<f:selectItem itemLabel="Oct" itemValue="10"/>
  +							<f:selectItem itemLabel="Nov" itemValue="11"/>
  +							<f:selectItem itemLabel="Dec" itemValue="12"/>
  +						</h:selectOneMenu>
  +						<h:selectOneMenu id="creditCardExpiryYear" value="#{booking.creditCardExpiryYear}">
  +							<f:selectItem itemLabel="2005" itemValue="2005"/>
  +							<f:selectItem itemLabel="2006" itemValue="2006"/>
  +							<f:selectItem itemLabel="2007" itemValue="2007"/>
  +							<f:selectItem itemLabel="2008" itemValue="2008"/>
  +							<f:selectItem itemLabel="2009" itemValue="2009"/>
  +						</h:selectOneMenu>
  +					</s:decorate>
  +				</div>
  +			</div>
  +			
  +		</s:validateAll>
  +		
  +		<div class="entry errors">
  +			<h:messages globalOnly="true"/>
  +		</div>
  +		
  +		<div class="entry">
  +			<div class="label">&#160;</div>
  +			<div class="input">
  +				<h:commandButton id="proceed" value="Proceed" action="#{hotelBooking.setBookingDetails}"/>&#160;
  +				<s:button id="cancel" value="Cancel" action="#{hotelBooking.cancel}"/>
  +			</div>
  +		</div>		
  +	</fieldset>
  +	</h:form>
  +</div>
  +</ui:define>
  +
  +<!-- sidebar -->
  +<ui:define name="sidebar">
  +</ui:define>
  +
  +</ui:composition>
  
  
  
  1.7       +23 -18    jboss-seam/examples/hibernate/view/confirm.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: confirm.xhtml
  ===================================================================
  RCS file: confirm.xhtml
  diff -N confirm.xhtml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ confirm.xhtml	23 Dec 2007 19:52:59 -0000	1.7
  @@ -0,0 +1,75 @@
  +<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  +<ui:composition xmlns="http://www.w3.org/1999/xhtml"
  +	    		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:s="http://jboss.com/products/seam/taglib"
  +				template="template.xhtml">
  +
  +<!-- content -->
  +<ui:define name="content">
  +<div class="section">
  +	<h1>Confirm Hotel Booking</h1>
  +</div>
  +<div class="section">
  +	<h:form id="confirm">
  +	<fieldset>
  +		<div class="entry">
  +			<div class="label">Name:</div>
  +			<div class="output">#{hotel.name}</div>
  +		</div>
  +		<div class="entry">
  +			<div class="label">Address:</div>
  +			<div class="output">#{hotel.address}</div>
  +		</div>
  +		<div class="entry">
  +			<div class="label">City, State:</div>
  +			<div class="output">#{hotel.city}, #{hotel.state}</div>
  +		</div>
  +		<div class="entry">
  +			<div class="label">Zip:</div>
  +			<div class="output">#{hotel.zip}</div>
  +		</div>
  +		<div class="entry">
  +			<div class="label">Country:</div>
  +			<div class="output">#{hotel.country}</div>
  +		</div>
  +        <div class="entry">
  +            <div class="label">Total payment:</div>
  +            <div class="output">
  +                <h:outputText value="#{booking.total}">
  +                    <f:convertNumber type="currency" 
  +                                     currencySymbol="$"/>
  +                </h:outputText>
  +            </div>
  +        </div>
  +		<div class="entry">
  +			<div class="label">Check In Date:</div>
  +			<div class="output"><h:outputText value="#{booking.checkinDate}"/></div>
  +		</div>
  +		<div class="entry">
  +			<div class="label">Check Out Date:</div>
  +			<div class="output"><h:outputText value="#{booking.checkoutDate}"/></div>
  +		</div>
  +		<div class="entry">
  +			<div class="label">Credit Card #:</div>
  +			<div class="output">#{booking.creditCard}</div>
  +		</div>
  +		<div class="entry">
  +			<div class="label">&#160;</div>
  +			<div class="input">
  +				<h:commandButton id="confirm" value="Confirm" action="#{hotelBooking.confirm}"/>&#160;
  +    			<s:button id="revise" value="Revise" view="/book.xhtml"/>&#160;
  +    			<h:commandButton id="cancel" value="Cancel" action="#{hotelBooking.cancel}"/>
  +			</div>
  +		</div>
  +	</fieldset>
  +	</h:form>
  +</div>
  +</ui:define>
  +
  +<!-- sidebar -->
  +<ui:define name="sidebar">
  +</ui:define>
  +
  +</ui:composition>
  
  
  
  1.5       +18 -20    jboss-seam/examples/hibernate/view/hotel.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: hotel.xhtml
  ===================================================================
  RCS file: hotel.xhtml
  diff -N hotel.xhtml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ hotel.xhtml	23 Dec 2007 19:52:59 -0000	1.5
  @@ -0,0 +1,62 @@
  +<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  +<ui:composition xmlns="http://www.w3.org/1999/xhtml"
  +	    		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:s="http://jboss.com/products/seam/taglib"
  +				template="template.xhtml">
  +
  +<!-- content -->
  +<ui:define name="content">
  +<div class="section">
  +	<h1>View Hotel</h1>
  +</div>
  +<div class="section">
  +	<div class="entry">
  +		<div class="label">Name:</div>
  +		<div class="output">#{hotel.name}</div>
  +	</div>
  +	<div class="entry">
  +		<div class="label">Address:</div>
  +		<div class="output">#{hotel.address}</div>
  +	</div>
  +	<div class="entry">
  +		<div class="label">City:</div>
  +		<div class="output">#{hotel.city}</div>
  +	</div>
  +	<div class="entry">
  +		<div class="label">State:</div>
  +		<div class="output">#{hotel.state}</div>
  +	</div>
  +	<div class="entry">
  +		<div class="label">Zip:</div>
  +		<div class="output">#{hotel.zip}</div>
  +	</div>
  +	<div class="entry">
  +		<div class="label">Country:</div>
  +		<div class="output">#{hotel.country}</div>
  +	</div>
  +    <div class="entry">
  +        <div class="label">Nightly rate:</div>
  +        <div class="output">
  +            <h:outputText value="#{hotel.price}">
  +                <f:convertNumber type="currency" 
  +                                 currencySymbol="$"/>
  +            </h:outputText>
  +        </div>
  +    </div>
  +</div>
  +<div class="section">
  +	<h:form id="hotel">
  +	<fieldset class="buttonBox">
  +		<h:commandButton id="bookHotel" action="#{hotelBooking.bookHotel}" value="Book Hotel"/>&#160;
  +		<h:commandButton id="cancel" action="#{hotelBooking.cancel}" value="Back to Search"/>
  +	</fieldset>
  +	</h:form>
  +</div>
  +</ui:define>
  +
  +<ui:define name="sidebar">
  +</ui:define>
  +
  +</ui:composition>
  
  
  
  1.3       +2 -2      jboss-seam/examples/hibernate/view/index.html
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: index.html
  ===================================================================
  RCS file: index.html
  diff -N index.html
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ index.html	23 Dec 2007 19:52:59 -0000	1.3
  @@ -0,0 +1,5 @@
  +<html>
  +<head>
  +  <meta http-equiv="Refresh" content="0; URL=home.seam">
  +</head>
  +</html>
  
  
  
  1.8       +76 -56    jboss-seam/examples/hibernate/view/password.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: password.xhtml
  ===================================================================
  RCS file: password.xhtml
  diff -N password.xhtml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ password.xhtml	23 Dec 2007 19:52:59 -0000	1.8
  @@ -0,0 +1,81 @@
  +<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  +<ui:composition xmlns="http://www.w3.org/1999/xhtml"
  +	    		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:s="http://jboss.com/products/seam/taglib"
  +				template="template.xhtml">
  +
  +<!-- content -->
  +<ui:define name="content">
  +<div class="section">
  +	<h1>Change Your Password</h1>
  +</div>
  +<div class="section">
  +	<h:form id="setpassword">
  +	
  +	    <f:facet name="aroundInvalidField">
  +            <s:span styleClass="errors"/>
  +	    </f:facet>
  + 	    <f:facet name="afterInvalidField">
  +            <s:div styleClass="errors">
  +                <s:message/>
  +            </s:div>
  + 	    </f:facet>
  +		    
  +		<fieldset>
  +		
  +			<div class="entry">
  +				<div class="label"><h:outputLabel for="password">Password:</h:outputLabel></div>
  +				<div class="input">
  +					<s:decorate>
  +						<h:inputSecret id="password" value="#{user.password}" required="true">
  +							<s:validate/>
  +						</h:inputSecret>
  +					</s:decorate>
  +				</div>
  +			</div>
  +			
  +			<div class="entry">
  +				<div class="label"><h:outputLabel for="verify">Verify:</h:outputLabel></div>
  +				<div class="input">
  +					<s:decorate>
  +						<h:inputSecret id="verify" value="#{changePassword.verify}" required="true"/>
  +					</s:decorate>
  +				</div>
  +			</div>
  +			
  +			<div class="entry errors">
  +				<h:messages globalOnly="true"/>
  +			</div>
  +			
  +			<div class="entry">
  +				<div class="label">&#160;</div>
  +				<div class="input">
  +					<h:commandButton id="change" value="Change" action="#{changePassword.changePassword}"/>&#160;
  +					<s:button id="cancel" value="Cancel" view="/main.xhtml"/>
  +				</div>
  +			</div>
  +			
  +		</fieldset>
  +		
  +	</h:form>
  +</div>
  +</ui:define>
  +
  +<!-- sidebar -->
  +<ui:define name="sidebar">
  +<h1>Simple things should be easy</h1>
  +<p>
  +    (And so should some complex things.) You shouldn't have to write four different classes
  +    just to change a password. Traditional J2EE architectures require that developers spend
  +    more time writing code to make the frameworks happy, than they ever get to spend writing
  +    code to make the user happy. Seam lets you reduce the size of your code dramatically.
  +    And that reduces bugs. And it makes refactoring easier. And it makes delivering new 
  +    functionality quicker. Productivity matters. But with Seam, JSF, EJB 3.0 and jBPM, you 
  +    don't need to sacrifice the ability to handle complex problems just to achieve great
  +    productivity.
  +</p>
  +</ui:define>
  +
  +</ui:composition>
  \ No newline at end of file
  
  
  
  1.4       +35 -34    jboss-seam/examples/hibernate/view/conversations.xhtml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: conversations.xhtml
  ===================================================================
  RCS file: conversations.xhtml
  diff -N conversations.xhtml
  --- /dev/null	1 Jan 1970 00:00:00 -0000
  +++ conversations.xhtml	23 Dec 2007 19:52:59 -0000	1.4
  @@ -0,0 +1,35 @@
  +<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  +<ui:composition xmlns="http://www.w3.org/1999/xhtml"
  +     xmlns:c="http://java.sun.com/jstl/core"
  +     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:s="http://jboss.com/products/seam/taglib">
  +<div>
  +<div class="section">
  +    <h1><h:outputText rendered="#{not empty conversationList}" value="Workspaces"/></h1>
  +</div>
  +
  +<div class="section">
  +    <h:form>
  +        <h:dataTable value="#{conversationList}" var="entry">
  +            <h:column>
  +                <h:commandLink action="#{entry.select}" value="#{entry.description}"/>
  +                &#160;
  +                <h:outputText value="[current]" rendered="#{entry.current}"/>
  +            </h:column>
  +            <h:column>
  +                <h:outputText value="#{entry.startDatetime}">
  +                    <s:convertDateTime type="time" pattern="hh:mm"/>
  +                </h:outputText>
  +                -
  +                <h:outputText value="#{entry.lastDatetime}">
  +                    <s:convertDateTime type="time" pattern="hh:mm"/>
  +                </h:outputText>
  +            </h:column>
  +        </h:dataTable>
  +    </h:form>
  +</div>
  +
  +</div>
  +</ui:composition>
  \ No newline at end of file
  
  
  



More information about the jboss-cvs-commits mailing list