You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(178) |
Feb
(169) |
Mar
(286) |
Apr
(117) |
May
(98) |
Jun
(68) |
Jul
(63) |
Aug
(121) |
Sep
(88) |
Oct
(124) |
Nov
(2) |
Dec
(111) |
2007 |
Jan
(224) |
Feb
(69) |
Mar
(10) |
Apr
(72) |
May
(7) |
Jun
(21) |
Jul
(33) |
Aug
(35) |
Sep
(12) |
Oct
(22) |
Nov
(5) |
Dec
(6) |
2008 |
Jan
(2) |
Feb
(10) |
Mar
(39) |
Apr
(58) |
May
(34) |
Jun
(9) |
Jul
(27) |
Aug
(10) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
From: Vance K. <va...@us...> - 2007-04-12 14:59:10
|
User: vancek Date: 07/04/12 07:59:11 cartridges/andromda-seam/src/main/resources - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:59:10
|
User: vancek Date: 07/04/12 07:59:11 cartridges/andromda-seam/src/main/resources/META-INF - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:59:09
|
User: vancek Date: 07/04/12 07:59:10 cartridges/andromda-seam/src/main/java/org/andromda/cartridges/seam/metafacades - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:59:08
|
User: vancek Date: 07/04/12 07:59:09 cartridges/andromda-seam/src/main/java/org/andromda/cartridges/seam - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:59:08
|
User: vancek Date: 07/04/12 07:59:09 cartridges/andromda-seam/src/main/java/org/andromda/cartridges - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:59:08
|
User: vancek Date: 07/04/12 07:59:08 cartridges/andromda-seam/src/main/java/org - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:59:07
|
User: vancek Date: 07/04/12 07:59:08 cartridges/andromda-seam/src/main/java/org/andromda - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:59:06
|
User: vancek Date: 07/04/12 07:59:07 cartridges/andromda-seam/src/main/java - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:59:05
|
User: vancek Date: 07/04/12 07:59:07 cartridges/andromda-seam/src/main - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:59:05
|
User: vancek Date: 07/04/12 07:59:06 cartridges/andromda-seam/src - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:59:05
|
User: vancek Date: 07/04/12 07:59:05 cartridges/andromda-seam/conf/main - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:59:04
|
User: vancek Date: 07/04/12 07:59:04 cartridges/andromda-seam - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:59:04
|
User: vancek Date: 07/04/12 07:59:06 cartridges/andromda-seam/conf/test - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:59:04
|
User: vancek Date: 07/04/12 07:59:05 cartridges/andromda-seam/conf - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:52:07
|
User: vancek Date: 07/04/12 07:52:07 Modified: samples/booking-seam/app pom.xml samples/booking-seam/web pom.xml samples/booking-seam/mda/src/main/config andromda.xml samples/booking-seam/mda pom.xml samples/booking-seam .classpath pom.xml samples/booking-seam/mda/src/main/uml booking-seam.xmi samples/booking-seam/core pom.xml Added: samples/booking-seam/web/src/main/xhtml home.xhtml book.xhtml register.xhtml index.html main.xhtml password.xhtml hotel.xhtml confirm.xhtml hotelview.xhtml template.xhtml display.xhtml conversations.xhtml edit.xhtml samples/booking-seam/core/src/main/java/org/andromda/test/hotelbooking UserDaoImpl.java ChangePasswordActionBean.java BookingDaoImpl.java LoggedInInterceptor.java BookingListActionBean.java HotelDaoImpl.java AuthenticatorActionBean.java HotelSearchingActionBean.java RegisterActionBean.java Booking.java HotelBookingActionBean.java samples/booking-seam/web/src/main/images cal-next.png spinner.gif dtpick.gif hdr.bg.gif bg.gif cal-prev.png header_line.gif hdr.title.gif cnt.bg.gif btn.bg.gif th.bg.gif hdr.ad.jpg hdr.bar.jpg sdb.bg.gif input.bg.gif samples/booking-seam/web/src/main/resources/exp confirmExp.html mainExp.html introExp.html registerExp.html bookingExp.html workspaceExp.html loginExp.html samples/booking-seam/web/src/main/css date.css custom.css trailblazer_main.css screen.css samples/booking-seam/core/src/main/resources seam.properties import.sql samples/booking-seam/web/src/main/resources/WEB-INF pages.xml Log: Update booking example using Seam 1.2.1.GA, JBoss 4.0.5.GA, Ajax4JSF 1.1.1-Snapshot, EJB3-1.0-Snapshot cartridge and Seam-1.0-Snapshot cartridge Revision Changes Path 1.1 plugins/samples/booking-seam/web/src/main/xhtml/home.xhtml Index: home.xhtml =================================================================== <!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 id="content"> <div class="section"> <h1>About this example application</h1> <p> This sample application demonstrates how easy it is to develop stateful web applications using JBoss Seam. Just register, login, and book a room to see Seam in action. Throughout the application you'll see popup links like the ones at the bottom of this page. Click them to see how the application works under the hood. </p> <p> Note: Please do NOT enter personal information or your credit card number in this sample application. </p> <p> <a href="#" onclick="window.open('exp/introExp.html','exp','width=752,height=500,scrollbars=yes');"> What is JBoss Seam? </a> </p> <p> <a href="#" onclick="window.open('exp/loginExp.html','exp','width=752,height=500,scrollbars=yes');"> What happens when I login? </a> </p> </div> </div> </div> <div id="footer">Created with JBoss EJB 3.0, Seam, MyFaces, and Facelets</div> </div> </f:view> </body> </html> 1.1 plugins/samples/booking-seam/web/src/main/xhtml/book.xhtml Index: book.xhtml =================================================================== <!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="https://ajax4jsf.dev.java.net/ajax" template="template.xhtml"> <!-- content --> <ui:define name="content"> <div class="section"> <h1>Book Hotel</h1> </div> <div class="section"> <div class="entry errors"> <h:messages globalOnly="true"/> </div> <ui:include src="hotelview.xhtml"/> <div style="clear:both"/> <h:form id="booking"> <fieldset> <s:decorate id="checkinDateDecorate" template="edit.xhtml"> <ui:define name="label">Check In Date:</ui:define> <h:inputText id="checkinDate" value="#{booking.checkinDate}" required="true"> <s:convertDateTime pattern="MM/dd/yyyy"/> <a:support event="onblur" reRender="checkinDateDecorate"/> </h:inputText> <s:selectDate for="checkinDate"> <h:graphicImage url="img/dtpick.gif" style="margin-left:5px;cursor:pointer"/> </s:selectDate> </s:decorate> <s:decorate id="checkoutDateDecorate" template="edit.xhtml"> <ui:define name="label">Check Out Date:</ui:define> <h:inputText id="checkoutDate" value="#{booking.checkoutDate}" required="true"> <s:convertDateTime pattern="MM/dd/yyyy"/> <a:support event="onblur" reRender="checkoutDateDecorate"/> </h:inputText> <s:selectDate for="checkoutDate"> <h:graphicImage url="img/dtpick.gif" style="margin-left:5px;cursor:pointer"/> </s:selectDate> </s:decorate> <s:decorate id="bedsDecorate" template="edit.xhtml"> <ui:define name="label">Room Preference:</ui:define> <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> <s:decorate id="smokingDecorate" template="edit.xhtml"> <ui:define name="label">Smoking Preference:</ui:define> <h:selectOneRadio id="smoking" value="#{booking.smoking}" layout="pageDirection" styleClass="radio"> <f:selectItem itemLabel="Smoking" itemValue="true"/> <f:selectItem itemLabel="Non Smoking" itemValue="false"/> </h:selectOneRadio> </s:decorate> <s:decorate id="creditCardDecorate" template="edit.xhtml"> <ui:define name="label">Credit Card #:</ui:define> <h:inputText id="creditCard" value="#{booking.creditCard}" required="true"> <a:support event="onblur" reRender="creditCardDecorate"/> </h:inputText> </s:decorate> <s:decorate id="creditCardNameDecorate" template="edit.xhtml"> <ui:define name="label">Credit Card Name:</ui:define> <h:inputText id="creditCardName" value="#{booking.creditCardName}" required="true"> <a:support event="onblur" reRender="creditCardNameDecorate"/> </h:inputText> </s:decorate> <s:decorate id="creditCardExpiryDecorate" template="edit.xhtml"> <ui:define name="label">Credit Card Expiry:</ui:define> <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 class="buttonBox"> <h:commandButton id="proceed" value="Proceed" action="#{hotelBooking.setBookingDetails}"/>   <s:button id="cancel" value="Cancel" action="#{hotelBooking.cancel}"/> </div> </fieldset> </h:form> </div> </ui:define> <!-- sidebar --> <ui:define name="sidebar"> <h1>Workspace management</h1> <p> As you can see, Seam makes it easy to work in multiple windows or multiple browser tabs. But you can even switch between multiple tasks inside a single browser tab! The "Workspaces" section showcases this advanced feature. </p> <p> <a href="#" onclick="window.open('exp/workspaceExp.html','exp','width=752,height=500,scrollbars=yes');"> How does the workspace list work? </a> </p> </ui:define> </ui:composition> 1.1 plugins/samples/booking-seam/web/src/main/xhtml/register.xhtml Index: register.xhtml =================================================================== <!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="https://ajax4jsf.dev.java.net/ajax"> <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"> <h1>Integrated multi-layer validation</h1> <p> Robust applications need data validation in several different places. Seam integrates Hibernate Validator, a set of annotations for expressing data model constraints in your domain model classes. Then, these constraints are applied almost completely transparently at three levels of the application: by Seam when the user first enters data, by EJB before persisting data to the database, and, if you use Hibernate to generate your database schema, by the database constraints themselves. Multi-layer validation hardens your application and protects your data. Even better, it's self-documenting, and easy to change when your business rules change. </p> <p> <a href="#" onclick="window.open('exp/registerExp.html','exp','width=752,height=500,scrollbars=yes');"> What happens when I register? </a> </p> </div> <div id="content"> <div class="section"> <h1>Register</h1> </div> <div class="section"> <div class="entry errors"> <h:messages globalOnly="true"/> </div> <h:form id="registration"> <fieldset> <s:decorate id="usernameDecorate" template="edit.xhtml"> <ui:define name="label">Username:</ui:define> <h:inputText id="username" value="#{user.username}" required="true"> <a:support event="onblur" reRender="usernameDecorate"/> </h:inputText> </s:decorate> <s:decorate id="nameDecorate" template="edit.xhtml"> <ui:define name="label">Real Name:</ui:define> <h:inputText id="name" value="#{user.name}" required="true"> <a:support event="onblur" reRender="nameDecorate"/> </h:inputText> </s:decorate> <s:decorate id="passwordDecorate" template="edit.xhtml"> <ui:define name="label">Password:</ui:define> <h:inputSecret id="password" value="#{user.password}" required="true"/> </s:decorate> <s:decorate id="verifyDecorate" template="edit.xhtml"> <ui:define name="label">Verify Password:</ui:define> <h:inputSecret id="verify" value="#{register.verify}" required="true"/> </s:decorate> <div class="buttonBox"> <h:commandButton id="register" value="Register" action="#{register.register}"/>   <s:button id="cancel" value="Cancel" view="/home.xhtml"/> </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.1 plugins/samples/booking-seam/web/src/main/xhtml/index.html Index: index.html =================================================================== <html> <head> <meta http-equiv="Refresh" content="0; URL=home.seam"> </head> </html> 1.1 plugins/samples/booking-seam/web/src/main/xhtml/main.xhtml Index: main.xhtml =================================================================== <!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="https://ajax4jsf.dev.java.net/ajax" template="template.xhtml"> <!-- content --> <ui:define name="content"> <div class="section"> <span class="errors"> <h:messages globalOnly="true"/> </span> <h1>Search Hotels</h1> <h:form id="searchCriteria"> <fieldset> <h:inputText id="searchString" value="#{hotelSearch.searchString}" style="width: 165px;"> <a:support event="onkeyup" actionListener="#{hotelSearch.find}" reRender="searchResults" /> </h:inputText>   <a:commandButton id="findHotels" value="Find Hotels" action="#{hotelSearch.find}" reRender="searchResults"/>   <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>  <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"> <h1>State management in Seam</h1> <p> State in Seam is <em>contextual</em>. When you click "Find Hotels", the application retrieves a list of hotels from the database and caches it in the session context. When you navigate to one of the hotel records by clicking the "View Hotel" link, a <em>conversation</em> begins. The conversation is attached to a particular tab, in a particular browser window. You can navigate to multiple hotels using "open in new tab" or "open in new window" in your web browser. Each window will execute in the context of a different conversation. The application keeps state associated with your hotel booking in the conversation context, which ensures that the concurrent conversations do not interfere with each other. </p> <p> <a href="#" onclick="window.open('exp/mainExp.html','exp','width=752,height=500,scrollbars=yes');"> How does the search page work? </a> </p> </ui:define> </ui:composition> 1.1 plugins/samples/booking-seam/web/src/main/xhtml/password.xhtml Index: password.xhtml =================================================================== <!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"> <div class="entry errors"> <h:messages globalOnly="true"/> </div> <h:form id="setpassword"> <fieldset> <s:decorate template="edit.xhtml"> <ui:define name="label">Password:</ui:define> <h:inputSecret id="password" value="#{user.password}" required="true"/> </s:decorate> <s:decorate template="edit.xhtml"> <ui:define name="label">Verify:</ui:define> <h:inputSecret id="verify" value="#{changePassword.verify}" required="true"/> </s:decorate> <div class="buttonBox"> <h:commandButton id="change" value="Change" action="#{changePassword.changePassword}"/>   <s:button id="cancel" value="Cancel" view="/main.xhtml"/> </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> 1.1 plugins/samples/booking-seam/web/src/main/xhtml/hotel.xhtml Index: hotel.xhtml =================================================================== <!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"> <ui:include src="hotelview.xhtml"/> <div class="buttonBox"> <h:form id="hotel"> <h:commandButton id="bookHotel" action="#{hotelBooking.bookHotel}" value="Book Hotel"/>   <h:commandButton id="cancel" action="#{hotelBooking.cancel}" value="Back to Search"/> </h:form> </div> </div> </ui:define> <!-- sidebar --> <ui:define name="sidebar"> <h1>Don't kill your database</h1> <p> Keeping conversational state in memory in the middle tier is a great way to improve your application's scalability. It saves hitting the database every time we refresh a page, to re-read the data we were just looking at five seconds ago. By using Seam's conversation context, we get a natural cache of data associated with the what the user is currently doing. By nature, this cache has a more efficient eviction policy than the MRU-type algorithms used by a typical second-level data cache in an O/R mapping engine like Hibernate (at least for some kinds of data). Of course, you should use a clever combination of second-level caching and conversational data caching to achieve the best performance for your application. </p> <p> <a href="#" onclick="window.open('exp/bookingExp.html','exp','width=752,height=500,scrollbars=yes');"> How does the hotel booking wizard work? </a> </p> </ui:define> </ui:composition> 1.1 plugins/samples/booking-seam/web/src/main/xhtml/confirm.xhtml Index: confirm.xhtml =================================================================== <!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"> <ui:include src="hotelview.xhtml"/> <s:decorate template="display.xhtml"> <ui:define name="label">Total Payment:</ui:define> <h:outputText value="#{booking.total}"> <f:convertNumber type="currency" currencySymbol="$"/> </h:outputText> </s:decorate> <s:decorate template="display.xhtml"> <ui:define name="label">Check In Date:</ui:define> <h:outputText value="#{booking.checkinDate}"/> </s:decorate> <s:decorate template="display.xhtml"> <ui:define name="label">Check Out Date:</ui:define> <h:outputText value="#{booking.checkoutDate}"/> </s:decorate> <s:decorate template="display.xhtml"> <ui:define name="label">Credit Card #:</ui:define> #{booking.creditCard} </s:decorate> <div class="buttonBox"> <h:form id="confirm"> <h:commandButton id="confirm" value="Confirm" action="#{hotelBooking.confirm}"/>   <s:button id="revise" value="Revise" view="/book.xhtml"/>   <h:commandButton id="cancel" value="Cancel" action="#{hotelBooking.cancel}"/> </h:form> </div> </div> </ui:define> <!-- sidebar --> <ui:define name="sidebar"> <h1>Back button navigation</h1> <p> When you click "Confirm", the new booking is written to the database, the conversation ends, and state associated with the conversation is automatically destroyed by Seam. After you confirm your booking, try hitting the back button on your web browser and clicking "Confirm" again. Seam makes it easy implement applications that behave elegantly in response to the back, forward and refresh buttons. </p> <p> <a href="#" onclick="window.open('exp/confirmExp.html','exp','width=752,height=500,scrollbars=yes');"> What happens when the conversation ends? </a> </p> </ui:define> </ui:composition> 1.1 plugins/samples/booking-seam/web/src/main/xhtml/hotelview.xhtml Index: hotelview.xhtml =================================================================== <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"> <s:decorate template="display.xhtml"> <ui:define name="label">Name:</ui:define> #{hotel.name} </s:decorate> <s:decorate template="display.xhtml"> <ui:define name="label">Address:</ui:define> #{hotel.address} </s:decorate> <s:decorate template="display.xhtml"> <ui:define name="label">City:</ui:define> #{hotel.city} </s:decorate> <s:decorate template="display.xhtml"> <ui:define name="label">State:</ui:define> #{hotel.state} </s:decorate> <s:decorate template="display.xhtml"> <ui:define name="label">Zip:</ui:define> #{hotel.zip} </s:decorate> <s:decorate template="display.xhtml"> <ui:define name="label">Country:</ui:define> #{hotel.country} </s:decorate> <s:decorate template="display.xhtml"> <ui:define name="label">Nightly rate:</ui:define> <h:outputText value="#{hotel.name}"> <f:convertNumber type="currency" currencySymbol="$"/> </h:outputText> </s:decorate> </ui:composition> 1.1 plugins/samples/booking-seam/web/src/main/xhtml/template.xhtml Index: template.xhtml =================================================================== <!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" /> <link href="css/date.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 EJB 3.0, Seam, MyFaces, and Facelets</div> </div> </body> </html> 1.1 plugins/samples/booking-seam/web/src/main/xhtml/display.xhtml Index: display.xhtml =================================================================== <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"> <div class="entry"> <span class="label"> <ui:insert name="label"/> </span> <span class="input"> <ui:insert/> </span> </div> </ui:composition> 1.1 plugins/samples/booking-seam/web/src/main/xhtml/conversations.xhtml Index: conversations.xhtml =================================================================== <!DOCTYPE div PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <div 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 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}"/>   <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> 1.1 plugins/samples/booking-seam/web/src/main/xhtml/edit.xhtml Index: edit.xhtml =================================================================== <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"> <div class="entry"> <s:label styleClass="label #{invalid?'errors':''}"> <ui:insert name="label"/> <s:span styleClass="required" rendered="#{required}">*</s:span> </s:label> <span class="input #{invalid?'errors':''}"> <s:validateAll> <ui:insert/> </s:validateAll> </span> <s:message styleClass="error errors"/> </div> </ui:composition> 1.1 plugins/samples/booking-seam/core/src/main/java/org/andromda/test/hotelbooking/UserDaoImpl.java Index: UserDaoImpl.java =================================================================== // license-header java merge-point /** * This is only generated once! It will never be overwritten. * You can (and have to!) safely modify it by hand. */ package org.andromda.test.hotelbooking; /** * @see org.andromda.test.hotelbooking.User */ public class UserDaoImpl extends org.andromda.test.hotelbooking.UserDaoBase { } 1.1 plugins/samples/booking-seam/core/src/main/java/org/andromda/test/hotelbooking/ChangePasswordActionBean.java Index: ChangePasswordActionBean.java =================================================================== // license-header java merge-point // // Generated by: SessionBeanImpl.vsl in andromda-ejb3-cartridge. // package org.andromda.test.hotelbooking; import org.jboss.seam.annotations.security.Restrict; /** * @see org.andromda.test.hotelbooking.ChangePasswordActionBase * * This session bean is a Seam component. Currently, Seam components * must have the bean type specified via annotations. Once this has been * fixed in Seam 1.2.1, it is enough to define the session bean * in ejb-jar.xml and we can safely remove this annotation. */ @javax.ejb.Stateful @Restrict("#{identity.loggedIn}") //Uncomment to define Seam startup //@org.jboss.seam.annotations.Startup // Uncomment to enable webservices for ChangePasswordActionBean // @javax.jws.WebService(endpointInterface = "org.andromda.test.hotelbooking.ChangePasswordActionWSInterface") public class ChangePasswordActionBean extends org.andromda.test.hotelbooking.ChangePasswordActionBase implements org.andromda.test.hotelbooking.ChangePasswordActionLocal, org.andromda.test.hotelbooking.ChangePasswordActionRemote{ /** * Bean serial version ID */ private static final long serialVersionUID = 1L; // --------------- Constructors --------------- /** * Default constructor extending base class default constructor */ public ChangePasswordActionBean() { super(); } /** * Constructor with all attribute values. * @param verify Value for the verify property * @param changed Value for the changed property */ public ChangePasswordActionBean(java.lang.String verify, boolean changed) { super(verify, changed); } // -------- Business Methods Impl -------------- /** * @see org.andromda.test.hotelbooking.ChangePasswordActionBase#changePassword() */ protected void handleChangePassword() throws java.lang.Exception { if (user.getPassword().equals(verify)) { getUserDao().update(user); facesMessages.add("Password updated"); setChanged(true); } else { facesMessages.addToControl("verify", "Re-enter new password"); revertUser(); setVerify(null); } } /** * */ private void revertUser() throws java.lang.Exception { user = getUserDao().load(user.getUsername()); } // -------- Lifecycle Callback Implementation -------------- } 1.1 plugins/samples/booking-seam/core/src/main/java/org/andromda/test/hotelbooking/BookingDaoImpl.java Index: BookingDaoImpl.java =================================================================== // license-header java merge-point /** * This is only generated once! It will never be overwritten. * You can (and have to!) safely modify it by hand. */ package org.andromda.test.hotelbooking; /** * @see org.andromda.test.hotelbooking.Booking */ public class BookingDaoImpl extends org.andromda.test.hotelbooking.BookingDaoBase { } 1.1 plugins/samples/booking-seam/core/src/main/java/org/andromda/test/hotelbooking/LoggedInInterceptor.java Index: LoggedInInterceptor.java =================================================================== // license-header java merge-point package org.andromda.test.hotelbooking; /** * Interceptor class LoggedInInterceptor */ public class LoggedInInterceptor { /** * Default interceptor execution method * * @param ctx the invocation context * @return */ @javax.interceptor.AroundInvoke public Object execute(javax.interceptor.InvocationContext ctx) throws Exception { // Add implementation try { return ctx.proceed(); } catch (Exception e) { throw e; } } } 1.1 plugins/samples/booking-seam/core/src/main/java/org/andromda/test/hotelbooking/BookingListActionBean.java Index: BookingListActionBean.java =================================================================== // license-header java merge-point // // Generated by: SessionBeanImpl.vsl in andromda-ejb3-cartridge. // package org.andromda.test.hotelbooking; import java.util.List; import org.jboss.seam.annotations.security.Restrict; import org.jboss.seam.core.FacesMessages; /** * @see org.andromda.test.hotelbooking.BookingListActionBase * * This session bean is a Seam component. Currently, Seam components * must have the bean type specified via annotations. Once this has been * fixed in Seam 1.2.1, it is enough to define the session bean * in ejb-jar.xml and we can safely remove this annotation. */ @javax.ejb.Stateful @Restrict("#{identity.loggedIn}") // Uncomment to define Seam startup // @org.jboss.seam.annotations.Startup // Uncomment to enable webservices for BookingListActionBean // @javax.jws.WebService(endpointInterface = "org.andromda.test.hotelbooking.BookingListActionWSInterface") public class BookingListActionBean extends org.andromda.test.hotelbooking.BookingListActionBase implements org.andromda.test.hotelbooking.BookingListActionLocal, org.andromda.test.hotelbooking.BookingListActionRemote { /** * Bean serial version ID */ private static final long serialVersionUID = 1L; // --------------- Constructors --------------- /** * Default constructor extending base class default constructor */ public BookingListActionBean() { super(); } // -------- Business Methods Impl -------------- /** * @see org.andromda.test.hotelbooking.BookingListActionBase#getBookings() */ protected void handleGetBookings() throws java.lang.Exception { bookings = (List<Booking>)getBookingDao().findByUsername(user.getUsername()); } /** * @see org.andromda.test.hotelbooking.BookingListActionBase#cancel() */ protected void handleCancel() throws java.lang.Exception { log.info("Cancel booking: " + booking.getId() + " user: " + user.getUsername()); Booking cancelled = getBookingDao().load(booking.getId()); if (cancelled != null) { getBookingDao().remove(cancelled); } getBookings(); FacesMessages.instance().add("Booking cancelled for confirmation number: " + booking.getId()); } // -------- Lifecycle Callback Implementation -------------- } 1.1 plugins/samples/booking-seam/core/src/main/java/org/andromda/test/hotelbooking/HotelDaoImpl.java Index: HotelDaoImpl.java =================================================================== // license-header java merge-point /** * This is only generated once! It will never be overwritten. * You can (and have to!) safely modify it by hand. */ package org.andromda.test.hotelbooking; /** * @see org.andromda.test.hotelbooking.Hotel */ public class HotelDaoImpl extends org.andromda.test.hotelbooking.HotelDaoBase { } 1.1 plugins/samples/booking-seam/core/src/main/java/org/andromda/test/hotelbooking/AuthenticatorActionBean.java Index: AuthenticatorActionBean.java =================================================================== // license-header java merge-point // // Generated by: SessionBeanImpl.vsl in andromda-ejb3-cartridge. // package org.andromda.test.hotelbooking; import java.util.List; import org.jboss.seam.security.Identity; /** * @see org.andromda.test.hotelbooking.AuthenticatorActionBase * * Remember to manually configure the local business interface this bean implements if originally you only * defined the remote business interface. However, this change is automatically reflected in the ejb-jar.xml. * * This session bean is a Seam component. Currently, Seam components * must have the bean type specified via annotations. Once this has been * fixed in Seam 1.2.1, it is enough to define the session bean * in ejb-jar.xml and we can safely remove this annotation. */ @javax.ejb.Stateless // Uncomment to define Seam startup // @org.jboss.seam.annotations.Startup // Uncomment to enable webservices for AuthenticatorActionBean // @javax.jws.WebService(endpointInterface = "org.andromda.test.hotelbooking.AuthenticatorActionWSInterface") public class AuthenticatorActionBean extends org.andromda.test.hotelbooking.AuthenticatorActionBase implements org.andromda.test.hotelbooking.AuthenticatorActionLocal, org.andromda.test.hotelbooking.AuthenticatorActionRemote { // --------------- Constructors --------------- /** * Default constructor extending base class default constructor */ public AuthenticatorActionBean() { super(); } // -------- Business Methods Impl -------------- /** * @see org.andromda.test.hotelbooking.AuthenticatorActionBase#authenticate() */ protected boolean handleAuthenticate() throws java.lang.Exception { List results = getUserDao().findByUsernameAndPassword( Identity.instance().getUsername(), Identity.instance().getPassword()); if (results.size() == 0) { return false; } else { user = (User)results.get(0); return true; } } // -------- Lifecycle Callback Implementation -------------- } 1.1 plugins/samples/booking-seam/core/src/main/java/org/andromda/test/hotelbooking/HotelSearchingActionBean.java Index: HotelSearchingActionBean.java =================================================================== // license-header java merge-point // // Generated by: SessionBeanImpl.vsl in andromda-ejb3-cartridge. // package org.andromda.test.hotelbooking; import java.util.ArrayList; import java.util.List; import org.apache.commons.collections.CollectionUtils; import org.jboss.seam.annotations.security.Restrict; /** * @see org.andromda.test.hotelbooking.HotelSearchingActionBase * * This session bean is a Seam component. Currently, Seam components * must have the bean type specified via annotations. Once this has been * fixed in Seam 1.2.1, it is enough to define the session bean * in ejb-jar.xml and we can safely remove this annotation. */ @javax.ejb.Stateful @Restrict("#{identity.loggedIn}") // Uncomment to define Seam startup // @org.jboss.seam.annotations.Startup // Uncomment to enable webservices for HotelSearchingActionBean // @javax.jws.WebService(endpointInterface = "org.andromda.test.hotelbooking.HotelSearchingActionWSInterface") public class HotelSearchingActionBean extends org.andromda.test.hotelbooking.HotelSearchingActionBase implements org.andromda.test.hotelbooking.HotelSearchingActionLocal, org.andromda.test.hotelbooking.HotelSearchingActionRemote { /** * Bean serial version ID */ private static final long serialVersionUID = 1L; // --------------- Constructors --------------- /** * Default constructor extending base class default constructor */ public HotelSearchingActionBean() { super(); } /** * Constructor with all attribute values. * @param searchString Value for the searchString property * @param pageSize Value for the pageSize property * @param page Value for the page property */ public HotelSearchingActionBean(java.lang.String searchString, int pageSize, int page) { super(searchString, pageSize, page); } // -------- Business Methods Impl -------------- /** * @see org.andromda.test.hotelbooking.HotelSearchingActionBase#find() */ protected void handleFind() throws java.lang.Exception { page = 0; queryHotels(); } /** * @see org.andromda.test.hotelbooking.HotelSearchingActionBase#nextPage() */ protected void handleNextPage() throws java.lang.Exception { page++; queryHotels(); } /** * @see org.andromda.test.hotelbooking.HotelSearchingActionBase#isNextPageAvailable() */ protected boolean handleIsNextPageAvailable() throws java.lang.Exception { return hotels != null && hotels.size() == pageSize; } /** * */ private void queryHotels() throws java.lang.Exception { String searchPattern = searchString == null ? "%" : '%' + searchString.toLowerCase().replace('*', '%') + '%'; hotels = (List<Hotel>)(getHotelDao().findBySearch(searchPattern, page * pageSize, pageSize)); } /** * @see org.andromda.test.hotelbooking.HotelSearchingActionBase#handleGetSearchPattern() */ protected String handleGetSearchPattern() throws Exception { return searchString == null ? "%" : '%' + searchString.toLowerCase().replace('*', '%') + '%'; } // -------- Lifecycle Callback Implementation -------------- } 1.1 plugins/samples/booking-seam/core/src/main/java/org/andromda/test/hotelbooking/RegisterActionBean.java Index: RegisterActionBean.java =================================================================== // license-header java merge-point // // Generated by: SessionBeanImpl.vsl in andromda-ejb3-cartridge. // package org.andromda.test.hotelbooking; /** * @see org.andromda.test.hotelbooking.RegisterActionBase * * This session bean is a Seam component. Currently, Seam components * must have the bean type specified via annotations. Once this has been * fixed in Seam 1.2.1, it is enough to define the session bean * in ejb-jar.xml and we can safely remove this annotation. */ @javax.ejb.Stateful //Uncomment to define Seam startup //@org.jboss.seam.annotations.Startup // Uncomment to enable webservices for RegisterActionBean // @javax.jws.WebService(endpointInterface = "org.andromda.test.hotelbooking.RegisterActionWSInterface") public class RegisterActionBean extends org.andromda.test.hotelbooking.RegisterActionBase implements org.andromda.test.hotelbooking.RegisterActionLocal, org.andromda.test.hotelbooking.RegisterActionRemote { /** * Bean serial version ID */ private static final long serialVersionUID = 1L; // --------------- Constructors --------------- /** * Default constructor extending base class default constructor */ public RegisterActionBean() { super(); } /** * Constructor with all attribute values. * @param verify Value for the verify property * @param registered Value for the registered property */ public RegisterActionBean(java.lang.String verify, boolean registered) { super(verify, registered); } // -------- Business Methods Impl -------------- /** * @see org.andromda.test.hotelbooking.RegisterActionBase#register() */ protected void handleRegister() throws java.lang.Exception { if (user.getPassword().equals(verify)) { if (getUserDao().load(user.getUsername()) == null) { getUserDao().create(user); facesMessages.add("Successfully registered as #{user.username}"); setRegistered(true); } else { facesMessages.addToControl("username", "Username #{user.username} already exists"); } } else { facesMessages.addToControl("verify", "Re-enter your password"); setVerify(null); } } /** * @see org.andromda.test.hotelbooking.RegisterActionBase#invalid() */ protected void handleInvalid() throws java.lang.Exception { facesMessages.add("Please try again"); } // -------- Lifecycle Callback Implementation -------------- } 1.1 plugins/samples/booking-seam/core/src/main/java/org/andromda/test/hotelbooking/Booking.java Index: Booking.java =================================================================== // license-header java merge-point // // Attention: Generated code! Do not modify by hand! // Generated by: Entity.vsl in andromda-ejb3-cartridge. // package org.andromda.test.hotelbooking; import java.math.BigDecimal; import java.text.DateFormat; /** * Autogenerated POJO EJB3 implementation class for Booking. * * Add any manual implementation within this class. This class will NOT * be overwritten with incremental changes. * * * */ @javax.persistence.Entity @javax.persistence.Table(name = "BOOKING") // Uncomment to enable entity listener for Booking // @javax.persistence.EntityListeners({org.andromda.test.hotelbooking.BookingListener.class}) // Uncomment to enable caching for Booking // @org.hibernate.annotations.Cache(usage = org.hibernate.annotations.CacheConcurrencyStrategy.TRANSACTIONAL) @javax.persistence.NamedQueries ({ @javax.persistence.NamedQuery(name = "Booking.findAll", query = "select booking from Booking AS booking"), @javax.persistence.NamedQuery(name = "Booking.findByUsername", query = "select distinct b from Booking b where b.user.username = :username order by b.checkinDate") }) public class Booking extends org.andromda.test.hotelbooking.BookingEmbeddable implements java.io.Serializable, Comparable<Booking> { /** * The serial version UID of this class required for serialization. */ private static final long serialVersionUID = -8540350998218369615L; // --------------- constructors ----------------- /** * Default Booking constructor */ public Booking() { super(); } /** * Implementation for the constructor with all POJO attributes except auto incremented identifiers. * This method sets all POJO fields defined in this/super class to the * values provided by the parameters. * */ public Booking(java.util.Date checkinDate, java.util.Date checkoutDate, java.lang.String creditCard, boolean smoking, int beds, java.lang.String creditCardName, int creditCardExpiryMonth, int creditCardExpiryYear) { super(checkinDate, checkoutDate, creditCard, smoking, beds, creditCardName, creditCardExpiryMonth, creditCardExpiryYear); } /** * Constructor with all POJO attribute values and CMR relations. * * @param checkinDate Value for the checkinDate property * @param checkoutDate Value for the checkoutDate property * @param creditCard Value for the creditCard property * @param smoking Value for the smoking property * @param beds Value for the beds property * @param creditCardName Value for the creditCardName property * @param creditCardExpiryMonth Value for the creditCardExpiryMonth property * @param creditCardExpiryYear Value for the creditCardExpiryYear property * @param user Value for the user relation * @param hotel Value for the hotel relation */ public Booking(java.util.Date checkinDate, java.util.Date checkoutDate, java.lang.String creditCard, boolean smoking, int beds, java.lang.String creditCardName, int creditCardExpiryMonth, int creditCardExpiryYear, org.andromda.test.hotelbooking.User user, org.andromda.test.hotelbooking.Hotel hotel) { super(checkinDate, checkoutDate, creditCard, smoking, beds, creditCardName, creditCardExpiryMonth, creditCardExpiryYear, user, hotel); } // -------------- Entity Methods ----------------- /** * */ @javax.persistence.Transient public java.lang.String getDescription() { DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM); return getHotel() == null ? null : getHotel().getName() + ", " + df.format(getCheckinDate()) + " to " + df.format(getCheckoutDate()); } /** * */ @javax.persistence.Transient public int getNights() { return (int)(getCheckoutDate().getTime() - getCheckinDate().getTime())/1000/60/60/24; } /** * */ @javax.persistence.Transient public java.lang.Double getTotal() { return new BigDecimal(getHotel().getPrice()).multiply(new BigDecimal(getNights())).doubleValue(); } // --------------- Lifecycle callbacks ----------------- /** * @see java.lang.Comparable#compareTo(T) */ public int compareTo(Booking o) { int cmp = 0; if (this.getId() != null) { cmp = this.getId().compareTo(o.getId()); } else { if (this.getCheckinDate() != null) { cmp = (cmp != 0 ? cmp : this.getCheckinDate().compareTo(o.getCheckinDate())); } if (this.getCheckoutDate() != null) { cmp = (cmp != 0 ? cmp : this.getCheckoutDate().compareTo(o.getCheckoutDate())); } if (this.getCreditCard() != null) { cmp = (cmp != 0 ? cmp : this.getCreditCard().compareTo(o.getCreditCard())); } if (this.getCreditCardName() != null) { cmp = (cmp != 0 ? cmp : this.getCreditCardName().compareTo(o.getCreditCardName())); } } return cmp; } } 1.1 plugins/samples/booking-seam/core/src/main/java/org/andromda/test/hotelbooking/HotelBookingActionBean.java Index: HotelBookingActionBean.java =================================================================== // license-header java merge-point // // Generated by: SessionBeanImpl.vsl in andromda-ejb3-cartridge. // package org.andromda.test.hotelbooking; import java.util.Calendar; import org.jboss.seam.annotations.security.Restrict; /** * @see org.andromda.test.hotelbooking.HotelBookingActionBase * * This session bean is a Seam component. Currently, Seam components * must have the bean type specified via annotations. Once this has been * fixed in Seam 1.2.1, it is enough to define the session bean * in ejb-jar.xml and we can safely remove this annotation. */ @javax.ejb.Stateful @Restrict("#{identity.loggedIn}") //Uncomment to define Seam startup //@org.jboss.seam.annotations.Startup // Uncomment to enable webservices for HotelBookingActionBean // @javax.jws.WebService(endpointInterface = "org.andromda.test.hotelbooking.HotelBookingActionWSInterface") public class HotelBookingActionBean extends org.andromda.test.hotelbooking.HotelBookingActionBase implements org.andromda.test.hotelbooking.HotelBookingActionLocal, org.andromda.test.hotelbooking.HotelBookingActionRemote{ /** * Bean serial version ID */ private static final long serialVersionUID = 1L; // --------------- Constructors --------------- /** * Default constructor extending base class default constructor */ public HotelBookingActionBean() { super(); } /** * Constructor with all attribute values. * @param bookingValid Value for the bookingValid property */ public HotelBookingActionBean(boolean bookingValid) { super(bookingValid); } // -------- Business Methods Impl -------------- /** * @see org.andromda.test.hotelbooking.HotelBookingActionBase#selectHotel(org.andromda.test.hotelbooking.Hotel) */ protected void handleSelectHotel(org.andromda.test.hotelbooking.Hotel selectedHotel) throws java.lang.Exception { hotel = emanager.merge(selectedHotel); } /** * @see org.andromda.test.hotelbooking.HotelBookingActionBase#bookHotel() */ protected void handleBookHotel() throws java.lang.Exception { booking = new Booking(); booking.setHotel(hotel); booking.setUser(user); Calendar calendar = Calendar.getInstance(); booking.setCheckinDate( calendar.getTime()); calendar.add(Calendar.DAY_OF_MONTH, 1); booking.setCheckoutDate( calendar.getTime()); } /** * @see org.andromda.test.hotelbooking.HotelBookingActionBase#setBookingDetails() ... [truncated message content] |
From: Vance K. <va...@us...> - 2007-04-12 14:51:03
|
User: vancek Date: 07/04/12 07:51:00 plugins/samples/booking-seam/web/src/main/xhtml - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:51:02
|
User: vancek Date: 07/04/12 07:50:59 plugins/samples/booking-seam/web/src/main/images - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:51:02
|
User: vancek Date: 07/04/12 07:51:00 plugins/samples/booking-seam/web/src/main/resources/exp - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:51:01
|
User: vancek Date: 07/04/12 07:51:00 plugins/samples/booking-seam/web/src/main/resources/WEB-INF - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:50:58
|
User: vancek Date: 07/04/12 07:51:00 plugins/samples/booking-seam/web/src/main/resources - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:50:58
|
User: vancek Date: 07/04/12 07:50:59 plugins/samples/booking-seam/web/src/main/java - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:50:57
|
User: vancek Date: 07/04/12 07:50:59 plugins/samples/booking-seam/web/src/main/css - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:50:57
|
User: vancek Date: 07/04/12 07:50:59 plugins/samples/booking-seam/core/src/main/resources - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:50:57
|
User: vancek Date: 07/04/12 07:50:59 plugins/samples/booking-seam/core/src/main/java/org/andromda/test - New directory |
From: Vance K. <va...@us...> - 2007-04-12 14:50:57
|
User: vancek Date: 07/04/12 07:50:59 plugins/samples/booking-seam/core/src/main/java/org/andromda/test/hotelbooking - New directory |