Seam SVN: r13254 - examples/trunk/booking-simplified.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2010-06-18 16:34:35 -0400 (Fri, 18 Jun 2010)
New Revision: 13254
Modified:
examples/trunk/booking-simplified/readme.txt
Log:
instructions
Modified: examples/trunk/booking-simplified/readme.txt
===================================================================
--- examples/trunk/booking-simplified/readme.txt 2010-06-18 20:34:06 UTC (rev 13253)
+++ examples/trunk/booking-simplified/readme.txt 2010-06-18 20:34:35 UTC (rev 13254)
@@ -1,5 +1,17 @@
-You will need to start JavaDB to make the application run
+JBoss AS
+--------
+You need the latest nightly build of JBoss AS 6.0.x to run this application on a JBoss AS instance:
+http://hudson.jboss.org/hudson/view/JBoss%20AS/job/JBoss-AS-6.0.x/lastSuccessfulBuild/artifact/JBossAS_6_0/build/target/jboss-6.0.x.zip
+
+You then need to copy the booking-ds.xml file to JBoss AS
+
+cp src/main/resources-jbossas/booking-ds.xml $JBOSS_HOME/server/default/deploy/
+
+GlassFish
+---------
+You will need to start JavaDB to make the application run on GlassFish
+
$GLASSFISH_HOME/bin/asadmin start-database
However, there should be an option with the GlassFish server plugin in both
13 years, 11 months
Seam SVN: r13253 - examples/trunk/booking-simplified/src/main/webapp/WEB-INF.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2010-06-18 16:34:06 -0400 (Fri, 18 Jun 2010)
New Revision: 13253
Modified:
examples/trunk/booking-simplified/src/main/webapp/WEB-INF/faces-config.xml
Log:
add validator ids for JBoss AS
Modified: examples/trunk/booking-simplified/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- examples/trunk/booking-simplified/src/main/webapp/WEB-INF/faces-config.xml 2010-06-18 19:06:00 UTC (rev 13252)
+++ examples/trunk/booking-simplified/src/main/webapp/WEB-INF/faces-config.xml 2010-06-18 20:34:06 UTC (rev 13253)
@@ -4,6 +4,22 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version="2.0">
+ <!-- Validator definitions required on JBoss AS because it fails to scan for annotations -->
+ <validator>
+ <validator-id>confirmPassword</validator-id>
+ <validator-class>org.jboss.seam.examples.booking.account.ConfirmPasswordValidator</validator-class>
+ </validator>
+
+ <validator>
+ <validator-id>currentPassword</validator-id>
+ <validator-class>org.jboss.seam.examples.booking.account.ConfirmPasswordValidator</validator-class>
+ </validator>
+
+ <validator>
+ <validator-id>reservationDateRange</validator-id>
+ <validator-class>org.jboss.seam.examples.booking.booking.ReservationDateRangeValidator</validator-class>
+ </validator>
+
<navigation-rule>
<from-view-id>*</from-view-id>
13 years, 11 months
Seam SVN: r13251 - examples/trunk/booking-simplified/src/main/webapp/WEB-INF.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2010-06-18 15:05:36 -0400 (Fri, 18 Jun 2010)
New Revision: 13251
Modified:
examples/trunk/booking-simplified/src/main/webapp/WEB-INF/beans.xml
Log:
formatting
Modified: examples/trunk/booking-simplified/src/main/webapp/WEB-INF/beans.xml
===================================================================
--- examples/trunk/booking-simplified/src/main/webapp/WEB-INF/beans.xml 2010-06-18 17:49:54 UTC (rev 13250)
+++ examples/trunk/booking-simplified/src/main/webapp/WEB-INF/beans.xml 2010-06-18 19:05:36 UTC (rev 13251)
@@ -10,5 +10,4 @@
<alternatives>
<class>org.jboss.seam.examples.booking.bootstrap.ApplicationInitializer</class>
</alternatives>
-
</beans>
13 years, 11 months
Seam SVN: r13250 - examples/trunk/booking-simplified.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2010-06-18 13:49:54 -0400 (Fri, 18 Jun 2010)
New Revision: 13250
Added:
examples/trunk/booking-simplified/features.txt
Log:
features
Added: examples/trunk/booking-simplified/features.txt
===================================================================
--- examples/trunk/booking-simplified/features.txt (rev 0)
+++ examples/trunk/booking-simplified/features.txt 2010-06-18 17:49:54 UTC (rev 13250)
@@ -0,0 +1,58 @@
+Booking Example Features
+
+This document is a list of features that the Seam booking example demonstrates, divided into core Java EE 6 features and Seam 3 (alpha) features.
+
+Java EE 6
+
+
+* No-interface session beans (EJBs) (BookingAgent.java, etc.)
+* Conversations (hotel.xhtml =» book.xhtml =» confirm.xhtml)
+* Extended Persistence Context (BookingAgent.java)
+* JPA Criteria Query (HotelSearch.java, BookingHistory.java)
+* Bean Validation on entity classes (User.java, Hotel.java, Booking.java)
+* Bean Validation on managed beans (Registrar.java, PasswordManager.java)
+* Bean Validation-powered JSF validations
+* Parameterized EL (search.xhtml, hotel.xhtml)
+
+* Reference data producers (CreditCardReferenceProducer.java, CalendarReferenceProducer.java)
+* List of entities producer (BookingHistory.java)
+* Named producer (AccountHolder.java)
+* Instance«T» (BookingHistory.java)
+* Events (BookingAgent.java)
+* After transaction success event observer (BookingHistory.java)
+* Bean alternative (ApplicationInitializer.java)
+* Enum entity field (persist an enum value)
+* Standardized Facelets
+* View metadata and declarative preRenderView JSF event (register.xhtml)
+* Conditional navigation (faces-config.xml)
+* Declarative Ajax behavior (register.xhtml, search.xhtml)
+* Ajax JavaScript callback (spinner) (search.xhtml)
+* Bookmarkable URL tags («h:link», «h:button») (account.xhtml, search.xhtml, etc.)
+* View parameters (hotel.xhtml)
+* Implicit navigation
+* Dynamic UISelect items from collection
+* Composite components (input.xhtml, output.xhtml, displayAccount.xhtml, displayHotel.xhtml)
+
+Weld Extensions
+
+ * @Veto to exclude entity classes as beans (User.java, Hotel.java, Booking.java)
+
+Seam 3
+
+ * Inter-component validator (cross-field validation) (register.xhtml, password.xhtml, book.xhtml)
+ * Cross-field validation with Ajax (register.xhtml)
+ * Validator/Converter @Inject and @*Scoped support - namely CurrentPasswordValidator
+
+ * View technology-agnostic status messages with i18n support (BookingAgent.java, etc.)
+ * MessagesAdaptor saving over redirects in the flash scope automatically
+ * @Begin and @End conversation-controls on the booking flow - @Begin on BookingAgent.selectHotel(), and @End on cancel() or confirm()
+ * UIInputContainer
+ * Wiring of label and message to input(s)
+ * Implicit required attribute
+ * Implicit invalid attribute
+ * Automatic Ajax behavior for real-time validation
+ * Conversation name alias (conversation) (confirm.xhtml, template.xhtml)
+ * View action (hotel.xhtml)
+ * URL-rewriting on all pages with PrettyFaces - automatically replaces outbound link URLs and redirects with correct "pretty/parameterized" URL.
+ * Relative timestamps with PrettyTime - when a booking is confirmed, displays time until check-in.
+ * JSF system event to CDI event bridge (ApplicationInitializer.java)
13 years, 11 months
Seam SVN: r13249 - examples/trunk/booking-simplified/src/main/resources/META-INF.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-06-18 11:39:44 -0400 (Fri, 18 Jun 2010)
New Revision: 13249
Modified:
examples/trunk/booking-simplified/src/main/resources/META-INF/persistence.xml
Log:
Enable JBoss AS DS by default
Modified: examples/trunk/booking-simplified/src/main/resources/META-INF/persistence.xml
===================================================================
--- examples/trunk/booking-simplified/src/main/resources/META-INF/persistence.xml 2010-06-18 14:37:27 UTC (rev 13248)
+++ examples/trunk/booking-simplified/src/main/resources/META-INF/persistence.xml 2010-06-18 15:39:44 UTC (rev 13249)
@@ -6,11 +6,9 @@
<persistence-unit name="booking">
<!--<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>-->
<provider>org.hibernate.ejb.HibernatePersistence</provider>
- <jta-data-source>jdbc/__default</jta-data-source>
- <!--
+ <!--<jta-data-source>jdbc/__default</jta-data-source>-->
<jta-data-source>java:/DefaultDS</jta-data-source>
- <jta-data-source>jdbc/__arquillian</jta-data-source>
- -->
+ <!--<jta-data-source>jdbc/__arquillian</jta-data-source>-->
<properties>
<!-- Properties for Hibernate (default provider for JBoss AS) -->
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
13 years, 11 months
Seam SVN: r13248 - tags.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2010-06-18 10:37:27 -0400 (Fri, 18 Jun 2010)
New Revision: 13248
Added:
tags/JBPAPP_5_1_0-CR1/
Log:
tagged Seam 2.2.2.EAP5 for EAP 5.0.1.CR1
Copied: tags/JBPAPP_5_1_0-CR1 (from rev 13247, branches/enterprise/JBPAPP_5_0)
13 years, 11 months
Seam SVN: r13247 - branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium.
by seam-commits@lists.jboss.org
Author: mgencur(a)redhat.com
Date: 2010-06-18 09:27:31 -0400 (Fri, 18 Jun 2010)
New Revision: 13247
Modified:
branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java
Log:
JBSEAM-4645, minor change
Modified: branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java
===================================================================
--- branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java 2010-06-18 13:25:03 UTC (rev 13246)
+++ branches/community/Seam_2_2/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java 2010-06-18 13:27:31 UTC (rev 13247)
@@ -101,7 +101,7 @@
public void login(String username, String password)
{
- browser.waitForPageToLoad(TIMEOUT);
+ //browser.waitForPageToLoad(TIMEOUT);
browser.type(getProperty("LOGIN_USERNAME_FIELD"), username);
browser.type(getProperty("LOGIN_PASSWORD_FIELD"), password);
browser.click(getProperty("LOGIN_SUBMIT"));
13 years, 11 months
Seam SVN: r13246 - branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium.
by seam-commits@lists.jboss.org
Author: mgencur(a)redhat.com
Date: 2010-06-18 09:25:03 -0400 (Fri, 18 Jun 2010)
New Revision: 13246
Modified:
branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java
Log:
JBPAPP-4500, minor change
Modified: branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java
===================================================================
--- branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java 2010-06-18 13:16:08 UTC (rev 13245)
+++ branches/enterprise/JBPAPP_5_0/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java 2010-06-18 13:25:03 UTC (rev 13246)
@@ -101,7 +101,7 @@
public void login(String username, String password)
{
- browser.waitForPageToLoad(TIMEOUT);
+ //browser.waitForPageToLoad(TIMEOUT);
browser.type(getProperty("LOGIN_USERNAME_FIELD"), username);
browser.type(getProperty("LOGIN_PASSWORD_FIELD"), password);
browser.click(getProperty("LOGIN_SUBMIT"));
13 years, 11 months
Seam SVN: r13245 - in branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking: src/org/jboss/seam/example/nestedbooking/test/selenium and 1 other directory.
by seam-commits@lists.jboss.org
Author: mgencur(a)redhat.com
Date: 2010-06-18 09:16:08 -0400 (Fri, 18 Jun 2010)
New Revision: 13245
Added:
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java
Modified:
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties
Log:
backporting functional test for nested conversations of nested booking example
Modified: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/jboss.xml 2010-06-18 12:45:50 UTC (rev 13244)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/jboss.xml 2010-06-18 13:16:08 UTC (rev 13245)
@@ -30,7 +30,8 @@
<class
name="org.jboss.seam.example.common.test.booking.selenium.ChangePasswordTest" />
<class name="org.jboss.seam.example.common.test.booking.selenium.BackButtonTest" />
- <class name="org.jboss.seam.example.nestedbooking.test.selenium.NestedSimpleBookingTest"></class>
+ <class name="org.jboss.seam.example.nestedbooking.test.selenium.NestedSimpleBookingTest" />
+ <class name="org.jboss.seam.example.nestedbooking.test.selenium.NestedConversationTest" />
</classes>
</test>
</suite>
\ No newline at end of file
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedConversationTest.java 2010-06-18 13:16:08 UTC (rev 13245)
@@ -0,0 +1,121 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.seam.example.nestedbooking.test.selenium;
+
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.fail;
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.jboss.seam.example.common.test.selenium.SeamSelenium;
+import org.jboss.seam.example.common.test.booking.selenium.SeleniumBookingTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * This class tests only nested conversations
+ *
+ * @author mgencur
+ */
+public class NestedConversationTest extends SeamSeleniumTest
+{
+
+ protected final int timeout = 5000;
+ protected final String CREDIT_CARD = "0123456789012345";
+ protected final String CREDIT_CARD_NAME = "visa";
+
+ @BeforeMethod
+ public void setUp()
+ {
+ super.setUp();
+ }
+
+ @AfterMethod
+ public void tearDown()
+ {
+ super.tearDown();
+ }
+
+ @Test
+ public void nestedConversationTest()
+ {
+ browser.open(CONTEXT_PATH + getProperty("MAIN_PAGE"));
+ pause(timeout);
+ browser.openWindow(CONTEXT_PATH + getProperty("MAIN_PAGE"), "0");
+ pause(timeout);
+ browser.selectWindow("0");
+ login("demo", "demo");
+ SeleniumBookingTest t = new SeleniumBookingTest();
+ t.enterSearchQuery("W Hotel");
+ browser.click(getProperty("SEARCH_RESULT_TABLE_SECOND_ROW_LINK"));
+ pause(timeout);
+
+ //open the url in a second window
+ String url = browser.getLocation();
+ browser.openWindow(url, "1");
+
+ //go next to confirm button in browser 1
+ browser.selectWindow("0");
+ browser.clickAndWait(getProperty("BOOKING_BOOK"));
+ browser.clickAndWait(getProperty("SELECT_ROOM_BUTTON"));
+ browser.clickAndWait(getProperty("SELECT_WONDERFUL_ROOM"));
+ browser.type(getProperty("PAYMENT_CREDIT_CARD"), CREDIT_CARD);
+ browser.type(getProperty("PAYMENT_CREDIT_CARD_NAME"), CREDIT_CARD_NAME);
+ browser.click(getProperty("PAYMENT_PROCEED"));
+
+ //go next to confirm button in browser 2
+ browser.selectWindow("1");
+ browser.clickAndWait(getProperty("BOOKING_BOOK"));
+ browser.clickAndWait(getProperty("SELECT_ROOM_BUTTON"));
+ browser.clickAndWait(getProperty("SELECT_FANTASTIC_ROOM"));
+ browser.type(getProperty("PAYMENT_CREDIT_CARD"), CREDIT_CARD);
+ browser.type(getProperty("PAYMENT_CREDIT_CARD_NAME"), CREDIT_CARD_NAME);
+ browser.click(getProperty("PAYMENT_PROCEED"));
+
+ //confirm in browser 1 (WONDERFUL room should be selected)
+ browser.selectWindow("0");
+ browser.clickAndWait(getProperty("CONFIRM_CONFIRM"));
+
+ assertTrue(browser.isTextPresent("$450.00") && browser.isTextPresent("Wonderful Room"));
+ assertFalse(browser.isTextPresent("$1,000.00") || browser.isTextPresent("Fantastic Suite"));
+ }
+
+ public void login(String username, String password)
+ {
+ //browser.waitForPageToLoad(TIMEOUT);
+ browser.type(getProperty("LOGIN_USERNAME_FIELD"), username);
+ browser.type(getProperty("LOGIN_PASSWORD_FIELD"), password);
+ browser.click(getProperty("LOGIN_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ private void pause(int millis)
+ {
+ try
+ {
+ Thread.sleep(millis);
+ }
+ catch (InterruptedException e)
+ {
+ }
+ }
+}
Modified: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties 2010-06-18 12:45:50 UTC (rev 13244)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties 2010-06-18 13:16:08 UTC (rev 13245)
@@ -39,6 +39,7 @@
NO_HOTELS_FOUND id=NoHotelsFoundMessage
SEARCH_RESULT_TABLE xpath=//table[@id = 'hotels']/tbody
SEARCH_RESULT_TABLE_FIRST_ROW_LINK id=hotels:0:viewHotel
+SEARCH_RESULT_TABLE_SECOND_ROW_LINK id=hotels:1:viewHotel
BOOKING_BOOK id=hotel:bookHotel
BOOKING_CANCEL id=hotel:cancel
BOOKING_SELECT_ROOM id=booking:room_preference
@@ -84,4 +85,8 @@
WORKSPACE_VIEW_TEXT View hotel: {0}
WORKSPACE_TABLE_LINK_BY_ID id=ConversationListForm:ConversationListDataTable:{0}:EntryDescriptionLink
WORKSPACE_TABLE_ROW_COUNT = //table[@id\='ConversationListForm\:ConversationListDataTable']/tbody/tr
-SPINNER id\=main\:SpinnerGif
\ No newline at end of file
+SPINNER id\=main\:SpinnerGif
+SELECT_ROOM_BUTTON id=booking:room_preference
+SELECT_WONDERFUL_ROOM id=room_selections_form:rooms:0:selectRoomPreference
+SELECT_FANTASTIC_ROOM id=room_selections_form:rooms:2:selectRoomPreference
+
13 years, 11 months