[jboss-cvs] jboss-seam/examples/jpa/resources ...

Michael Yuan michael.yuan at jboss.com
Tue Jan 9 15:53:44 EST 2007


  User: myuan   
  Date: 07/01/09 15:53:44

  Modified:    examples/jpa/resources    components.xml import.sql
                        pages.xml
  Log:
  Update the app to the new booking example
  
  Revision  Changes    Path
  1.3       +1 -1      jboss-seam/examples/jpa/resources/components.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: components.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/jpa/resources/components.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- components.xml	12 Dec 2006 00:06:47 -0000	1.2
  +++ components.xml	9 Jan 2007 20:53:44 -0000	1.3
  @@ -8,7 +8,7 @@
   
       <core:init debug="true"/>    
   
  -    <core:pages no-conversation-view-id="/main.xhtml"/>
  +    <core:transactionListener/>
   
       <core:manager conversation-timeout="120000" 
                     concurrent-request-timeout="500"
  
  
  
  1.2       +20 -20    jboss-seam/examples/jpa/resources/import.sql
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: import.sql
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/jpa/resources/import.sql,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- import.sql	8 Nov 2006 09:38:58 -0000	1.1
  +++ import.sql	9 Jan 2007 20:53:44 -0000	1.2
  @@ -1,22 +1,22 @@
   insert into Customer (username, password, name) values ('gavin', 'foobar', 'Gavin King')
   insert into Customer (username, password, name) values ('demo', 'demo', 'Demo User')
  -insert into Hotel (id, name, address, city, state, zip, country) values (1, 'Marriott Courtyard', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA')
  -insert into Hotel (id, name, address, city, state, zip, country) values (2, 'Doubletree', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA')
  -insert into Hotel (id, name, address, city, state, zip, country) values (3, 'W Hotel', 'Union Square, Manhattan', 'NY', 'NY', '10011', 'USA')
  -insert into Hotel (id, name, address, city, state, zip, country) values (4, 'W Hotel', 'Lexington Ave, Manhattan', 'NY', 'NY', '10011', 'USA')
  -insert into Hotel (id, name, address, city, state, zip, country) values (5, 'Hotel Rouge', '1315 16th Street NW', 'Washington', 'DC', '20036', 'USA')
  -insert into Hotel (id, name, address, city, state, zip, country) values (6, '70 Park Avenue Hotel', '70 Park Avenue', 'NY', 'NY', '10011', 'USA')
  -insert into Hotel (id, name, address, city, state, zip, country) values (8, 'Conrad Miami', '1395 Brickell Ave', 'Miami', 'FL', '33131', 'USA')
  -insert into Hotel (id, name, address, city, state, zip, country) values (9, 'Sea Horse Inn', '2106 N Clairemont Ave', 'Eau Claire', 'WI', '54703', 'USA')
  -insert into Hotel (id, name, address, city, state, zip, country) values (10, 'Super 8 Eau Claire Campus Area', '1151 W Macarthur Ave', 'Eau Claire', 'WI', '54701', 'USA')
  -insert into Hotel (id, name, address, city, state, zip, country) values (11, 'Marriot Downtown', '55 Fourth Street', 'San Francisco', 'CA', '94103', 'USA')
  -insert into Hotel (id, name, address, city, state, zip, country) values (12, 'Hilton Diagonal Mar', 'Passeig del Taulat 262-264', 'Barcelona', 'Catalunya', '08019', 'Spain')
  -insert into Hotel (id, name, address, city, state, zip, country) values (13, 'Hilton Tel Aviv', 'Independence Park', 'Tel Aviv', '', '63405', 'Israel')
  -insert into Hotel (id, name, address, city, state, zip, country) values (14, 'InterContinental Tokyo Bay', 'Takeshiba Pier', 'Tokyo', '', '105', 'Japan')
  -insert into Hotel (id, name, address, city, state, zip, country) values (15, 'Hotel Beaulac', ' Esplanade Léopold-Robert 2', 'Neuchatel', '', '2000', 'Switzerland')
  -insert into Hotel (id, name, address, city, state, zip, country) values (16, 'Conrad Treasury Place', 'William & George Streets', 'Brisbane', 'QLD', '4001', 'Australia')
  -insert into Hotel (id, name, address, city, state, zip, country) values (17, 'Ritz Carlton', '1228 Sherbrooke St', 'West Montreal', 'Quebec', 'H3G1H6', 'Canada')
  -insert into Hotel (id, name, address, city, state, zip, country) values (18, 'Ritz Carlton', 'Peachtree Rd, Buckhead', 'Atlanta', 'GA', '30326', 'USA')
  -insert into Hotel (id, name, address, city, state, zip, country) values (19, 'Swissotel', '68 Market Street', 'Sydney', 'NSW', '2000', 'Australia')
  -insert into Hotel (id, name, address, city, state, zip, country) values (20, 'Meliá White House', 'Albany Street', 'Regents Park London', '', 'NW13UP', 'Great Britain')
  -insert into Hotel (id, name, address, city, state, zip, country) values (21, 'Hotel Allegro', '171 West Randolph Street', 'Chicago', 'IL', '60601', 'USA')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (1, 120, 'Marriott Courtyard', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (2, 180, 'Doubletree', 'Tower Place, Buckhead', 'Atlanta', 'GA', '30305', 'USA')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (3, 450, 'W Hotel', 'Union Square, Manhattan', 'NY', 'NY', '10011', 'USA')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (4, 450, 'W Hotel', 'Lexington Ave, Manhattan', 'NY', 'NY', '10011', 'USA')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (5, 250, 'Hotel Rouge', '1315 16th Street NW', 'Washington', 'DC', '20036', 'USA')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (6, 300, '70 Park Avenue Hotel', '70 Park Avenue', 'NY', 'NY', '10011', 'USA')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (8, 300, 'Conrad Miami', '1395 Brickell Ave', 'Miami', 'FL', '33131', 'USA')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (9, 80, 'Sea Horse Inn', '2106 N Clairemont Ave', 'Eau Claire', 'WI', '54703', 'USA')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (10, 90, 'Super 8 Eau Claire Campus Area', '1151 W Macarthur Ave', 'Eau Claire', 'WI', '54701', 'USA')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (11, 160, 'Marriot Downtown', '55 Fourth Street', 'San Francisco', 'CA', '94103', 'USA')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (12, 200, 'Hilton Diagonal Mar', 'Passeig del Taulat 262-264', 'Barcelona', 'Catalunya', '08019', 'Spain')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (13, 210, 'Hilton Tel Aviv', 'Independence Park', 'Tel Aviv', '', '63405', 'Israel')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (14, 240, 'InterContinental Tokyo Bay', 'Takeshiba Pier', 'Tokyo', '', '105', 'Japan')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (15, 130, 'Hotel Beaulac', ' Esplanade Léopold-Robert 2', 'Neuchatel', '', '2000', 'Switzerland')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (16, 140, 'Conrad Treasury Place', 'William & George Streets', 'Brisbane', 'QLD', '4001', 'Australia')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (17, 230, 'Ritz Carlton', '1228 Sherbrooke St', 'West Montreal', 'Quebec', 'H3G1H6', 'Canada')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (18, 460, 'Ritz Carlton', 'Peachtree Rd, Buckhead', 'Atlanta', 'GA', '30326', 'USA')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (19, 220, 'Swissotel', '68 Market Street', 'Sydney', 'NSW', '2000', 'Australia')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (20, 250, 'Meliá White House', 'Albany Street', 'Regents Park London', '', 'NW13UP', 'Great Britain')
  +insert into Hotel (id, price, name, address, city, state, zip, country) values (21, 210, 'Hotel Allegro', '171 West Randolph Street', 'Chicago', 'IL', '60601', 'USA')
  
  
  
  1.3       +98 -6     jboss-seam/examples/jpa/resources/pages.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: pages.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/jpa/resources/pages.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- pages.xml	10 Nov 2006 19:07:56 -0000	1.2
  +++ pages.xml	9 Jan 2007 20:53:44 -0000	1.3
  @@ -2,8 +2,100 @@
     "-//JBoss/Seam Pages Configuration DTD 1.1//EN"
     "http://jboss.com/products/seam/pages-1.1.dtd">
   
  -<pages>
  -	<page view-id="/hotel.xhtml">View hotel: #{hotel.name}</page>
  -	<page view-id="/book.xhtml">Book hotel: #{hotel.name}</page>
  -	<page view-id="/confirm.xhtml">Confirm: #{booking.description}</page>
  +<pages no-conversation-view-id="/main.xhtml">
  +
  +    <page view-id="/register.xhtml">
  +    
  +        <action if="#{validation.failed}"
  +           execute="#{register.invalid}"/>
  +    
  +        <navigation>
  +            <rule if="#{register.registered}">
  +                <redirect view-id="/home.xhtml"/>
  +            </rule>
  +        </navigation>
  +        
  +    </page>
  +
  +    <page view-id="/home.xhtml">
  +    
  +        <navigation>
  +            <rule if="#{login.loggedIn}">
  +                <redirect view-id="/main.xhtml"/>
  +            </rule>
  +        </navigation>
  +        
  +    </page>
  +    
  +    <page view-id="/password.xhtml">
  +    
  +        <navigation>
  +            <rule if="#{changePassword.changed}">
  +                <redirect view-id="/main.xhtml"/>
  +            </rule>
  +        </navigation>
  +        
  +    </page>
  +
  +    <page view-id="/main.xhtml">
  +    
  +        <action execute="#{login.validateLogin}"/>
  +        
  +        <navigation from-action="#{login.validateLogin}">
  +            <rule if="#{not login.loggedIn}">
  +                <redirect view-id="/home.xhtml"/>
  +            </rule>
  +        </navigation>
  +        
  +        <navigation from-action="#{hotelBooking.selectHotel(hot)}">
  +            <redirect view-id="/hotel.xhtml"/>
  +        </navigation>
  +        
  +    </page>
  +
  +	<page view-id="/hotel.xhtml" 
  +          conversation-required="true">
  +          
  +        <description>View hotel: #{hotel.name}</description>
  +        
  +        <navigation from-action="#{hotelBooking.bookHotel}">
  +            <redirect view-id="/book.xhtml"/>
  +        </navigation>
  +        
  +    </page>
  +
  +	<page view-id="/book.xhtml" 
  +          conversation-required="true">
  +          
  +        <description>Book hotel: #{hotel.name}</description>
  +        
  +        <navigation from-action="#{hotelBooking.setBookingDetails}">
  +            <redirect view-id="/confirm.xhtml"/>
  +        </navigation>
  +        
  +    </page>
  +
  +	<page view-id="/confirm.xhtml" 
  +          conversation-required="true">
  +          
  +        <description>Confirm booking: #{booking.description}</description>
  +        
  +        <navigation from-action="#{hotelBooking.confirm}">
  +            <redirect view-id="/main.xhtml"/>
  +        </navigation>
  +        
  +    </page>
  +    
  +    <page view-id="*">
  +    
  +        <navigation from-action="#{login.logout}">
  +            <redirect view-id="/home.xhtml"/>
  +        </navigation>
  +
  +        <navigation from-action="#{hotelBooking.cancel}">
  +            <redirect view-id="/main.xhtml"/>
  +        </navigation>
  +        
  +    </page>
  +
   </pages>
  \ No newline at end of file
  
  
  



More information about the jboss-cvs-commits mailing list