Seam SVN: r14530 - in branches/community/Seam_2_3/examples-ee6: blog/blog-ejb/src/main/resources/META-INF and 1 other directories.
by seam-commits@lists.jboss.org
Author: dhinojosa
Date: 2012-04-06 03:05:18 -0400 (Fri, 06 Apr 2012)
New Revision: 14530
Added:
branches/community/Seam_2_3/examples-ee6/update_process.txt
Modified:
branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/resources/META-INF/persistence.xml
branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/WEB-INF/components.xml
Log:
added update_process.txt
Modified: branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/resources/META-INF/persistence.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/resources/META-INF/persistence.xml 2012-04-06 05:03:10 UTC (rev 14529)
+++ branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/resources/META-INF/persistence.xml 2012-04-06 07:05:18 UTC (rev 14530)
@@ -5,15 +5,15 @@
version="1.0">
<persistence-unit name="entityManager">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
- <non-jta-data-source>java:jboss/datasources/ExampleDS</non-jta-data-source>
+ <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.show_sql" value="true"/>
- <property name="hibernate.cache.use_second_level_cache" value="true"/>
- <property name="hibernate.cache.use_query_cache" value="true"/>
+ <!--<property name="hibernate.cache.use_second_level_cache" value="true"/>-->
+ <!--<property name="hibernate.cache.use_query_cache" value="true"/>-->
<property name="jboss.entity.manager.factory.jndi.name" value="java:/blogEntityManagerFactory"/>
- <property name="hibernate.jdbc.charSet" value="utf-8"/>
+ <!--<property name="hibernate.jdbc.charSet" value="utf-8"/>-->
<!-- use a file system based index -->
<property name="hibernate.search.default.directory_provider" value="filesystem"/>
Modified: branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/WEB-INF/components.xml 2012-04-06 05:03:10 UTC (rev 14529)
+++ branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/WEB-INF/components.xml 2012-04-06 07:05:18 UTC (rev 14530)
@@ -5,10 +5,10 @@
xmlns:security="http://jboss.com/products/seam/security"
xmlns:theme="http://jboss.com/products/seam/theme"
xmlns:cache="http://jboss.com/products/seam/cache"
- xmlns:web="http://jboss.com/products/seam/web"
+ xmlns:web="http://jboss.com/products/seam/web"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
- "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.3.xsd
+ "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.3.xsd
http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.3.xsd
http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.3.xsd
http://jboss.com/products/seam/theme http://jboss.com/products/seam/theme-2.3.xsd
@@ -16,24 +16,25 @@
http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.3.xsd
http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.3.xsd">
- <core:init debug="true"/>
-
- <web:rewrite-filter view-mapping="/seam/*" />
+ <core:init debug="true" jndi-pattern="@jndiPattern@"/>
- <security:identity authenticate-method="#{authenticator.authenticate}"/>
-
- <theme:theme-selector>
- <theme:available-themes>
- <value>default</value>
- <value>accessible</value>
- <value>printable</value>
- </theme:available-themes>
- </theme:theme-selector>
-
- <persistence:managed-persistence-context auto-create="true" name="entityManager">
- <persistence:persistence-unit-jndi-name>java:/blogEntityManagerFactory</persistence:persistence-unit-jndi-name>
- </persistence:managed-persistence-context>
+ <web:rewrite-filter view-mapping="/seam/*"/>
- <cache:eh-cache-provider/>
+ <security:identity authenticate-method="#{authenticator.authenticate}"/>
+ <theme:theme-selector>
+ <theme:available-themes>
+ <value>default</value>
+ <value>accessible</value>
+ <value>printable</value>
+ </theme:available-themes>
+ </theme:theme-selector>
+
+ <cache:eh-cache-provider/>
+
+ <persistence:managed-persistence-context name="entityManager"
+ auto-create="true"
+ persistence-unit-jndi-name="java:/blogEntityManagerFactory"/>
+
+
</components>
Added: branches/community/Seam_2_3/examples-ee6/update_process.txt
===================================================================
--- branches/community/Seam_2_3/examples-ee6/update_process.txt (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/update_process.txt 2012-04-06 07:05:18 UTC (rev 14530)
@@ -0,0 +1,215 @@
+In each test class
+==================
+Add @RunWith(Arquillian.class) annotation to the class
+import org.jboss.arquillian.junit.Arquillian;
+extends JUnitSeamTest
+Change all @Test annotation from TestNG to JUnit
+
+Add the method:
+ @Deployment(name="<project>Test")
+ @OverProtocol("Servlet 3.0")
+ public static Archive<?> createDeployment()
+ {
+ EnterpriseArchive er = Deployments.<project>Deployment();
+ WebArchive web = er.getAsType(WebArchive.class, "<project>-web.war");
+
+ web.addClasses(<testName>.class);
+
+ return er;
+ }
+
+
+In source folder of *-tests
+===========================
+Create a Deployments class with the content:
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.importer.ZipImporter;
+import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
+
+import java.io.File;
+
+public class Deployments {
+ public static EnterpriseArchive <project>Deployment() {
+ return ShrinkWrap.create(ZipImporter.class, "seam-<project>.ear").importFrom(new File("../<project>-ear/target/seam-<project>.ear"))
+ .as(EnterpriseArchive.class);
+ }
+}
+
+
+Arquillian.xml
+==============
+Add arquillian.xml in folder resource-integration. Contents of arquillian.xml:
+
+<?xml version="1.0" encoding="UTF-8"?>
+<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://jboss.org/schema/arquillian"
+ xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
+
+ <engine>
+ <property name="deploymentExportPath">target/</property>
+ </engine>
+
+ <container qualifier="jboss" default="true">
+ <configuration>
+ <property name="javaVmArguments">-Xmx1024m -XX:MaxPermSize=512m</property>
+ <property name="jbossHome">target/jboss-as-${version.jbossas7}</property>
+ </configuration>
+ </container>
+</arquillian>
+
+
+
+
+In *-tests.pom
+===============
+add hibernate-validator
+<example.context.path>seam-<module-name></example.context.path>
+
+
+plugins should be:
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>selenium-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>failsafe-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+
+
+
+In faces-config.xml
+===================
+
+Remove:
+ <!-- Facelets support -->
+ <application>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ </application>
+
+Upgrade version to 2.1
+
+In jboss-deployment-structure.xml
+=================================
+Remove exclusion
+Remove slot attributes
+Include <module name="org.antlr" export="true"/>
+
+In web.xml
+==========
+Migrate version from 2.5 to 3.0
+
+In all xhtml pages
+===================
+Convert
+ <head><body>and<html> tags to <h:head><h:body>and<h:html>
+ with <(/?)head> <$1h:head>
+ with <(/?)body> <$1h:body>
+ with <(/?)html> <$1h:html>
+
+
+
+in persistence.xml
+change from <non-jta-data-source>java:/DefaultDS</non-jta-data-source> to <non-jta-data-source>java:jboss/datasources/ExampleDS</non-jta-data-source>
+
+in *-web.pom
+============
+
+ <jndiPattern>([^/]*)?/\#\{ejbName\}/local</jndiPattern>
+ replace with <jndiPattern>java:app/$1/#{ejbName}</jndiPattern>
+ go from: seam-mail/#{ejbName}/local
+ <jndiPattern>java:app/seam-mail-ejb/#{ejbName}</jndiPattern>
+
+ remove:
+ <exclusions>
+ <exclusion>
+ <groupId>com.thoughtworks.xstream</groupId>
+ <artifactId>xstream</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xpp3</groupId>
+ <artifactId>xpp3_min</artifactId>
+ </exclusion>
+ </exclusions>
+
+add:
+ <dependency>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+add the rest as:
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.el</groupId>
+ <artifactId>jboss-el</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.faces</groupId>
+ <artifactId>jboss-jsf-api_2.0_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ Get rid of <activation> on <id>jbossas51</id>
+
+ remove maven dependency plugin
+ <!--<plugin>-->
+ <!--<groupId>org.apache.maven.plugins</groupId>-->
+ <!--<artifactId>maven-dependency-plugin</artifactId>-->
+ <!--<executions>-->
+ <!--<execution>-->
+ <!--<id>unpack</id>-->
+ <!--<phase>package</phase>-->
+ <!--<goals>-->
+ <!--<goal>unpack</goal>-->
+ <!--</goals>-->
+ <!--<configuration>-->
+ <!--<artifactItems>-->
+ <!--<artifactItem>-->
+ <!--<groupId>org.jboss.seam.examples</groupId>-->
+ <!--<artifactId>groovybooking-web</artifactId>-->
+ <!--<type>war</type>-->
+ <!--<overWrite>true</overWrite>-->
+ <!--<outputDirectory>${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.war</outputDirectory>-->
+ <!--</artifactItem>-->
+ <!--</artifactItems>-->
+ <!--</configuration>-->
+ <!--</execution>-->
+ <!--</executions>-->
+ <!--</plugin>-->
+
+In *-ejb.pom
+===========
+All hibernate dependencies will need to be listed as 'provided'
+
12 years
[forge/core] ebe97a: Tests for the issue
by GitHub
Branch: refs/heads/master
Home: https://github.com/forge/core
Commit: ebe97a8c57f2decd0ed53211e86155c5a847cdf6
https://github.com/forge/core/commit/ebe97a8c57f2decd0ed53211e86155c5a847...
Author: LightGuard <lightguard.jp(a)gmail.com>
Date: 2012-04-05 (Thu, 05 Apr 2012)
Changed paths:
M project-model-maven-tests/src/test/java/org/jboss/forge/maven/facets/MavenDependencyFacetTest.java
M shell/src/test/java/org/jboss/forge/shell/test/plugins/builtin/ProjectPluginTest.java
Log Message:
-----------
Tests for the issue
Commit: 9c4bdb8a26edfb1c0e45c03482a829c4434947b4
https://github.com/forge/core/commit/9c4bdb8a26edfb1c0e45c03482a829c44349...
Author: LightGuard <lightguard.jp(a)gmail.com>
Date: 2012-04-05 (Thu, 05 Apr 2012)
Changed paths:
M project-model-maven/src/main/java/org/jboss/forge/maven/facets/MavenDependencyFacet.java
M shell-api/src/main/java/org/jboss/forge/project/dependencies/DependencyImpl.java
M shell/src/main/java/org/jboss/forge/shell/plugins/builtin/project/ProjectPlugin.java
M shell/src/main/java/org/jboss/forge/shell/project/DependencyInstallerImpl.java
M shell/src/test/java/org/jboss/forge/shell/test/plugins/builtin/ProjectPluginTest.java
Log Message:
-----------
Implementing FORGE-525
Commit: 2687b74235ccada072ade0c989c8b7b9b8ae8ebf
https://github.com/forge/core/commit/2687b74235ccada072ade0c989c8b7b9b8ae...
Author: LightGuard <lightguard.jp(a)gmail.com>
Date: 2012-04-05 (Thu, 05 Apr 2012)
Changed paths:
M shell/src/main/java/org/jboss/forge/shell/plugins/builtin/project/ProjectPlugin.java
Log Message:
-----------
Removing code I had commented out
Commit: d85e46c17a09c113b7a41178b7367ef3e3c4adfa
https://github.com/forge/core/commit/d85e46c17a09c113b7a41178b7367ef3e3c4...
Author: LightGuard <lightguard.jp(a)gmail.com>
Date: 2012-04-05 (Thu, 05 Apr 2012)
Changed paths:
M shell/src/main/java/org/jboss/forge/shell/project/DependencyInstallerImpl.java
Log Message:
-----------
Oops, one more
Commit: dfac04b7fed04c95f5808beb56ac2a676c05626d
https://github.com/forge/core/commit/dfac04b7fed04c95f5808beb56ac2a676c05...
Author: Lincoln Baxter, III <lincolnbaxter(a)gmail.com>
Date: 2012-04-05 (Thu, 05 Apr 2012)
Changed paths:
M project-model-maven-tests/src/test/java/org/jboss/forge/maven/facets/MavenDependencyFacetTest.java
M project-model-maven/src/main/java/org/jboss/forge/maven/facets/MavenDependencyFacet.java
M shell-api/src/main/java/org/jboss/forge/project/dependencies/DependencyImpl.java
M shell/src/main/java/org/jboss/forge/shell/plugins/builtin/project/ProjectPlugin.java
M shell/src/main/java/org/jboss/forge/shell/project/DependencyInstallerImpl.java
M shell/src/test/java/org/jboss/forge/shell/test/plugins/builtin/ProjectPluginTest.java
Log Message:
-----------
Merge pull request #136 from LightGuard/FORGE-525
FORGE-525
Compare: https://github.com/forge/core/compare/c896fff...dfac04b
12 years
Seam SVN: r14529 - in branches/community/Seam_2_3/examples-ee6/contactlist: contactlist-ear/src and 11 other directories.
by seam-commits@lists.jboss.org
Author: dhinojosa
Date: 2012-04-06 01:03:10 -0400 (Fri, 06 Apr 2012)
New Revision: 14529
Added:
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-ear/src/
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-ear/src/main/
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-ear/src/main/application/
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-ear/src/main/application/META-INF/
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-ear/src/main/application/META-INF/jboss-deployment-structure.xml
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-tests/src/test/java/org/jboss/seam/example/contactlist/test/Deployments.java
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-tests/src/test/resources-integration/arquillian.xml
Modified:
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-ejb/pom.xml
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-ejb/src/main/resources/META-INF/persistence.xml
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-tests/pom.xml
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-tests/src/test/java/org/jboss/seam/example/contactlist/test/ContactListTest.java
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/pom.xml
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/WEB-INF/faces-config.xml
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/WEB-INF/web.xml
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/editContact.xhtml
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/search.xhtml
branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/viewContact.xhtml
Log:
updated files to work with arquillian
Added: branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-ear/src/main/application/META-INF/jboss-deployment-structure.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-ear/src/main/application/META-INF/jboss-deployment-structure.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-ear/src/main/application/META-INF/jboss-deployment-structure.xml 2012-04-06 05:03:10 UTC (rev 14529)
@@ -0,0 +1,14 @@
+<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
+ <deployment>
+ <dependencies>
+ <module name="org.apache.log4j" export="true"/>
+ <module name="org.javassist" export="true"/>
+ <module name="org.hibernate" export="true"/>
+ <module name="org.dom4j" export="true"/>
+ <module name="org.apache.commons.logging" export="true"/>
+ <module name="org.apache.commons.collections" export="true"/>
+ <module name="javax.faces.api" export="true"/>
+ <module name="com.sun.jsf-impl" export="true"/>
+ </dependencies>
+ </deployment>
+</jboss-deployment-structure>
Modified: branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-ejb/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-ejb/pom.xml 2012-04-05 22:00:26 UTC (rev 14528)
+++ branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-ejb/pom.xml 2012-04-06 05:03:10 UTC (rev 14529)
@@ -19,23 +19,25 @@
<artifactId>jboss-seam</artifactId>
<type>ejb</type>
</dependency>
+ <dependency>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- </dependency>
- <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
- <dependency>
- <groupId>javax.ejb</groupId>
- <artifactId>ejb-api</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <version>2.1</version>
- </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.ejb</groupId>
+ <artifactId>jboss-ejb-api_3.1_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.faces</groupId>
+ <artifactId>jboss-jsf-api_2.0_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</project>
Modified: branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-ejb/src/main/resources/META-INF/persistence.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-ejb/src/main/resources/META-INF/persistence.xml 2012-04-05 22:00:26 UTC (rev 14528)
+++ branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-ejb/src/main/resources/META-INF/persistence.xml 2012-04-06 05:03:10 UTC (rev 14529)
@@ -5,7 +5,7 @@
version="1.0">
<persistence-unit name="userDatabase" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
- <jta-data-source>java:/DefaultDS</jta-data-source>
+ <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.show_sql" value="true"/>
Modified: branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-tests/pom.xml 2012-04-05 22:00:26 UTC (rev 14528)
+++ branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-tests/pom.xml 2012-04-06 05:03:10 UTC (rev 14529)
@@ -14,29 +14,36 @@
<name>Contact List Integration Tests Module (EE6)</name>
<dependencies>
+
<dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <classifier>jdk15</classifier>
- </dependency>
- <dependency>
<groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>contactlist-ejb</artifactId>
<type>ejb</type>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
- <type>ejb</type>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.sun.faces</groupId>
- <artifactId>jsf-api</artifactId>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.spec.javax.faces</groupId>
+ <artifactId>jboss-jsf-api_2.0_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.seleniumhq.selenium.server</groupId>
<artifactId>selenium-server</artifactId>
<classifier>standalone</classifier>
@@ -50,6 +57,7 @@
<artifactId>functional-tests</artifactId>
<scope>test</scope>
</dependency>
+
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -68,6 +76,35 @@
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.jboss.shrinkwrap.resolver</groupId>
+ <artifactId>shrinkwrap-resolver-api-maven</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.shrinkwrap.resolver</groupId>
+ <artifactId>shrinkwrap-resolver-impl-maven</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.el</groupId>
+ <artifactId>jboss-el-api_2.2_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<build>
@@ -82,11 +119,16 @@
</testResources>
<plugins>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>selenium-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>failsafe-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
+ <artifactId>maven-antrun-plugin</artifactId>
</plugin>
</plugins>
</build>
@@ -165,7 +207,7 @@
<profile>
<id>ftest-tomcat</id>
<properties>
- <example.context.path>jboss-seam-contactlist</example.context.path>
+ <example.context.path>seam-contactlist</example.context.path>
</properties>
<build>
<plugins>
Modified: branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-tests/src/test/java/org/jboss/seam/example/contactlist/test/ContactListTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-tests/src/test/java/org/jboss/seam/example/contactlist/test/ContactListTest.java 2012-04-05 22:00:26 UTC (rev 14528)
+++ branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-tests/src/test/java/org/jboss/seam/example/contactlist/test/ContactListTest.java 2012-04-06 05:03:10 UTC (rev 14529)
@@ -2,12 +2,33 @@
import java.util.List;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OverProtocol;
+import org.jboss.arquillian.junit.Arquillian;
import org.jboss.seam.example.contactlist.Contact;
-import org.jboss.seam.mock.SeamTest;
-import org.testng.annotations.Test;
+import org.jboss.seam.mock.JUnitSeamTest;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
-public class ContactListTest extends SeamTest
+(a)RunWith(Arquillian.class)
+public class ContactListTest extends JUnitSeamTest
{
+
+ @Deployment(name="<project>Test")
+ @OverProtocol("Servlet 3.0")
+ public static Archive<?> createDeployment()
+ {
+ EnterpriseArchive er = Deployments.contactListDeployment();
+ WebArchive web = er.getAsType(WebArchive.class, "contactlist-web.war");
+
+ web.addClasses(ContactListTest.class);
+
+ return er;
+ }
+
@Test
public void testList() throws Exception
{
@@ -55,6 +76,7 @@
protected void renderResponse() throws Exception
{
List<Contact> contacts = (List<Contact>) getValue("#{contacts.resultList}");
+ System.out.println(contacts.size());
assert contacts.size()==1;
}
}.run();
Added: branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-tests/src/test/java/org/jboss/seam/example/contactlist/test/Deployments.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-tests/src/test/java/org/jboss/seam/example/contactlist/test/Deployments.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-tests/src/test/java/org/jboss/seam/example/contactlist/test/Deployments.java 2012-04-06 05:03:10 UTC (rev 14529)
@@ -0,0 +1,14 @@
+package org.jboss.seam.example.contactlist.test;
+
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.importer.ZipImporter;
+import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
+
+import java.io.File;
+
+public class Deployments {
+ public static EnterpriseArchive contactListDeployment() {
+ return ShrinkWrap.create(ZipImporter.class, "seam-contactlist.ear").importFrom(new File("../contactlist-ear/target/seam-contactlist.ear"))
+ .as(EnterpriseArchive.class);
+ }
+}
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-tests/src/test/resources-integration/arquillian.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-tests/src/test/resources-integration/arquillian.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-tests/src/test/resources-integration/arquillian.xml 2012-04-06 05:03:10 UTC (rev 14529)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://jboss.org/schema/arquillian"
+ xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
+
+ <engine>
+ <property name="deploymentExportPath">target/</property>
+ </engine>
+
+ <container qualifier="jboss" default="true">
+ <configuration>
+ <property name="javaVmArguments">-Xmx1024m -XX:MaxPermSize=512m</property>
+ <property name="jbossHome">target/jboss-as-${version.jbossas7}</property>
+ </configuration>
+ </container>
+</arquillian>
\ No newline at end of file
Modified: branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/pom.xml 2012-04-05 22:00:26 UTC (rev 14528)
+++ branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/pom.xml 2012-04-06 05:03:10 UTC (rev 14529)
@@ -26,40 +26,52 @@
<type>ejb</type>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
- <type>ejb</type>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam-ui</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam-jul</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- <exclusions>
- <exclusion>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- <version>1.1.15</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <type>ejb</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-ui</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-jul</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.el</groupId>
+ <artifactId>jboss-el</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.faces</groupId>
+ <artifactId>jboss-jsf-api_2.0_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<build>
Modified: branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/WEB-INF/faces-config.xml 2012-04-05 22:00:26 UTC (rev 14528)
+++ branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/WEB-INF/faces-config.xml 2012-04-06 05:03:10 UTC (rev 14529)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<faces-config version="1.2"
+<faces-config version="2.1"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd">
Modified: branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/WEB-INF/web.xml 2012-04-05 22:00:26 UTC (rev 14528)
+++ branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/WEB-INF/web.xml 2012-04-06 05:03:10 UTC (rev 14529)
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.5"
+<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name>Seam Contact List Example</display-name>
Modified: branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/editContact.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/editContact.xhtml 2012-04-05 22:00:26 UTC (rev 14528)
+++ branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/editContact.xhtml 2012-04-06 05:03:10 UTC (rev 14529)
@@ -1,16 +1,16 @@
<!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"
+<h: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"
template="template.xhtml">
- <head>
+ <h:head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Edit Contact</title>
<link href="screen.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
+ </h:head>
+ <h:body>
<div class="menuButtons">
<s:link id="search" view="/search.xhtml" value="Search Contacts"/>
@@ -116,5 +116,5 @@
</div>
- </body>
-</html>
+ </h:body>
+</h:html>
Modified: branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/search.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/search.xhtml 2012-04-05 22:00:26 UTC (rev 14528)
+++ branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/search.xhtml 2012-04-06 05:03:10 UTC (rev 14529)
@@ -1,15 +1,15 @@
<!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"
+<h: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>
+ <h:head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Contact List</title>
<link href="screen.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
+ </h:head>
+ <h:body>
<div class="menuButtons">
<s:link id="search" view="/search.xhtml" value="Search Contacts">
@@ -100,5 +100,5 @@
</div>
- </body>
-</html>
+ </h:body>
+</h:html>
Modified: branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/viewContact.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/viewContact.xhtml 2012-04-05 22:00:26 UTC (rev 14528)
+++ branches/community/Seam_2_3/examples-ee6/contactlist/contactlist-web/src/main/webapp/viewContact.xhtml 2012-04-06 05:03:10 UTC (rev 14529)
@@ -1,16 +1,16 @@
<!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"
+<h: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"
template="template.xhtml">
- <head>
+ <h:head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>View Contact</title>
<link href="screen.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
+ </h:head>
+ <h:body>
<div class="menuButtons">
<s:link id="search" view="/search.xhtml" value="Search Contacts"/>
@@ -122,5 +122,5 @@
</div>
- </body>
-</html>
+ </h:body>
+</h:html>
12 years
Seam SVN: r14528 - in branches/community/Seam_2_3/examples-ee6: seamdiscs and 49 other directories.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-04-05 18:00:26 -0400 (Thu, 05 Apr 2012)
New Revision: 14528
Added:
branches/community/Seam_2_3/examples-ee6/seamdiscs/
branches/community/Seam_2_3/examples-ee6/seamdiscs/pom.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/readme.txt
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ear/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ear/pom.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ear/src/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ear/src/main/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/jboss-deployment-structure.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/jboss-seam-seambay-ds.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/pom.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/ArtistHome.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/ArtistHomeImpl.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/Authenticator.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/BandMemberFinder.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/Artist.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/Band.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/BandMember.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/Disc.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/User.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/EntityCollectionModel.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/EntityKeyManager.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/HibernateEntityCollectionModel.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/HibernateEntityKeyManager.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/SeamCollectionModel.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/TrinidadDataModels.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/resources/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/resources/META-INF/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/resources/META-INF/ejb-jar.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/resources/META-INF/persistence.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/resources/import.sql
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/resources/seam.properties
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/pom.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/DisplayArtistTest.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/DisplayDiscTest.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/EditArtistTest.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/EditDiscTest.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/LoginTest.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/TestStrings.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/selenium/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/selenium/ArtistsTest.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/selenium/DiscsTest.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/selenium/SeleniumSeamDiscsTest.java
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-ftest/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-ftest/testng.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-integration/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-integration/testng.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/WEB-INF/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/WEB-INF/components.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/org/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/org/jboss/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/org/jboss/seam/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/org/jboss/seam/example/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/org/jboss/seam/example/seamdiscs/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/org/jboss/seam/example/seamdiscs/test/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/org/jboss/seam/example/seamdiscs/test/BaseData.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/seam.properties
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/seambay.properties
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/pom.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/resources/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/resources/messages_en.properties
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/components.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/faces-config.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/pages.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/trinidad-config.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/trinidad-skins.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/web.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artist.page.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artist.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artists.page.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artists.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/disc.page.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/disc.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/discs.page.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/discs.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/error.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/home.page.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/home.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/img/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/img/cal-next.png
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/img/cal-prev.png
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/img/dtpick.gif
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/img/spinner.gif
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/index.html
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/display.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/edit.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/footer.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/menu.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/template.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/login.page.xml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/login.xhtml
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/stylesheet/
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/stylesheet/skin.css
branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/stylesheet/theme.css
Modified:
branches/community/Seam_2_3/examples-ee6/pom.xml
Log:
added seamdiscs example
Modified: branches/community/Seam_2_3/examples-ee6/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/pom.xml 2012-04-05 15:11:13 UTC (rev 14527)
+++ branches/community/Seam_2_3/examples-ee6/pom.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -36,6 +36,7 @@
<module>restbay</module>
<module>rss</module>
<module>seambay</module>
+ <module>seamdiscs</module>
<module>seampay</module>
<module>seamspace</module>
<module>spring</module>
@@ -180,13 +181,13 @@
<dependency>
<groupId>org.apache.myfaces.trinidad</groupId>
<artifactId>trinidad-api</artifactId>
- <version>1.2.5</version>
+ <version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.trinidad</groupId>
<artifactId>trinidad-impl</artifactId>
- <version>1.2.5</version>
+ <version>2.0.1</version>
</dependency>
</dependencies>
</dependencyManagement>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/pom.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/pom.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <artifactId>seamdiscs</artifactId>
+ <parent>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>examples-ee6</artifactId>
+ <version>2.3.0.Beta2-SNAPSHOT</version>
+ </parent>
+ <packaging>pom</packaging>
+ <name>Seamdiscs Example</name>
+
+ <properties>
+ <example.name>seamdiscs</example.name>
+ </properties>
+
+ <modules>
+ <module>seamdiscs-ear</module>
+ <module>seamdiscs-ejb</module>
+ <module>seamdiscs-web</module>
+<!-- <module>seamdiscs-tests</module> -->
+ </modules>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.seam.examples-ee6.seamdiscs</groupId>
+ <artifactId>seamdiscs-ejb</artifactId>
+ <version>${project.version}</version>
+ <type>ejb</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam.examples-ee6.seamdiscs</groupId>
+ <artifactId>seamdiscs-web</artifactId>
+ <version>${project.version}</version>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam.examples-ee6.seamdiscs</groupId>
+ <artifactId>seamdiscs-ear</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/readme.txt
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/readme.txt (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/readme.txt 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,40 @@
+Seam SeamDiscs Example
+======================
+
+The seamdiscs example is a simple example built using the Seam Application
+Framework which allows you to record your favourite albums and artists. It
+uses a mix of RichFaces and Trinidad components. It also uses the "inplace
+editing" pattern; the same facelets are used for editing and display of data
+(login to edit a disc or artist).
+
+The Seam-Trinidad integration (for now built into the example) provides a
+DataModel which, when backed by a Seam Application Framework Query, provides
+lazy loading of data for paging, sorting in the Persistence Context and strong
+row keys. If you want to use, you'll need to copy the classes in
+org.jboss.seam.trinidad to your own project. This may be offered as a
+standalone jar in the Seam project in the future. One caveat is that you must
+ensure the rows property on the <tr:table> is the same as the maxResults
+property on the Query.
+
+Example
+
+<tr:table value="#{discs.dataModel}" rows="#{discs.maxResults}">
+ <tr:column>
+ ...
+ </tr:column
+</tr:table>
+
+
+This example runs on JBoss AS as an EAR.
+
+To deploy the example to JBoss AS, follow these steps:
+
+* In the example root directory run:
+
+ mvn clean package
+
+* Go to seamdiscs-ear:
+
+ mvn jboss-as:deploy
+
+* Open this URL in a web browser: http://localhost:8080/seam-seamdiscs
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ear/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ear/pom.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ear/pom.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>seamdiscs</artifactId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <version>2.3.0.Beta2-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.jboss.seam.examples-ee6.seamdiscs</groupId>
+ <artifactId>seamdiscs-ear</artifactId>
+ <packaging>ear</packaging>
+ <name>Seamdiscs EAR Module</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.seam.examples-ee6.seamdiscs</groupId>
+ <artifactId>seamdiscs-web</artifactId>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam.examples-ee6.seamdiscs</groupId>
+ <artifactId>seamdiscs-ejb</artifactId>
+ <type>ejb</type>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <type>ejb</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.trinidad</groupId>
+ <artifactId>trinidad-api</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>seam-seamdiscs</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-ear-plugin</artifactId>
+ <configuration>
+ <defaultLibBundleDir>lib</defaultLibBundleDir>
+ <!-- Exclude eclipse generated application.xml and manually modified jboss-app.xml during mvn build -->
+ <earSourceExcludes>**/application.xml, **/jboss-app.xml</earSourceExcludes>
+ <!-- use maven generated application.xml instead -->
+ <generateApplicationXml>true</generateApplicationXml>
+ <filtering>true</filtering>
+ <modules>
+ <webModule>
+ <groupId>org.jboss.seam.examples-ee6.seamdiscs</groupId>
+ <artifactId>seamdiscs-web</artifactId>
+ <contextRoot>/seam-seamdiscs</contextRoot>
+ <bundleFileName>seamdiscs-web.war</bundleFileName>
+ </webModule>
+ <ejbModule>
+ <groupId>org.jboss.seam.examples-ee6.seamdiscs</groupId>
+ <artifactId>seamdiscs-ejb</artifactId>
+ <bundleFileName>seamdiscs-ejb.jar</bundleFileName>
+ </ejbModule>
+ </modules>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>exploded</id>
+ <properties>
+ <example.name>seamdiscs</example.name>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>package</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.seam.examples-ee6.seamdiscs</groupId>
+ <artifactId>seamdiscs-ear</artifactId>
+ <type>ear</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.seam.examples-ee6.seamdiscs</groupId>
+ <artifactId>seamdiscs-web</artifactId>
+ <type>war</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear/${example.name}-web.war</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.jboss.seam.examples-ee6.seamdiscs</groupId>
+ <artifactId>seamdiscs-ejb</artifactId>
+ <type>jar</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear/${example.name}-ejb.jar</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-maven-plugin</artifactId>
+ <configuration>
+ <jbossHome>${jboss.home}</jbossHome>
+ <serverName>${jboss.domain}</serverName>
+ <fileNames>
+ <param>${basedir}/src/main/resources/jboss-seam-seamdiscs-ds.xml</param>
+ <directory>${project.build.directory}/${project.build.finalName}-exploded/${project.build.finalName}.ear</directory>
+ </fileNames>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/jboss-deployment-structure.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/jboss-deployment-structure.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/jboss-deployment-structure.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,12 @@
+<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
+ <deployment>
+ <dependencies>
+ <module name="org.hibernate" export="true"/>
+ <module name="javax.faces.api" export="true"/>
+ <module name="com.sun.jsf-impl" export="true"/>
+ <module name="org.apache.commons.collections" export="true"/>
+ <module name="org.dom4j" export="true"/>
+ <module name="org.antlr" export="true"/>
+ </dependencies>
+ </deployment>
+</jboss-deployment-structure>
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/jboss-seam-seambay-ds.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/jboss-seam-seambay-ds.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ear/src/main/application/META-INF/jboss-seam-seambay-ds.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<datasources xmlns="http://www.jboss.org/ironjacamar/schema">
+ <datasource
+ jndi-name="java:/jboss/seamdiscsDatasource"
+ enabled="true"
+ use-java-context="true" pool-name="seamdiscs">
+ <connection-url>jdbc:h2:mem:seambaydb;DB_CLOSE_DELAY=-1</connection-url>
+ <driver>h2</driver>
+ <security>
+ <user-name>sa</user-name>
+ <password>sa</password>
+ </security>
+ </datasource>
+</datasources>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/pom.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/pom.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>seamdiscs</artifactId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <version>2.3.0.Beta2-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.jboss.seam.examples-ee6.seamdiscs</groupId>
+ <artifactId>seamdiscs-ejb</artifactId>
+ <packaging>ejb</packaging>
+ <name>Seamdiscs EJB Module</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <type>ejb</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.servlet</groupId>
+ <artifactId>jboss-servlet-api_3.0_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.ejb</groupId>
+ <artifactId>jboss-ejb-api_3.1_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.faces</groupId>
+ <artifactId>jboss-jsf-api_2.0_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.trinidad</groupId>
+ <artifactId>trinidad-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/ArtistHome.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/ArtistHome.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/ArtistHome.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,48 @@
+package org.jboss.seam.example.seamdiscs.action;
+
+import javax.ejb.Local;
+
+import org.apache.myfaces.trinidad.model.TreeModel;
+import org.jboss.seam.example.seamdiscs.model.Artist;
+
+
+/**
+ * @author Pete Muir
+ *
+ */
+@Local
+public interface ArtistHome
+{
+
+ // Methods from ArtistHomeImpl
+ public Artist getArtist();
+
+ public String getType();
+
+ public void setType(String type);
+
+ public void addBandMember();
+
+ public void addDisc();
+
+ public TreeModel getTree();
+
+ public void ejbRemove();
+
+ // Methods from EntityHome and Home
+
+ public Object getId();
+
+ public void setId(Object id);
+
+ public String persist();
+
+ public String update();
+
+ public boolean isManaged();
+
+ public void create();
+
+ public Object getInstance();
+
+}
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/ArtistHomeImpl.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/ArtistHomeImpl.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/ArtistHomeImpl.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,97 @@
+package org.jboss.seam.example.seamdiscs.action;
+
+import java.util.List;
+
+import javax.ejb.Remove;
+import javax.ejb.Stateful;
+
+import org.apache.myfaces.trinidad.model.ChildPropertyTreeModel;
+import org.apache.myfaces.trinidad.model.TreeModel;
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.intercept.BypassInterceptors;
+import org.jboss.seam.example.seamdiscs.model.Artist;
+import org.jboss.seam.example.seamdiscs.model.Band;
+import org.jboss.seam.example.seamdiscs.model.BandMember;
+import org.jboss.seam.example.seamdiscs.model.Disc;
+import org.jboss.seam.framework.EntityHome;
+
+@Name("artistHome")
+@Stateful
+public class ArtistHomeImpl extends EntityHome<Artist> implements ArtistHome
+{
+
+ @In(create=true, value="#{allArtists.resultList}")
+ private List<Artist> artists;
+
+ @Factory
+ public Artist getArtist()
+ {
+ return super.getInstance();
+ }
+
+ private String type;
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ @Override
+ protected Artist createInstance()
+ {
+ if (Band.class.getSimpleName().equalsIgnoreCase(getType()))
+ {
+ return new Band();
+ }
+ else
+ {
+ return new Artist();
+ }
+ }
+
+ public void addBandMember()
+ {
+ Band band = (Band) getInstance();
+ band.getBandMembers().add(new BandMember(band));
+ }
+
+ public void addDisc()
+ {
+ getInstance().getDiscs().add(new Disc(getInstance()));
+ }
+
+ public TreeModel getTree()
+ {
+ return new ChildPropertyTreeModel(artists, "discs")
+ {
+ @Override
+ protected Object getChildData(Object parentData)
+ {
+ if (parentData instanceof Artist)
+ {
+ return super.getChildData(parentData);
+ }
+ else
+ {
+ return null;
+ }
+ }
+ };
+ }
+
+ // Utility method for EJB3 to cleanup, don't do anything here, so no need
+ // for Seam to intercept.
+ @Remove
+ @BypassInterceptors
+ public void ejbRemove()
+ {
+
+ }
+}
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/Authenticator.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/Authenticator.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/Authenticator.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,35 @@
+package org.jboss.seam.example.seamdiscs.action;
+
+import java.util.List;
+
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.example.seamdiscs.model.User;
+import org.jboss.seam.framework.EntityController;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.security.Identity;
+
+
+@Name("authenticator")
+public class Authenticator extends EntityController
+{
+ @Logger Log log;
+
+ @In Identity identity;
+
+ public boolean authenticate()
+ {
+ log.info("authenticating #0", identity.getUsername());
+ List<User> users = getEntityManager().createQuery("select u from User u where u.username = :username and u.password = :password").setParameter("username", identity.getUsername()).setParameter("password", identity.getPassword()).getResultList();
+ if (users.size() == 1)
+ {
+ identity.addRole("admin");
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/BandMemberFinder.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/BandMemberFinder.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/action/BandMemberFinder.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,20 @@
+package org.jboss.seam.example.seamdiscs.action;
+
+import java.util.List;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Transactional;
+import org.jboss.seam.example.seamdiscs.model.BandMember;
+import org.jboss.seam.framework.EntityController;
+
+@Name("bandMemberFinder")
+public class BandMemberFinder extends EntityController
+{
+
+ @Transactional
+ public List<BandMember> getBandMembers(Object name)
+ {
+ return getEntityManager().createQuery("select bm from BandMember bm where lower(bm.name) like lower(:name + '%')").setParameter("name", name).getResultList();
+ }
+
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/Artist.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/Artist.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/Artist.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,76 @@
+package org.jboss.seam.example.seamdiscs.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.OrderBy;
+
+@Entity
+public class Artist
+{
+
+ @Id @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private Integer id;
+
+ private String name;
+
+ @OneToMany(mappedBy="artist", cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH})
+ @OrderBy("_release")
+ private List<Disc> discs;
+
+ @Column(length=5000)
+ private String description;
+
+ public Artist()
+ {
+ this.discs = new ArrayList<Disc>();
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer id)
+ {
+ this.id = id;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public List<Disc> getDiscs()
+ {
+ return discs;
+ }
+
+ public void setDiscs(List<Disc> releases)
+ {
+ this.discs = releases;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/Band.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/Band.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/Band.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,29 @@
+package org.jboss.seam.example.seamdiscs.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Entity;
+import javax.persistence.OneToMany;
+
+@Entity
+public class Band extends Artist
+{
+
+ @OneToMany(mappedBy="band", cascade=CascadeType.ALL)
+ private List<BandMember> bandMembers = new ArrayList<BandMember>();
+
+ public List<BandMember> getBandMembers()
+ {
+ return bandMembers;
+ }
+
+ public void setBandMembers(List<BandMember> bandMembers)
+ {
+ this.bandMembers = bandMembers;
+ }
+
+
+
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/BandMember.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/BandMember.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/BandMember.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,63 @@
+ package org.jboss.seam.example.seamdiscs.model;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+
+@Entity
+public class BandMember
+{
+
+ @Id @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private Integer id;
+
+ private String name;
+
+ @ManyToOne
+ private Band band;
+
+ public BandMember()
+ {
+
+ }
+
+ public BandMember(Band band)
+ {
+ this.band = band;
+ }
+
+ public Band getBand()
+ {
+ return band;
+ }
+
+ public void setBand(Band band)
+ {
+ this.band = band;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer id)
+ {
+ this.id = id;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+
+
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/Disc.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/Disc.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/Disc.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,87 @@
+package org.jboss.seam.example.seamdiscs.model;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+
+@Entity
+public class Disc
+{
+
+ @Id @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private Integer id;
+
+ private String name;
+
+ private Integer _release;
+
+ @ManyToOne(cascade={CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH})
+ private Artist artist;
+
+ @Column(length=5000)
+ private String description;
+
+ public Disc()
+ {
+ }
+
+ public Disc(Artist artist)
+ {
+ this.artist = artist;
+ }
+
+ public Artist getArtist()
+ {
+ return artist;
+ }
+
+ public void setArtist(Artist artist)
+ {
+ this.artist = artist;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer id)
+ {
+ this.id = id;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public Integer getRelease()
+ {
+ return _release;
+ }
+
+ public void setRelease(Integer release)
+ {
+ this._release = release;
+ }
+
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/User.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/User.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/example/seamdiscs/model/User.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,51 @@
+package org.jboss.seam.example.seamdiscs.model;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+@Entity
+public class User
+{
+
+ @Id @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private Integer id;
+
+ private String username;
+
+ private String password;
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(Integer id)
+ {
+ this.id = id;
+ }
+
+ public String getPassword()
+ {
+ return password;
+ }
+
+ public void setPassword(String password)
+ {
+ this.password = password;
+ }
+
+ public String getUsername()
+ {
+ return username;
+ }
+
+ public void setUsername(String username)
+ {
+ this.username = username;
+ }
+
+
+
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/EntityCollectionModel.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/EntityCollectionModel.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/EntityCollectionModel.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,47 @@
+package org.jboss.seam.trinidad;
+
+import org.jboss.seam.framework.EntityQuery;
+import org.jboss.seam.framework.Query;
+
+public class EntityCollectionModel extends SeamCollectionModel
+{
+ private EntityQuery entityQuery;
+
+ public EntityCollectionModel(EntityQuery entityQuery)
+ {
+ this.entityQuery = entityQuery;
+ }
+
+ @Override
+ public Object getRowKey()
+ {
+ if (getRowIndex() == -1)
+ {
+ return null;
+ }
+ else
+ {
+ return EntityKeyManager.instance().getKey(getRowIndex() - getFirstResult(), getWrappedList(), entityQuery.getEntityManager());
+ }
+ }
+
+ @Override
+ public void setRowKey(Object rowKey)
+ {
+ if (rowKey == null)
+ {
+ setRowIndex(-1);
+ }
+ else
+ {
+ setRowIndex(EntityKeyManager.instance().getIndex((Integer) rowKey, getWrappedList(), entityQuery.getEntityManager()) + getFirstResult());
+ }
+ }
+
+ @Override
+ protected Query getQuery()
+ {
+ return entityQuery;
+ }
+
+}
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/EntityKeyManager.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/EntityKeyManager.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/EntityKeyManager.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,61 @@
+package org.jboss.seam.trinidad;
+
+import static org.jboss.seam.ScopeType.PAGE;
+import static org.jboss.seam.annotations.Install.BUILT_IN;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.EntityManager;
+
+import org.jboss.seam.Component;
+import org.jboss.seam.annotations.Install;
+import org.jboss.seam.annotations.intercept.BypassInterceptors;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Transactional;
+import org.jboss.seam.core.AbstractMutable;
+import org.jboss.seam.framework.EntityIdentifier;
+
+/**
+ * EntityIdentifier manager for EntityCollectionModel
+ * @author pmuir
+ *
+ */
+
+@Name("org.jboss.seam.trinidad.entityKeyManager")
+@Scope(PAGE)
+@BypassInterceptors
+@Install(precedence=BUILT_IN)
+public class EntityKeyManager extends AbstractMutable
+{
+
+ private List<EntityIdentifier> rows = new ArrayList<EntityIdentifier>();
+
+ public static EntityKeyManager instance()
+ {
+ return (EntityKeyManager) Component.getInstance(EntityKeyManager.class);
+ }
+
+ @Transactional
+ public int getIndex(Integer key, List wrappedList, EntityManager entityManager)
+ {
+ Object entity = rows.get(key).find(entityManager);
+ int index = wrappedList.indexOf(entity);
+ return index;
+ }
+
+
+ @Transactional
+ public Object getKey(int rowIndex, List wrappedList, EntityManager entityManager)
+ {
+ EntityIdentifier key = new EntityIdentifier(wrappedList.get(rowIndex), entityManager);
+ if (!rows.contains(key))
+ {
+ rows.add(key);
+ setDirty();
+ }
+ return rows.indexOf(key);
+ }
+
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/HibernateEntityCollectionModel.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/HibernateEntityCollectionModel.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/HibernateEntityCollectionModel.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,48 @@
+package org.jboss.seam.trinidad;
+
+import org.jboss.seam.framework.HibernateEntityQuery;
+import org.jboss.seam.framework.Query;
+
+public class HibernateEntityCollectionModel extends SeamCollectionModel
+{
+
+ private HibernateEntityQuery hibernateEntityQuery;
+
+ public HibernateEntityCollectionModel(HibernateEntityQuery query)
+ {
+ this.hibernateEntityQuery = query;
+ }
+
+ @Override
+ protected Query getQuery()
+ {
+ return hibernateEntityQuery;
+ }
+
+ @Override
+ public Object getRowKey()
+ {
+ if (getRowIndex() == -1)
+ {
+ return null;
+ }
+ else
+ {
+ return HibernateEntityKeyManager.instance().getKey(getRowIndex() - getFirstResult(), getWrappedList(), hibernateEntityQuery.getSession());
+ }
+ }
+
+ @Override
+ public void setRowKey(Object rowKey)
+ {
+ if (rowKey == null)
+ {
+ setRowIndex(-1);
+ }
+ else
+ {
+ setRowIndex(HibernateEntityKeyManager.instance().getIndex((Integer) rowKey, getWrappedList(), hibernateEntityQuery.getSession()) + getFirstResult());
+ }
+ }
+
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/HibernateEntityKeyManager.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/HibernateEntityKeyManager.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/HibernateEntityKeyManager.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,60 @@
+package org.jboss.seam.trinidad;
+
+import static org.jboss.seam.ScopeType.PAGE;
+import static org.jboss.seam.annotations.Install.BUILT_IN;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hibernate.Session;
+import org.jboss.seam.Component;
+import org.jboss.seam.annotations.Install;
+import org.jboss.seam.annotations.intercept.BypassInterceptors;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.Transactional;
+import org.jboss.seam.core.AbstractMutable;
+import org.jboss.seam.framework.HibernateEntityIdentifier;
+
+/**
+ * EntityIdentifier manager for EntityCollectionModel
+ * @author pmuir
+ *
+ */
+
+@Name("org.jboss.seam.trinidad.hibernateEntityKeyManager")
+@Scope(PAGE)
+@BypassInterceptors
+@Install(precedence=BUILT_IN)
+public class HibernateEntityKeyManager extends AbstractMutable
+{
+
+ private List<HibernateEntityIdentifier> rows = new ArrayList<HibernateEntityIdentifier>();
+
+ public static HibernateEntityKeyManager instance()
+ {
+ return (HibernateEntityKeyManager) Component.getInstance(HibernateEntityKeyManager.class);
+ }
+
+ @Transactional
+ public int getIndex(Integer key, List wrappedList, Session session)
+ {
+ Object entity = rows.get(key).find(session);
+ int index = wrappedList.indexOf(entity);
+ return index;
+ }
+
+
+ @Transactional
+ public Object getKey(int rowIndex, List wrappedList, Session session)
+ {
+ HibernateEntityIdentifier key = new HibernateEntityIdentifier(wrappedList.get(rowIndex), session);
+ if (!rows.contains(key))
+ {
+ rows.add(key);
+ setDirty();
+ }
+ return rows.indexOf(key);
+ }
+
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/SeamCollectionModel.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/SeamCollectionModel.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/SeamCollectionModel.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,206 @@
+package org.jboss.seam.trinidad;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
+import org.apache.myfaces.trinidad.model.CollectionModel;
+import org.apache.myfaces.trinidad.model.SortCriterion;
+import org.jboss.seam.framework.Query;
+import org.jboss.seam.util.Strings;
+
+/**
+ * Abstract base class for an Apache Trinidad CollectionModel
+ *
+ * Implementing classes need to provide conversion between the
+ * current row index and a key for the unchanging row.
+ *
+ * Using rowIndex when backing the CollectionModel with a Query
+ * is not possible as sorting and paging alters the rowIndex
+ * outside the control of the CollectionModel.
+ *
+ * @author pmuir
+ *
+ */
+public abstract class SeamCollectionModel extends CollectionModel
+{
+
+ private static final Pattern COMMA = Pattern.compile(",");
+ private static final Pattern SPACE = Pattern.compile("\\s+");
+
+ //private Object rowKey;
+
+ private int rowIndex = -1;
+
+ private List<SortCriterion> criteria;
+
+ @Override
+ public Object getWrappedData()
+ {
+ return getWrappedList();
+ }
+
+ public void refresh()
+ {
+ getQuery().refresh();
+ }
+
+ @Override
+ public int getRowCount()
+ {
+ return getQuery().getResultCount().intValue();
+ }
+
+ @Override
+ public void setWrappedData(Object arg0)
+ {
+ throw new UnsupportedOperationException("Immutable DataModel");
+ }
+
+ protected List getWrappedList()
+ {
+ return getQuery().getResultList();
+ }
+
+ protected abstract Query getQuery();
+
+ @Override
+ public boolean isSortable(String property)
+ {
+ return true;
+ }
+
+ @Override
+ public List<SortCriterion> getSortCriteria()
+ {
+ if (criteria == null)
+ {
+ criteria = asCriteria(getQuery().getOrder());
+ }
+ return criteria;
+ }
+
+ @Override
+ public void setSortCriteria(List<SortCriterion> criteria)
+ {
+ if (criteria != null && !criteria.equals(getSortCriteria()))
+ {
+ getQuery().setOrder(asQl(criteria));
+ this.criteria = criteria;
+ }
+ }
+
+ @Override
+ public void setRowIndex(int rowIndex)
+ {
+ this.rowIndex = rowIndex;
+ //rowKey = null;
+ }
+
+ @Override
+ public int getRowIndex()
+ {
+ return rowIndex;
+ }
+
+ @Override
+ public Object getRowData()
+ {
+ // We can attempt to do lazy loading
+ if (getQuery().getMaxResults() != null)
+ {
+ boolean refresh = false;
+ // Lazy load data
+ refresh = page();
+ if (refresh)
+ {
+ refresh();
+ }
+ return getWrappedList().get(getRowIndex() - getFirstResult());
+ }
+ else
+ {
+ return getWrappedList().get(getRowIndex());
+ }
+ }
+
+ private boolean page()
+ {
+ if (getRowIndex() < getFirstResult())
+ {
+ while (getRowIndex() < getFirstResult())
+ {
+ getQuery().previous();
+ }
+ return true;
+ }
+ else if (getRowIndex() >= getQuery().getNextFirstResult())
+ {
+ while (getRowIndex() >= getQuery().getNextFirstResult())
+ {
+ getQuery().next();
+ }
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ protected int getFirstResult()
+ {
+ if (getQuery().getFirstResult() == null)
+ {
+ getQuery().setFirstResult(0);
+ }
+ return getQuery().getFirstResult();
+ }
+
+ @Override
+ public boolean isRowAvailable()
+ {
+ return getRowIndex() >= 0 && getRowIndex() < getRowCount();
+ }
+
+ public static String asQl(List<SortCriterion> criteria)
+ {
+ if (criteria != null && criteria.size() > 0)
+ {
+ StringBuffer sb = new StringBuffer();
+ boolean first = true;
+ for (SortCriterion sortCriterion : criteria)
+ {
+ if (first)
+ {
+ first = false;
+ }
+ else
+ {
+ sb.append(',');
+ }
+ sb.append(sortCriterion.getProperty()).append(sortCriterion.isAscending() ? " ASC" : " DESC");
+ }
+ return sb.toString();
+ }
+ return null;
+ }
+
+ public static List<SortCriterion> asCriteria(String sql)
+ {
+ if (!Strings.isEmpty(sql))
+ {
+ String[] tokens = COMMA.split(sql.trim());
+ List<SortCriterion> criteria = new ArrayList<SortCriterion>(tokens.length);
+ for (int i = 0; i != tokens.length; i++)
+ {
+ String[] terms = SPACE.split(tokens[i].trim());
+ SortCriterion sortCriterion = new SortCriterion(terms[0], terms.length == 1 ? false : "ASC".equalsIgnoreCase(terms[1]));
+ criteria.add(i, sortCriterion);
+ }
+ return criteria;
+ }
+ return new ArrayList<SortCriterion>();
+ }
+
+}
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/TrinidadDataModels.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/TrinidadDataModels.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/java/org/jboss/seam/trinidad/TrinidadDataModels.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,50 @@
+package org.jboss.seam.trinidad;
+
+import static org.jboss.seam.ScopeType.STATELESS;
+import static org.jboss.seam.annotations.Install.FRAMEWORK;
+
+import javax.faces.model.DataModel;
+
+import org.jboss.seam.annotations.Install;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.annotations.intercept.BypassInterceptors;
+import org.jboss.seam.faces.DataModels;
+import org.jboss.seam.framework.EntityQuery;
+import org.jboss.seam.framework.HibernateEntityQuery;
+import org.jboss.seam.framework.Query;
+
+/**
+ * Provide enhanced features when Trinidad is used as a JSF component set
+ * @author pmuir
+ *
+ */
+
+@Name("org.jboss.seam.faces.dataModels")
+@Install(precedence=FRAMEWORK, classDependencies="org.apache.myfaces.trinidad.component.UIXComponent")
+@Scope(STATELESS)
+@BypassInterceptors
+public class TrinidadDataModels extends DataModels
+{
+
+ @Override
+ public DataModel getDataModel(Query query)
+ {
+ // If an EntityQuery is in use we can return a CollectionModel
+ // backed by the database
+ if (query instanceof EntityQuery)
+ {
+ return new EntityCollectionModel((EntityQuery) query);
+ }
+ else if (query instanceof HibernateEntityQuery)
+ {
+ return new HibernateEntityCollectionModel((HibernateEntityQuery) query);
+ }
+ else
+ {
+ return super.getDataModel(query);
+ }
+ }
+
+
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/resources/META-INF/ejb-jar.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/resources/META-INF/ejb-jar.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/resources/META-INF/ejb-jar.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
+ version="3.1">
+
+ <interceptors>
+ <interceptor>
+ <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+ </interceptor>
+ </interceptors>
+
+ <assembly-descriptor>
+ <interceptor-binding>
+ <ejb-name>*</ejb-name>
+ <interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
+ </interceptor-binding>
+ </assembly-descriptor>
+
+</ejb-jar>
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/resources/META-INF/persistence.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/resources/META-INF/persistence.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/resources/META-INF/persistence.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Persistence deployment descriptor for dev profile -->
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
+ version="2.0">
+
+ <persistence-unit name="seamdiscs">
+ <provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <jta-data-source>java:/jboss/seamdiscsDatasource</jta-data-source>
+ <properties>
+ <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+ <property name="hibernate.show_sql" value="true"/>
+ <property name="jboss.entity.manager.factory.jndi.name" value="java:/seamdiscsEntityManagerFactory"/>
+ </properties>
+ </persistence-unit>
+
+</persistence>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/resources/import.sql
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/resources/import.sql (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/resources/import.sql 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,40 @@
+insert into artist ( dtype,name, description) values ('Band', 'Pink Floyd', 'A leading prog rock band hailing from England, Pink Floyd had a varied line up, perhaps most affected by the sad loss of Sid Barret to drugs')
+insert into artist (dtype,name, description) values ('Band', 'Fairport Convention', 'The first band to do folk-rock in the UK, Fairport Convention shaped British music for a decade')
+insert into artist (dtype,name, description) values ('Artist', 'Bob Dylan', 'Bob Dylan grew out of the US folk scene and was considered *Woodie Guthries* successor by many. Famously he was involved in the civil rights movement, writing and singing protest songs. At the *1965 Newport Folk Festival* Dylan *went electric*, heralding a new (and, in many critics eyes, lesser) period. Famously, folk luminary, *Pete Seeger* stormed out.')
+insert into artist (dtype,name, description) values ('Band', 'Led Zepplin', 'A British rock band of the 1970s')
+insert into artist (dtype, name, description) values ('Artist', 'Ry Cooder', '*Ry Cooder* has had a very varied career. He came to mainstream attention with the *Buena Vista Social Club* album, which lead to greater interest in Cuban music. His latest album follows *Buddy*, a cat, travelling around the US')
+insert into artist (dtype,name,description) values ('Artist', 'Richard Thompson', 'Voted one of the top 50 guitarists ever, *Richard Thompson* is one of the unsung stars of the last 30 years. First playing with *Fairport Convention*, he then dueted with his wife *Linda*, splitting in the mid 80s. Since then he has been recording and playing as a solo artist, sometimes with a backing band, and, more often than not, with the incomprable *Danny Thompson* on bass.')
+insert into artist (dtype,name,description) values ('Band', 'Capercaillie', '*Capercaillie* were the first to take traditional and Celtic music and give it a *groove*. Highly successful, the members are now pursuing side projects - both *Karen Mathieson* and *Mike McGoldrick* have solo albums out.')
+
+insert into disc (name, artist_id, description) values ('Dark Side of the Moon', 1, 'The definitive Pink Floyd album')
+insert into disc (name, artist_id, description) values ('Liege and Lief', 2, 'The *first* folk-rock album ever made in the UK, this was the only studio recording of the classic line up of *Sandy Denny*, *Richard Thompson*, *Dave Swarbick*, *Ashley Hutchings* and *Simon Nicol*')
+insert into disc (name, artist_id) values ('The Wall', 1)
+insert into disc (name, artist_id) values ('The Freewheelin Bob Dylan', 3)
+insert into disc (name, artist_id, _release) values ('Blood on the Tracks', 3, '1975')
+insert into disc (name, artist_id) values ('Desire', 3)
+insert into disc (name, artist_id) values ('Led Zepplin 1', 4)
+insert into disc (name, artist_id, description) values ('Buena Vista Social Club', 5, 'This album brough Cuban music to the attention of the world')
+insert into disc (name, artist_id, description) values ('Chavez Ravine', 5, 'Written about *Ry Cooder* birthplace')
+insert into disc (name, artist_id, _release, description) values ('My Name is Buddy', 5, '2007', 'Follows Buddy the Cat as he explores the USA')
+insert into disc (name, artist_id,_release, description) values ('Mock Tudor', 6, 1999, 'A celebration of *Richard Thompsons* love of the suburbs and anonymity, *Mock Tudor* includes the classic tracks *Cooksferry Queen* and *Crawl Back*.' )
+insert into disc (name, artist_id,_release, description) values ('Front Parlour Ballads', 6, 2005, '*Richard Thompsons first truly solo album. Whilst not his most immediately accessible album, it grows on you over time.*')
+insert into disc (name, artist_id,_release) values ('The Old Kit Bag', 6, 2003)
+insert into disc (name, artist_id,_release) values ('Rumor and Sigh', 6, 1991)
+
+insert into bandmember (name, band_id) values ('Syd Barett', 1)
+insert into bandmember (name, band_id) values ('David Gilmor', 1)
+insert into bandmember (name, band_id) values ('Roger Waters', 1)
+insert into bandmember (name, band_id) values ('Richard Thompson', 2)
+insert into bandmember (name, band_id) values ('Sandy Denny', 2)
+insert into bandmember (name, band_id) values ('Dave Pegg', 2)
+insert into bandmember (name, band_id) values ('Ashley Hutchings', 2)
+insert into bandmember (name, band_id) values ('Simon Nicol', 2)
+insert into bandmember (name, band_id) values ('Dave Swarbick', 2)
+insert into bandmember (name, band_id) values ('Rick Sanders', 2)
+insert into bandmember (name, band_id) values ('Chris Leslie', 2)
+insert into bandmember (name, band_id) values ('Maart Alcock', 2)
+insert into bandmember (name, band_id) values ('Karen Mathieson', 7)
+insert into bandmember (name, band_id) values ('Mike McGoldrick', 7)
+insert into bandmember (name, band_id) values ('Charlie', 7)
+
+insert into user (username, password) values ('administrator', 'administrator')
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-ejb/src/main/resources/seam.properties
===================================================================
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/pom.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/pom.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>seamdiscs</artifactId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <version>2.3.0.Beta2-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.jboss.seam.examples-ee6.seamdiscs</groupId>
+ <artifactId>seamdiscs-tests</artifactId>
+ <name>Seamdiscs Integration Tests Module</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.seam.examples-ee6.seamdiscs</groupId>
+ <artifactId>seamdiscs-ejb</artifactId>
+ <type>ejb</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <type>ejb</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <type>ejb</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.faces</groupId>
+ <artifactId>jboss-jsf-api_2.0_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.seleniumhq.selenium.server</groupId>
+ <artifactId>selenium-server</artifactId>
+ <classifier>standalone</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.seleniumhq.selenium.client-drivers</groupId>
+ <artifactId>selenium-java-client-driver</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>functional-tests</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.el</groupId>
+ <artifactId>jboss-el-api_2.2_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.trinidad</groupId>
+ <artifactId>trinidad-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.trinidad</groupId>
+ <artifactId>trinidad-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.dbunit</groupId>
+ <artifactId>dbunit</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <filtering>true</filtering>
+ </testResource>
+ <testResource>
+ <directory>src/test/bootstrap</directory>
+ <filtering>false</filtering>
+ </testResource>
+ <testResource>
+ <directory>${basedir}/../seamdiscs-ear/src/main/application</directory>
+ <filtering>true</filtering>
+ </testResource>
+ <testResource>
+ <directory>${basedir}/../seamdiscs-ear/src/main/resources</directory>
+ <filtering>true</filtering>
+ </testResource>
+ <testResource>
+ <directory>${basedir}/../seamdiscs-web/src/main/resources</directory>
+ <filtering>true</filtering>
+ </testResource>
+ </testResources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>false</skipTests>
+ <argLine>-Dsun.lang.ClassLoader.allowArraySyntax=true -Xms512m -Xmx512m</argLine>
+ <additionalClasspathElements>
+ <additionalClasspathElement>${basedir}/../seamdiscs-web/src/main/webapp</additionalClasspathElement>
+ <additionalClasspathElement>${project.build.directory}/dependency/bootstrap</additionalClasspathElement>
+ </additionalClasspathElements>
+ <suiteXmlFiles>
+ <suiteXmlFile>src/test/resources-integration/testng.xml</suiteXmlFile>
+ </suiteXmlFiles>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-seam-bootstrap</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <includes>bootstrap/**</includes>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-embedded-bootstrap</artifactId>
+ <version>${project.version}</version>
+ <type>jar</type>
+ <overWrite>false</overWrite>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>ftest-jbossas</id>
+ <properties>
+ <example.context.path>seam-seamdiscs</example.context.path>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-maven-plugin</artifactId>
+ <configuration>
+ <jbossHome>${jboss.home}</jbossHome>
+ <serverName>${jboss.domain}</serverName>
+ <fileNames>
+ <param>${basedir}/../seamdiscs-ear/src/main/resources/jboss-seam-seamdiscs-ds.xml</param>
+ <param>${basedir}/../seamdiscs-ear/target/seam-seamdiscs.ear</param>
+ </fileNames>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>selenium-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>failsafe-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/DisplayArtistTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/DisplayArtistTest.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/DisplayArtistTest.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,184 @@
+package org.jboss.seam.example.seamdiscs.test;
+
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.ARTIST1_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.ARTIST2_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.ARTIST3_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.ARTIST4_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.ARTIST5_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.ARTIST6_NAME;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.model.DataModel;
+
+import org.apache.myfaces.trinidad.model.CollectionModel;
+import org.apache.myfaces.trinidad.model.SortCriterion;
+import org.jboss.seam.example.seamdiscs.model.Artist;
+import org.jboss.seam.example.seamdiscs.model.Band;
+import org.jboss.seam.mock.DBUnitSeamTest;
+import org.testng.annotations.Test;
+
+
+public class DisplayArtistTest extends DBUnitSeamTest
+{
+
+ @Override
+ protected void prepareDBUnitOperations() {
+ beforeTestOperations.add(
+ new DataSetOperation("org/jboss/seam/example/seamdiscs/test/BaseData.xml")
+ );
+ }
+
+ @Test
+ public void testDisplayArtists() throws Exception
+ {
+ new NonFacesRequest("/artists.xhtml")
+ {
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ Object artists = getValue("#{artists.dataModel}");
+ assert artists instanceof DataModel;
+ DataModel artistsDataModel = (DataModel) artists;
+
+ // Check for the correct number of results
+ assert artistsDataModel.getRowCount() == 6;
+
+ // Check for correct ordering
+ assertArtist(artistsDataModel, 0, ARTIST5_NAME);
+ assertArtist(artistsDataModel, 1, ARTIST6_NAME);
+ assertArtist(artistsDataModel, 2, ARTIST1_NAME);
+ assertArtist(artistsDataModel, 3, ARTIST4_NAME);
+ assertArtist(artistsDataModel, 4, ARTIST2_NAME);
+ assertArtist(artistsDataModel, 5, ARTIST3_NAME);
+ }
+
+ }.run();
+ }
+
+ @Test
+ public void testFilterArtists() throws Exception
+ {
+ new FacesRequest("/artists.xhtml")
+ {
+
+ @Override
+ protected void updateModelValues() throws Exception
+ {
+ setValue("#{exampleArtist.name}", "r");
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ Object artists = getValue("#{artists.dataModel}");
+ assert artists instanceof DataModel;
+ DataModel artistsDataModel = (DataModel) artists;
+
+ // Check for the correct number of results
+ assert artistsDataModel.getRowCount() == 2;
+
+ // Check for correct ordering
+ assertArtist(artistsDataModel, 0, ARTIST5_NAME);
+ assertArtist(artistsDataModel, 1, ARTIST6_NAME);
+ }
+
+ }.run();
+
+ new FacesRequest("/artists.xhtml")
+ {
+
+ @Override
+ protected void updateModelValues() throws Exception
+ {
+ setValue("#{exampleArtist.name}", "Ri");
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ Object artists = getValue("#{artists.dataModel}");
+ assert artists instanceof DataModel;
+ DataModel artistsDataModel = (DataModel) artists;
+
+ // Check for the correct number of results
+ assert artistsDataModel.getRowCount() == 1;
+
+ // Check for correct ordering
+ assertArtist(artistsDataModel, 0, ARTIST6_NAME);
+ }
+
+ }.run();
+ }
+
+ @Test
+ public void testSeamCollectionModel() throws Exception
+ {
+ new NonFacesRequest("/artists.xhtml")
+ {
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ Object artists = getValue("#{artists.dataModel}");
+ assert artists instanceof CollectionModel;
+ CollectionModel collectionModel = (CollectionModel) artists;
+
+ // Reorder the list
+ List<SortCriterion> criteria = new ArrayList<SortCriterion>();
+ criteria.add(new SortCriterion("artist.name", true));
+ collectionModel.setSortCriteria(criteria);
+
+ // Check for correct ordering
+ assertArtist(collectionModel, 5, ARTIST5_NAME);
+ assertArtist(collectionModel, 4, ARTIST6_NAME);
+ assertArtist(collectionModel, 3, ARTIST1_NAME);
+ assertArtist(collectionModel, 2, ARTIST4_NAME);
+ assertArtist(collectionModel, 1, ARTIST2_NAME);
+ assertArtist(collectionModel, 0, ARTIST3_NAME);
+ }
+
+ }.run();
+ }
+
+ @Test
+ public void testDisplayArtist() throws Exception
+ {
+ // TODO Test navigation, but need a MockNavigationHandler
+ new NonFacesRequest("/artists.xhtml")
+ {
+ @Override
+ protected void beforeRequest()
+ {
+ setParameter("actionOutcome", "artist");
+ setParameter("artistId", "1");
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert ((Integer) 1).equals(getValue("#{artistHome.id}"));
+ Object object = null;
+ object = getValue("#{artist}");
+ assert object instanceof Band;
+ Band artist1 = (Band) object;
+ assert ARTIST1_NAME.equals(artist1.getName());
+ assert artist1.getBandMembers().size() == 3;
+ }
+ }.run();
+ }
+
+
+
+ private void assertArtist(DataModel dataModel, int row, String name)
+ {
+ dataModel.setRowIndex(row);
+ Object rowData = dataModel.getRowData();
+ assert rowData instanceof Artist;
+ Artist artist = (Artist) rowData;
+ assert name.equals(artist.getName());
+ }
+
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/DisplayDiscTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/DisplayDiscTest.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/DisplayDiscTest.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,99 @@
+package org.jboss.seam.example.seamdiscs.test;
+
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.DISC1_ARTIST;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.DISC1_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.DISC2_ARTIST;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.DISC2_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.DISC3_ARTIST;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.DISC3_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.DISC4_ARTIST;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.DISC4_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.DISC5_ARTIST;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.DISC5_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.DISC6_ARTIST;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.DISC6_NAME;
+
+import javax.faces.model.DataModel;
+
+import org.jboss.seam.example.seamdiscs.model.Disc;
+import org.jboss.seam.mock.DBUnitSeamTest;
+import org.testng.annotations.Test;
+
+
+public class DisplayDiscTest extends DBUnitSeamTest
+{
+
+ @Override
+ protected void prepareDBUnitOperations() {
+ beforeTestOperations.add(
+ new DataSetOperation("org/jboss/seam/example/seamdiscs/test/BaseData.xml")
+ );
+ }
+
+ @Test
+ public void testDisplayDiscs() throws Exception
+ {
+ new FacesRequest("/discs.xhtml")
+ {
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ Object discs = getValue("#{discs.dataModel}");
+ assert discs instanceof DataModel;
+ DataModel dataModel = (DataModel) discs;
+
+ // Check for the correct number of results
+ assert dataModel.getRowCount() == 6;
+
+ // Check for correct ordering
+ assertDisc(dataModel, 0, DISC5_NAME, DISC5_ARTIST);
+ assertDisc(dataModel, 1, DISC6_NAME, DISC6_ARTIST);
+ assertDisc(dataModel, 2, DISC1_NAME, DISC1_ARTIST);
+ assertDisc(dataModel, 3, DISC2_NAME, DISC2_ARTIST);
+ assertDisc(dataModel, 4, DISC4_NAME, DISC4_ARTIST);
+ assertDisc(dataModel, 5, DISC3_NAME, DISC3_ARTIST);
+ }
+
+ }.run();
+ }
+
+ @Test
+ public void testDisplayDisc() throws Exception
+ {
+ // TODO Test navigation, but need a MockNavigationHandler
+ new NonFacesRequest("/discs.xhtml")
+ {
+ @Override
+ protected void beforeRequest()
+ {
+ setParameter("actionOutcome", "disc");
+ setParameter("discId", "3");
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert ((Integer) 3).equals(getValue("#{discHome.id}"));
+ Object object = null;
+ object = getValue("#{disc}");
+ assert object instanceof Disc;
+ Disc disc1 = (Disc) object;
+ assert DISC3_NAME.equals(disc1.getName());
+ }
+ }.run();
+ }
+
+
+
+ private void assertDisc(DataModel dataModel, int row, String discName, String artistName)
+ {
+ dataModel.setRowIndex(row);
+ Object rowData = dataModel.getRowData();
+ assert rowData instanceof Disc;
+ Disc disc = (Disc) rowData;
+ assert discName.equals(disc.getName());
+ assert artistName.equals(disc.getArtist().getName());
+ }
+
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/EditArtistTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/EditArtistTest.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/EditArtistTest.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,341 @@
+/**
+ *
+ */
+package org.jboss.seam.example.seamdiscs.test;
+
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.ARTIST1_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.ARTIST4_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.ARTIST_NEW_DESCRIPTION;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.BANDMEMBER3_VALUE;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.NEW_ARTIST_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.NEW_BANDMEMBER_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.NEW_BAND_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.PASSWORD;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.PERSISTED;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.UPDATED;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.USERNAME;
+
+import java.util.List;
+
+import javax.el.PropertyNotFoundException;
+
+import org.jboss.seam.example.seamdiscs.model.BandMember;
+import org.jboss.seam.mock.DBUnitSeamTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Pete Muir
+ *
+ */
+public class EditArtistTest extends DBUnitSeamTest
+{
+
+
+
+ @Override
+ protected void prepareDBUnitOperations()
+ {
+ beforeTestOperations.add(
+ new DataSetOperation("org/jboss/seam/example/seamdiscs/test/BaseData.xml")
+ );
+ }
+
+ @Test
+ public void testEditArtist() throws Exception
+ {
+ final String cid = new FacesRequest("/artist.xhtml")
+ {
+ @Override
+ protected void beforeRequest()
+ {
+ setParameter("artistId", "1");
+ setParameter("conversationPropagation", "join");
+ }
+
+ @Override
+ protected void updateModelValues() throws Exception {
+ setValue("#{identity.username}", USERNAME);
+ setValue("#{identity.password}", PASSWORD);
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ invokeAction("#{identity.login}");
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert (Boolean) getValue("#{identity.loggedIn}");
+ assert ((Integer) 1).equals(getValue("#{artistHome.id}"));
+ assert ARTIST1_NAME.equals(getValue("#{artist.name}"));
+ assert getValue("#{artist.description}") == null;
+ assert isLongRunningConversation();
+ assert (Boolean) getValue("#{artistHome.managed}");
+
+ }
+ }.run();
+
+ new FacesRequest("/artist.xhtml", cid)
+ {
+
+ @Override
+ protected void updateModelValues() throws Exception
+ {
+ setValue("#{artist.description}", ARTIST_NEW_DESCRIPTION);
+ assert isLongRunningConversation();
+ assert cid.equals(getConversationId());
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ assert UPDATED.equals(invokeAction("#{artistHome.update}"));
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert ARTIST_NEW_DESCRIPTION.equals(getValue("#{artist.description"));
+ assert isLongRunningConversation();
+ }
+
+ }.run();
+ }
+
+ @Test
+ public void testAddArtist() throws Exception
+ {
+ final String cid = new FacesRequest("/artist.xhtml")
+ {
+ @Override
+ protected void beforeRequest()
+ {
+ setParameter("conversationPropagation", "join");
+ }
+
+ @Override
+ protected void updateModelValues() throws Exception {
+ setValue("#{identity.username}", USERNAME);
+ setValue("#{identity.password}", PASSWORD);
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ invokeAction("#{identity.login}");
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert (Boolean) getValue("#{identity.loggedIn}");
+ assert null == getValue("#{artistHome.id}");
+ assert null == getValue("#{artist.name}");
+ assert isLongRunningConversation();
+ assert (!(Boolean) getValue("#{artistHome.managed}"));
+ }
+ }.run();
+
+ new FacesRequest("/artist.xhtml", cid)
+ {
+
+ @Override
+ protected void updateModelValues() throws Exception
+ {
+ setValue("#{artistHome.instance.name}", NEW_ARTIST_NAME);
+ assert isLongRunningConversation();
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ assert PERSISTED.equals(invokeAction("#{artistHome.persist}"));
+ }
+
+ }.run();
+
+ new FacesRequest("/artists.xhtml", cid)
+ {
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert new Long("7").equals(getValue("#{artists.resultCount}"));
+ assert NEW_ARTIST_NAME.equals(getValue("#{artists.resultList[3].name}"));
+ assert ARTIST4_NAME.equals(getValue("#{artists.resultList[4].name}"));
+ }
+
+ }.run();
+ }
+
+ @Test
+ public void testAddBand() throws Exception
+ {
+ final String cid = new FacesRequest("/artist.xhtml")
+ {
+
+ @Override
+ protected void beforeRequest()
+ {
+ setParameter("conversationPropagation", "join");
+ }
+
+ @Override
+ protected void updateModelValues() throws Exception {
+ setValue("#{identity.username}", USERNAME);
+ setValue("#{identity.password}", PASSWORD);
+ setValue("#{artistHome.type}", "band");
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ invokeAction("#{identity.login}");
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert (Boolean) getValue("#{identity.loggedIn}");
+ assert null == getValue("#{artistHome.id}");
+ assert null == getValue("#{artist.name}");
+ try
+ {
+ assert ((Integer) 0).equals(getValue("#{artist.bandMembers.size}"));
+ }
+ catch (PropertyNotFoundException e)
+ {
+ assert false;
+ }
+ assert isLongRunningConversation();
+ assert (!(Boolean) getValue("#{artistHome.managed}"));
+ }
+ }.run();
+
+ new FacesRequest("/artist.xhtml", cid)
+ {
+
+ @Override
+ protected void updateModelValues() throws Exception
+ {
+ setValue("#{artistHome.instance.name}", NEW_BAND_NAME);
+ assert isLongRunningConversation();
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ assert PERSISTED.equals(invokeAction("#{artistHome.persist}"));
+ assert ((Integer) 0).equals(getValue("#{artistHome.instance.bandMembers.size}"));
+ }
+
+ }.run();
+
+ new FacesRequest("/artists.xhtml", cid)
+ {
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert new Long("7").equals(getValue("#{artists.resultCount}"));
+ assert NEW_BAND_NAME.equals(getValue("#{artists.resultList[3].name}"));
+ assert ARTIST4_NAME.equals(getValue("#{artists.resultList[4].name}"));
+ }
+
+ }.run();
+ }
+
+ @Test
+ public void testAddBandMember() throws Exception
+ {
+ final String cid = new FacesRequest("/artist.xhtml")
+ {
+ @Override
+ protected void beforeRequest()
+ {
+ setParameter("artistId", "1");
+ setParameter("conversationPropagation", "join");
+ }
+
+ @Override
+ protected void updateModelValues() throws Exception {
+ setValue("#{identity.username}", USERNAME);
+ setValue("#{identity.password}", PASSWORD);
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ invokeAction("#{identity.login}");
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert ARTIST1_NAME.equals(getValue("#{artist.name}"));
+ assert ((Integer) 3).equals(getValue("#{artist.bandMembers.size}"));
+ }
+ }.run();
+
+ new FacesRequest("/artist.xhtml", cid)
+ {
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ assert null == invokeAction("#{artistHome.addBandMember}");
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert ((Integer) 4).equals(getValue("#{artist.bandMembers.size}"));
+ }
+
+ }.run();
+
+ new FacesRequest("/artist.xhtml", cid)
+ {
+
+ @Override
+ protected void updateModelValues() throws Exception
+ {
+ setValue("#{artist.bandMembers[3].name}", NEW_BANDMEMBER_NAME);
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ assert "updated" == invokeAction("#{artistHome.update}");
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert ((Integer) 4).equals(getValue("#{artist.size}"));
+ assert NEW_BANDMEMBER_NAME.equals(getValue("#{artist.bandMembers[3].name}"));
+ }
+
+ }.run();
+
+ }
+
+ @Test
+ public void testBandMemberFinder() throws Exception
+ {
+ new NonFacesRequest("/artist.xhtml")
+ {
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ List<BandMember> bandMembers = (List<BandMember>) invokeMethod("#{bandMemberFinder.getBandMembers('R')}");
+ assert bandMembers.size() == 1;
+ assert BANDMEMBER3_VALUE.equals(bandMembers.get(0).getName());
+ }
+
+ }.run();
+ }
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/EditDiscTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/EditDiscTest.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/EditDiscTest.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,184 @@
+/**
+ *
+ */
+package org.jboss.seam.example.seamdiscs.test;
+
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.ARTIST6_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.DISC4_ARTIST;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.DISC4_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.DISC4_NEW_DESCRIPTION;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.NEW_DISC_NAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.PASSWORD;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.USERNAME;
+
+import javax.faces.model.DataModel;
+
+import org.jboss.seam.example.seamdiscs.model.Artist;
+import org.jboss.seam.example.seamdiscs.model.Disc;
+import org.jboss.seam.mock.DBUnitSeamTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Pete Muir
+ *
+ */
+public class EditDiscTest extends DBUnitSeamTest{
+
+ @Override
+ protected void prepareDBUnitOperations() {
+ beforeTestOperations.add(
+ new DataSetOperation("org/jboss/seam/example/seamdiscs/test/BaseData.xml")
+ );
+ }
+
+ @Test
+ public void testEditDisc() throws Exception
+ {
+ final String cid = new FacesRequest("/disc.xhtml")
+ {
+ @Override
+ protected void beforeRequest()
+ {
+ setParameter("discId", "4");
+ setParameter("conversationPropagation", "join");
+ }
+
+ @Override
+ protected void updateModelValues() throws Exception {
+ setValue("#{identity.username}", USERNAME);
+ setValue("#{identity.password}", PASSWORD);
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ invokeAction("#{identity.login}");
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert (Boolean) getValue("#{identity.loggedIn}");
+ assert ((Integer) 4).equals(getValue("#{discHome.id}"));
+ assert DISC4_NAME.equals(getValue("#{disc.name}"));
+ assert getValue("#{disc.description}") == null;
+ assert isLongRunningConversation();
+ assert (Boolean) getValue("#{discHome.managed}");
+
+ }
+ }.run();
+
+ new FacesRequest("/disc.xhtml", cid)
+ {
+
+ @Override
+ protected void updateModelValues() throws Exception
+ {
+ setValue("#{disc.description}", DISC4_NEW_DESCRIPTION);
+ // Simulate the entity converter
+ setValue("#{exampleArtist.name}", ARTIST6_NAME);
+ Artist artist = (Artist) getValue("#{artists.singleResult}");
+ setValue("#{disc.artist}", artist);
+ assert isLongRunningConversation();
+ assert cid.equals(getConversationId());
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ assert "updated".equals(invokeAction("#{discHome.update}"));
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert DISC4_NEW_DESCRIPTION.equals(getValue("#{disc.description"));
+ assert DISC4_ARTIST.equals(getValue("#{disc.artist.name}"));
+ assert isLongRunningConversation();
+ }
+
+ }.run();
+ }
+
+ @Test
+ public void testAddDisc() throws Exception
+ {
+ final String cid = new FacesRequest("/disc.xhtml")
+ {
+ @Override
+ protected void beforeRequest()
+ {
+ setParameter("conversationPropagation", "join");
+ }
+
+ @Override
+ protected void updateModelValues() throws Exception {
+ setValue("#{identity.username}", USERNAME);
+ setValue("#{identity.password}", PASSWORD);
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ invokeAction("#{identity.login}");
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert (Boolean) getValue("#{identity.loggedIn}");
+ assert null == getValue("#{discHome.id}");
+ assert null == getValue("#{disc.name}");
+ assert isLongRunningConversation();
+ assert (!(Boolean) getValue("#{discHome.managed}"));
+ }
+ }.run();
+
+ new FacesRequest("/disc.xhtml", cid)
+ {
+
+ @Override
+ protected void updateModelValues() throws Exception
+ {
+ setValue("#{disc.name}", NEW_DISC_NAME);
+ assert isLongRunningConversation();
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ assert "persisted".equals(invokeAction("#{discHome.persist}"));
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert NEW_DISC_NAME.equals(getValue("#{disc.name}"));
+ }
+
+ }.run();
+
+ new FacesRequest("/discs.xhtml", cid)
+ {
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert new Long("7").equals(getValue("#{discs.resultCount}"));
+ assertDisc((DataModel) getValue("#{discs.dataModel}"), 4, NEW_DISC_NAME);
+ assertDisc((DataModel) getValue("#{discs.dataModel}"), 5, DISC4_NAME);
+ }
+
+ }.run();
+ }
+
+ private void assertDisc(DataModel dataModel, int row, String discName)
+ {
+ dataModel.setRowIndex(row);
+ Object rowData = dataModel.getRowData();
+ assert rowData instanceof Disc;
+ Disc disc = (Disc) rowData;
+ assert discName.equals(disc.getName());
+ }
+
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/LoginTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/LoginTest.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/LoginTest.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,116 @@
+package org.jboss.seam.example.seamdiscs.test;
+
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.PASSWORD;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.USERNAME;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.WRONG_PASSWORD;
+import static org.jboss.seam.example.seamdiscs.test.TestStrings.WRONG_USERNAME;
+
+import org.jboss.seam.mock.DBUnitSeamTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author Pete Muir
+ *
+ */
+public class LoginTest extends DBUnitSeamTest {
+
+ @Override
+ protected void prepareDBUnitOperations() {
+ beforeTestOperations.add(
+ new DataSetOperation("org/jboss/seam/example/seamdiscs/test/BaseData.xml")
+ );
+ }
+
+ @Test
+ public void testLogin() throws Exception
+ {
+ new FacesRequest("/login.xhtml")
+ {
+
+ @Override
+ protected void updateModelValues() throws Exception {
+ setValue("#{identity.username}", USERNAME);
+ setValue("#{identity.password}", PASSWORD);
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ invokeAction("#{identity.login}");
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert (Boolean) getValue("#{identity.loggedIn}");
+ }
+ }.run();
+
+ new FacesRequest("/login.xhtml")
+ {
+
+ @Override
+ protected void updateModelValues() throws Exception {
+ setValue("#{identity.username}", USERNAME);
+ setValue("#{identity.password}", WRONG_PASSWORD);
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ invokeAction("#{identity.login}");
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert !((Boolean) getValue("#{identity.loggedIn}"));
+ }
+ }.run();
+
+ new FacesRequest("/login.xhtml")
+ {
+
+ @Override
+ protected void updateModelValues() throws Exception {
+ setValue("#{identity.username}", WRONG_USERNAME);
+ setValue("#{identity.password}", PASSWORD);
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ invokeAction("#{identity.login}");
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert !((Boolean) getValue("#{identity.loggedIn}"));
+ }
+ }.run();
+
+ new FacesRequest("/login.xhtml")
+ {
+
+ @Override
+ protected void updateModelValues() throws Exception {
+ setValue("#{identity.username}", WRONG_USERNAME);
+ setValue("#{identity.password}", WRONG_PASSWORD);
+ }
+
+ @Override
+ protected void invokeApplication() throws Exception
+ {
+ invokeAction("#{identity.login}");
+ }
+
+ @Override
+ protected void renderResponse() throws Exception
+ {
+ assert !((Boolean) getValue("#{identity.loggedIn}"));
+ }
+ }.run();
+ }
+
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/TestStrings.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/TestStrings.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/TestStrings.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,54 @@
+/**
+ *
+ */
+package org.jboss.seam.example.seamdiscs.test;
+
+/**
+ * @author Pete Muir
+ *
+ */
+public class TestStrings {
+
+ public static final String USERNAME = "administrator";
+ public static final String PASSWORD = "administrator";
+ public static final String WRONG_USERNAME = "wrongUsername";
+ public static final String WRONG_PASSWORD = "wrongPassword";
+
+
+ public static final String ARTIST1_NAME = "Pink Floyd";
+ public static final String ARTIST2_NAME = "Fairport Convention";
+ public static final String ARTIST3_NAME = "Bob Dylan";
+ public static final String ARTIST4_NAME = "Led Zepplin";
+ public static final String ARTIST5_NAME = "Ry Cooder";
+ public static final String ARTIST6_NAME = "Richard Thompson";
+ public static final String ARTIST_NEW_DESCRIPTION = "A great band";
+ public static final String NEW_ARTIST_NAME = "Pete Muir";
+
+
+
+ public static final String NEW_DISC_NAME = "Pete Muir's Debut Album";
+ public static final String DISC1_NAME = "Dark Side of the Moon";
+ public static final String DISC1_ARTIST = ARTIST1_NAME;
+ public static final String DISC2_NAME = "Liege and Lief";
+ public static final String DISC2_ARTIST = ARTIST2_NAME;
+ public static final String DISC3_NAME = "The Wall";
+ public static final String DISC3_ARTIST = ARTIST1_NAME;
+ public static final String DISC4_NAME = "The Freewheelin' Bob Dylan";
+ public static final String DISC4_ARTIST = ARTIST3_NAME;
+ public static final String DISC4_NEW_DESCRIPTION = "A classic album";
+ public static final String DISC5_NAME = "Blood on the Tracks";
+ public static final String DISC5_ARTIST = ARTIST3_NAME;
+ public static final String DISC6_NAME = "Chavez Ravine";
+ public static final String DISC6_ARTIST = ARTIST5_NAME;
+
+ public static final String NEW_BAND_NAME = "Pete Muir's Band";
+ public static final String NEW_BANDMEMBER_NAME = "Gavin King";
+ public static final String BANDMEMBER3_VALUE = "Roger Waters";
+
+ public static final String PERSISTED = "persisted";
+ public static final String UPDATED = "updated";
+
+
+
+
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/selenium/ArtistsTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/selenium/ArtistsTest.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/selenium/ArtistsTest.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,140 @@
+/*
+ * 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.seamdiscs.test.selenium;
+
+import java.text.MessageFormat;
+
+import static org.testng.AssertJUnit.assertTrue;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * This class tests artists management in SeamDiscs application
+ * @author Ondrej Skutka
+ *
+ */
+public class ArtistsTest extends SeleniumSeamDiscsTest
+{
+
+ @Override
+ @BeforeMethod
+ public void setUp()
+ {
+ super.setUp();
+ browser.clickAndWait(MANAGE_ARTISTS);
+ }
+
+ @Test(dependsOnMethods = {"createWithDiscsTest"})
+ public void paginationTest()
+ {
+ findAndClickArtist("Fairport Convention"); // should be on second page
+ checkDisc(1, "Liege and Lief", "", "The first folk-rock album ever made in the UK, this was the only studio recording of the classic line up of Sandy Denny, Richard Thompson, Dave Swarbick, Ashley Hutchings and Simon Nicol");
+ }
+
+ @Test(dependsOnMethods = {"addBandTest"})
+ public void filterTest()
+ {
+ browser.type(ARTIST_FILTER, "Fairport");
+ browser.keyUp(ARTIST_FILTER, "t"); // to trigger ajax search
+ sleep(3000);
+ browser.clickAndWait(ARTISTS_FIRST_ARTIST_LINK);
+ checkDisc(1, "Liege and Lief", "", "The first folk-rock album ever made in the UK, this was the only studio recording of the classic line up of Sandy Denny, Richard Thompson, Dave Swarbick, Ashley Hutchings and Simon Nicol");
+ }
+
+ @Test()
+ public void createWithDiscsTest()
+ {
+ browser.clickAndWait(CREATE_ARTIST_BUTTON);
+ browser.type(ARTIST_NAME, "Lou Reed");
+ browser.type(ARTIST_DESCRIPTION, "First came to prominence as the guitarist and principal singer-songwriter of The Velvet Underground. Than began a long and eclectic solo career.");
+ createDisc("Metal Machine Music", "1975");
+ createDisc("Sally Can't Dance", "1974");
+ createDisc("Rock and Roll Heart", "1977");
+ browser.clickAndWait(ARTIST_PERSIST);
+ assertTrue("Cannot create artist with discs", browser.isTextPresent("Successfully created"));
+
+ findAndClickArtist("Lou Reed");
+
+ // check whether it is the Lou Reed
+ assertTrue("This artist is not Lou Reed!", browser.getAttribute(ARTIST_NAME + "@value").equals("Lou Reed"));
+
+ // check discs (they should be sorted by release date)
+ checkDisc(1, "Sally Can't Dance", "1974", EMPTY_DISC_DESCRIPTION);
+ checkDisc(2, "Metal Machine Music", "1975", EMPTY_DISC_DESCRIPTION);
+ checkDisc(3, "Rock and Roll Heart", "1977", EMPTY_DISC_DESCRIPTION);
+ }
+
+// TODO check creating empty disc
+
+
+ @Test(dependsOnMethods = {"createWithDiscsTest"})
+ public void editDiscsTest()
+ {
+ // correct Rock and Roll Heart releas date
+ findAndClickArtist("Lou Reed");
+ browser.type(MessageFormat.format(ARTIST_NTH_DISC_YEAR, "last()"), "1976");
+
+ browser.clickAndWait(ARTIST_UPDATE);
+ findAndClickArtist("Lou Reed");
+
+ checkDisc(1, "Sally Can't Dance", "1974", EMPTY_DISC_DESCRIPTION);
+ checkDisc(2, "Metal Machine Music", "1975", EMPTY_DISC_DESCRIPTION);
+ checkDisc(3, "Rock and Roll Heart", "1976", EMPTY_DISC_DESCRIPTION); // this was altered
+ }
+
+ @Test(dependsOnMethods = {"createWithDiscsTest"})
+ public void addBandTest()
+ {
+ browser.clickAndWait(CREATE_BAND_BUTTON);
+ browser.type(ARTIST_NAME, "The Velvet Underground");
+ browser.type(ARTIST_DESCRIPTION, "An underground band.");
+ createDisc("White Light/White Heat", "1968");
+ createDisc("The Velvet Underground and Nico", "1967");
+
+ addBandMember("Lou Reed");
+ addBandMember("Sterling Morrison");
+ addBandMember("John Cale");
+ addBandMember("Maureen Tucker");
+ addBandMember("Nico");
+
+ browser.clickAndWait(ARTIST_PERSIST);
+ assertTrue("Cannot create artist with discs", browser.isTextPresent("Successfully created"));
+
+ findAndClickArtist("The Velvet Underground");
+
+ // check whether it is the Lou Reed
+ assertTrue("This artist is not the Velvet Underground!", browser.getAttribute(ARTIST_NAME + "@value").equals("The Velvet Underground"));
+
+ // check discs (they should be sorted by release date)
+ checkDisc(1, "The Velvet Underground and Nico", "1967", EMPTY_DISC_DESCRIPTION);
+ checkDisc(2, "White Light/White Heat", "1968", EMPTY_DISC_DESCRIPTION);
+
+ checkBandMember(1, "Lou Reed");
+ checkBandMember(2, "Sterling Morrison");
+ checkBandMember(3, "John Cale");
+ checkBandMember(4, "Maureen Tucker");
+ checkBandMember(5, "Nico");
+ }
+
+
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/selenium/DiscsTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/selenium/DiscsTest.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/selenium/DiscsTest.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,159 @@
+/*
+ * 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.seamdiscs.test.selenium;
+
+import static org.testng.AssertJUnit.assertTrue;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * This class tests artists management in SeamDiscs application
+ * @author Ondrej Skutka
+ *
+ */
+public class DiscsTest extends SeleniumSeamDiscsTest
+{
+
+ @Override
+ @BeforeMethod
+ public void setUp()
+ {
+ super.setUp();
+ browser.clickAndWait(MANAGE_DISCS);
+ }
+
+ @Test(dependsOnMethods = {"editDiscTest"})
+ public void discPaginationTest()
+ {
+ findAndClickDisc("Rock and Roll Heart"); // should not be on the first page
+ checkDiscDetail("Rock and Roll Heart", "1976", "A sensitive and revealing look into the prince of darkness.", "Lou Reed");
+ }
+
+
+ @Test(dependsOnMethods = {"editDiscsTest"})
+ public void editDiscTest()
+ {
+ // correct Rock and Roll Heart description
+ findAndClickDisc("Rock and Roll Heart"); // should not be on the first page
+ checkDiscDetail("Rock and Roll Heart", "1976", "", "Lou Reed");
+
+ browser.type(DISC_DETAIL_DESCRIPTION, "A sensitive and revealing look into the prince of darkness.");
+
+ browser.clickAndWait(DISC_DETAIL_UPDATE);
+
+ findAndClickDisc("Rock and Roll Heart");
+ checkDiscDetail("Rock and Roll Heart", "1976", "A sensitive and revealing look into the prince of darkness.", "Lou Reed");
+
+ // check whether it's ok from the artists' perspective
+ browser.clickAndWait(MANAGE_ARTISTS);
+
+ findAndClickArtist("Lou Reed");
+
+ // check whether it is the Lou Reed
+ assertTrue("This artist is not Lou Reed!", browser.getAttribute(ARTIST_NAME + "@value").equals("Lou Reed"));
+
+ // check discs (they should be sorted by release date)
+ checkDisc(1, "Sally Can't Dance", "1974", EMPTY_DISC_DESCRIPTION);
+ checkDisc(2, "Metal Machine Music", "1975", EMPTY_DISC_DESCRIPTION);
+ checkDisc(3, "Rock and Roll Heart", "1976", "A sensitive and revealing look into the prince of darkness.");
+ }
+
+ @Test(dependsOnMethods = {"editDiscTest"})
+ public void addDiscTest()
+ {
+ browser.clickAndWait(CREATE_DISC_BUTTON);
+ browser.type(DISC_DETAIL_TITLE, "Berlin");
+ browser.select(DISC_DETAIL_ARTIST, "Lou Reed");
+ browser.type(DISC_DETAIL_RELEASE_DATE, "1973");
+ browser.type(DISC_DETAIL_DESCRIPTION, "A tragic rock opera about a doomed couple that addresses themes of drug use and depression.");
+ browser.clickAndWait(DISC_DETAIL_PERSIST);
+ assertTrue("Cannot create disc", browser.isTextPresent("Successfully created"));
+
+ // check whether it's ok from the artists' perspective
+ browser.clickAndWait(MANAGE_ARTISTS);
+
+ findAndClickArtist("Lou Reed");
+
+ // check whether it is the Lou Reed
+ assertTrue("This artist is not Lou Reed!", browser.getAttribute(ARTIST_NAME + "@value").equals("Lou Reed"));
+
+ // check discs (they should be sorted by release date)
+ checkDisc(1, "Berlin", "1973", "A tragic rock opera about a doomed couple that addresses themes of drug use and depression.");
+ checkDisc(2, "Sally Can't Dance", "1974", EMPTY_DISC_DESCRIPTION);
+ checkDisc(3, "Metal Machine Music", "1975", EMPTY_DISC_DESCRIPTION);
+ checkDisc(4, "Rock and Roll Heart", "1976", "A sensitive and revealing look into the prince of darkness.");
+ }
+
+
+ @Test(dependsOnMethods = {"addDiscTest"})
+ public void removeDiscTest()
+ {
+ // correct Rock and Roll Heart description
+ findAndClickDisc("Berlin");
+ checkDiscDetail("Berlin", "1973", "A tragic rock opera about a doomed couple that addresses themes of drug use and depression.", "Lou Reed");
+
+ browser.clickAndWait(DISC_DETAIL_REMOVE);
+
+ // check whether it's ok from the artists' perspective
+ browser.clickAndWait(MANAGE_ARTISTS);
+
+ findAndClickArtist("Lou Reed");
+
+ // check whether it is the Lou Reed
+ assertTrue("This artist is not Lou Reed!", browser.getAttribute(ARTIST_NAME + "@value").equals("Lou Reed"));
+
+ // check discs (they should be sorted by release date)
+ checkDisc(1, "Sally Can't Dance", "1974", EMPTY_DISC_DESCRIPTION);
+ checkDisc(2, "Metal Machine Music", "1975", EMPTY_DISC_DESCRIPTION);
+ checkDisc(3, "Rock and Roll Heart", "1976", "A sensitive and revealing look into the prince of darkness.");
+ }
+
+ @Test(dependsOnMethods = {"removeDiscTest"})
+ public void cancelDiscTest()
+ {
+ // correct Rock and Roll Heart description
+ findAndClickDisc("Rock and Roll Heart"); // should not be on the first page
+ checkDiscDetail("Rock and Roll Heart", "1976", "A sensitive and revealing look into the prince of darkness.", "Lou Reed");
+
+ browser.type(DISC_DETAIL_DESCRIPTION, "Pretty lame album.");
+
+ browser.clickAndWait(DISC_DETAIL_CANCEL);
+
+ findAndClickDisc("Rock and Roll Heart");
+ checkDiscDetail("Rock and Roll Heart", "1976", "A sensitive and revealing look into the prince of darkness.", "Lou Reed");
+
+ // check whether it's ok from the artists' perspective
+ browser.clickAndWait(MANAGE_ARTISTS);
+
+ findAndClickArtist("Lou Reed");
+
+ // check whether it is the Lou Reed
+ assertTrue("This artist is not Lou Reed!", browser.getAttribute(ARTIST_NAME + "@value").equals("Lou Reed"));
+
+ // check discs (they should be sorted by release date)
+ checkDisc(1, "Sally Can't Dance", "1974", EMPTY_DISC_DESCRIPTION);
+ checkDisc(2, "Metal Machine Music", "1975", EMPTY_DISC_DESCRIPTION);
+ checkDisc(3, "Rock and Roll Heart", "1976", "A sensitive and revealing look into the prince of darkness.");
+ }
+
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/selenium/SeleniumSeamDiscsTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/selenium/SeleniumSeamDiscsTest.java (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/java/org/jboss/seam/example/seamdiscs/test/selenium/SeleniumSeamDiscsTest.java 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,236 @@
+/*
+ * 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.seamdiscs.test.selenium;
+
+import java.text.MessageFormat;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+import com.thoughtworks.selenium.SeleniumException;
+
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.fail;
+
+/**
+ *
+ * @author Ondrej Skutka
+ *
+ */
+public abstract class SeleniumSeamDiscsTest extends SeamSeleniumTest
+{
+ // TODO final
+ public static String LOGIN = "id=loginlink";
+ public static String LOGOUT = "id=logout";
+ public static String LOGIN_USERNAME = "id=login:username";
+ public static String LOGIN_PASSWORD = "id=login:password";
+ public static String LOGIN_LOGIN = "id=login:loginbutton";
+ public static String HOME_URL = "/home.seam";
+// public static String SECURITY = "id=security";
+//
+ public static String MANAGE_DISCS = "id=manageDiscs";
+ public static String CREATE_ARTIST_BUTTON = "id=addArtist";
+ public static String CREATE_BAND_BUTTON = "id=addBand";
+ public static String ARTIST_FILTER = "//form[1]//input[@type='text']";
+ public static String ARTIST_NAME = "id=artist:name";
+ public static String ARTIST_CREATE_DISC_BUTTON = "id=artist:addDisc";
+ public static String ARTIST_DESCRIPTION = "id=artist:description";
+ public static String ARTIST_PERSIST = "id=artist:persist";
+ public static String ARTIST_UPDATE = "id=artist:update";
+ public static String ARTIST_CANCEL = "id=artist:cancel";
+ public static String ARTIST_ADD_BAND_MEMBER = "id=artist:addBandMember";
+ public static String ARTIST_NTH_BAND_MEMBER = "xpath=id(\"artist\")//tr[1]//tr[3]/td[2]//ul/li[{0}]//input[@type=\"text\"]";
+ public static String ARTIST_LAST_BAND_MEMBER = MessageFormat.format(ARTIST_NTH_BAND_MEMBER, "last()");
+
+
+ public static String ARTIST_NTH_DISC = "xpath=id(\"artist:discs\")/table/tbody/tr/td/table/tbody/tr[{0}]";
+ public static String ARTIST_NTH_DISC_SHOW_DETAILS = ARTIST_NTH_DISC + "/td[1]/div/a[2]";
+ public static String ARTIST_NTH_DISC_NAME = ARTIST_NTH_DISC + "/td[2]/input";
+ public static String ARTIST_NTH_DISC_YEAR = ARTIST_NTH_DISC + "/td[3]//input";
+ public static String ARTIST_NTH_DISC_DETAIL = ARTIST_NTH_DISC + "/td";
+ public static String ARTISTS_FIRST_ARTIST_LINK = "xpath=id(\"artists\")//table/tbody/tr/td/table/tbody/tr[2]/td[2]/a";
+ public static String ARTISTS_NEXT_PAGE_LINK = "xpath=id(\"artists\")//td[1]//td[2]//td[5]/a";
+ public static String ARTIST_TABLE_ROW_BY_NAME = "xpath=id(\"artists\")//tr[normalize-space(td/a/text())=\"{0}\"]";
+ // these locators can only be used catenated with ARTIST_TABLE_ROW_BY_NAME
+ public static String ARTIST_TABLE_ROW_LINK = ARTIST_TABLE_ROW_BY_NAME + "/td[2]/a";
+
+
+ public static String MANAGE_ARTISTS = "id=manageArtists";
+ public static String CREATE_DISC_BUTTON = "id=addDisc";
+ public static String DISC_DETAIL_TITLE = "xpath=id(\"disc\")//tr//tr[2]/td[2]/input";
+ public static String DISC_DETAIL_RELEASE_DATE = "xpath=id(\"disc\")//tr//tr[3]/td[2]//input";
+ public static String DISC_DETAIL_ARTIST = "xpath=id(\"disc\")//tr//tr[4]//select";
+ public static String DISC_DETAIL_DESCRIPTION = "id=description";
+ public static String DISC_DETAIL_UPDATE = "id=update";
+ public static String DISC_DETAIL_PERSIST = "id=persist";
+ public static String DISC_DETAIL_REMOVE = "id=remove";
+ public static String DISC_DETAIL_CANCEL = "id=cancel";
+ public static String DISCS_NEXT_PAGE_LINK = "xpath=id(\"discs\")//td[1]//td[2]//td[5]/a";
+ public static String DISC_TABLE_ROW_BY_NAME = "xpath=id(\"discs\")//tr[normalize-space(td/a/text())=\"{0}\"]";
+ // these locators can only be used catenated with DISC_TABLE_ROW_BY_NAME
+ public static String DISC_TABLE_ROW_LINK = DISC_TABLE_ROW_BY_NAME + "/td[2]/a";
+
+ public static String EMPTY_DISC_DESCRIPTION = "None known";
+
+ public static String DEFAULT_USERNAME = "administrator";
+ public static String DEFAULT_PASSWORD = "administrator";
+
+ @Override
+ @BeforeMethod
+ public void setUp() {
+ super.setUp();
+ browser.open(CONTEXT_PATH + HOME_URL);
+ if (!isLoggedIn()) {
+ login();
+ }
+ }
+
+ public void login() {
+ login(DEFAULT_USERNAME, DEFAULT_PASSWORD);
+ }
+
+ public void login(String username, String password) {
+ browser.clickAndWait(LOGIN);
+ browser.type(LOGIN_USERNAME, username);
+ browser.type(LOGIN_PASSWORD, password);
+ browser.clickAndWait(LOGIN_LOGIN);
+ }
+
+ protected boolean isLoggedIn()
+ {
+ return !browser.isElementPresent(LOGIN) && browser.isElementPresent(LOGOUT);
+ }
+
+ /**
+ * Checks whether specified disc contains expected data.
+ */
+ protected void checkDisc(int tableRow, String expectedDiscTitle, String expectedReleaseDate, String expectedDescription) {
+ tableRow++; // first row is header
+ String actualDiscTitle = browser.getAttribute(MessageFormat.format(ARTIST_NTH_DISC_NAME, tableRow) + "@value");
+ assertTrue("This is not expected (" + expectedDiscTitle + ") album (" + actualDiscTitle + ")!", actualDiscTitle.equals(expectedDiscTitle));
+
+ String actualReleaseDate = "";
+ if (browser.isElementPresent(MessageFormat.format(ARTIST_NTH_DISC_YEAR, tableRow))) {
+ try {
+ actualReleaseDate = browser.getAttribute(MessageFormat.format(ARTIST_NTH_DISC_YEAR, tableRow) + "@value");
+ } catch (SeleniumException ex) {
+ // intentianally left blank
+ }
+ assertTrue("This is not expected (" + expectedReleaseDate + ") release date (" + actualReleaseDate + ")!", actualReleaseDate.equals(expectedReleaseDate));
+ }
+
+ browser.clickAndWait(MessageFormat.format(ARTIST_NTH_DISC_SHOW_DETAILS, tableRow));
+ String actualDescription = browser.getText(MessageFormat.format(ARTIST_NTH_DISC_DETAIL, tableRow + 1));
+ assertTrue("This is not expected (" + expectedDescription + ") description (" + actualDescription + ")!", actualDescription.equals(expectedDescription));
+ browser.clickAndWait(MessageFormat.format(ARTIST_NTH_DISC_SHOW_DETAILS, tableRow));
+ }
+
+ /**
+ * Checks whether specified disc contains expected data.
+ */
+ protected void checkDiscDetail(String expectedDiscTitle, String expectedReleaseDate, String expectedDescription, String expectedArtist) {
+ String actualDiscTitle = browser.getAttribute(DISC_DETAIL_TITLE + "@value");
+ assertTrue("This is not expected (" + expectedDiscTitle + ") album: (" + actualDiscTitle + ")!", actualDiscTitle.equals(expectedDiscTitle));
+
+ String actualReleaseDate = "";
+ if (browser.isElementPresent(DISC_DETAIL_RELEASE_DATE + "/attribute::value")) {
+ actualReleaseDate = browser.getAttribute(DISC_DETAIL_RELEASE_DATE + "@value");
+ assertTrue("This is not expected (" + expectedReleaseDate + ") release date: (" + actualReleaseDate + ")!", actualReleaseDate.equals(expectedReleaseDate));
+ }
+
+ String actualDescription = browser.getText(DISC_DETAIL_DESCRIPTION);
+ assertTrue("This is not expected (" + expectedDescription + ") description: (" + actualDescription + ")!", actualDescription.equals(expectedDescription));
+
+ String actualArtist = browser.getSelectedLabel(DISC_DETAIL_ARTIST);
+ assertTrue("This is not expected (" + expectedArtist + ") artist: (" + actualArtist + ")!", actualArtist.equals(expectedArtist));
+ }
+
+ /**
+ * Creates new disc.
+ * Expected to be on artist's edit page.
+ *
+ */
+ protected void createDisc(String title, String year) {
+ browser.clickAndWait(ARTIST_CREATE_DISC_BUTTON);
+ browser.type(MessageFormat.format(ARTIST_NTH_DISC_NAME, "last()"), title);
+ browser.type(MessageFormat.format(ARTIST_NTH_DISC_YEAR, "last()"), year);
+ }
+
+ /**
+ * Finds the specified artist in paginated artists page and clicks it.
+ * Expected to be on artists page.
+ *
+ */
+ protected void findAndClickArtist(String artistName) {
+ // find the artist's page (it's paginated) and click it
+ String expectedArtist = MessageFormat.format(ARTIST_TABLE_ROW_BY_NAME, artistName);
+ while (!browser.isElementPresent(expectedArtist)) { // click through pages
+ assertTrue("Artist " + artistName + " not found.", browser.isElementPresent(ARTISTS_NEXT_PAGE_LINK));
+ browser.click(ARTISTS_NEXT_PAGE_LINK); // ajax
+ sleep(3000);
+ }
+
+ browser.clickAndWait(MessageFormat.format(ARTIST_TABLE_ROW_LINK, artistName)); // click artist link
+ }
+
+ /**
+ * Finds the specified disc in paginated discs page and clicks it.
+ * Expected to be on discs page.
+ *
+ */
+ protected void findAndClickDisc(String discName) {
+ // find the disc page (it's paginated) and click it
+ String expectedDisc = MessageFormat.format(DISC_TABLE_ROW_BY_NAME, discName);
+ while (!browser.isElementPresent(expectedDisc)) { // click through pages
+ assertTrue("Disc " + discName + " not found.", browser.isElementPresent(DISCS_NEXT_PAGE_LINK));
+ browser.click(DISCS_NEXT_PAGE_LINK); // ajax
+ sleep(3000);
+ }
+
+ browser.clickAndWait(MessageFormat.format(DISC_TABLE_ROW_LINK, discName)); // click disc link
+ }
+
+ /**
+ * @param in milliseconds
+ *
+ */
+ protected void sleep(int milliseconds) {
+ try {
+ Thread.sleep(milliseconds); // TODO how to do this properly?
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+
+ }
+
+ protected void addBandMember(String artistName) {
+ browser.clickAndWait(ARTIST_ADD_BAND_MEMBER);
+ browser.type(ARTIST_LAST_BAND_MEMBER, artistName);
+ }
+
+ /**
+ * Checks whether specified disc contains expected data.
+ */
+ protected void checkBandMember(int tableRow, String expectedBandMember) {
+ String actualMemberName = browser.getAttribute(MessageFormat.format(ARTIST_NTH_BAND_MEMBER, tableRow) + "@value");
+ assertTrue("This is not expected (" + expectedBandMember + ") album (" + actualMemberName + ")!", actualMemberName.equals(expectedBandMember));
+ }
+}
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/WEB-INF/components.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/WEB-INF/components.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+ xmlns:core="http://jboss.com/products/seam/core"
+ xmlns:security="http://jboss.com/products/seam/security"
+ xmlns:persistence="http://jboss.com/products/seam/persistence"
+ xmlns:web="http://jboss.com/products/seam/web"
+ xmlns:framework="http://jboss.com/products/seam/framework"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.3.xsd
+ http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.3.xsd
+ http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.3.xsd
+ http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.3.xsd
+ http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.3.xsd
+ http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-2.3.xsd">
+
+ <core:init debug="false" jndi-pattern="#{ejbName}/local" />
+
+ <core:manager concurrent-request-timeout="500"
+ conversation-timeout="120000"
+ conversation-id-parameter="cid"/>
+
+ <persistence:managed-persistence-context name="entityManager"
+ auto-create="true"
+ persistence-unit-jndi-name="java:/seamdiscsEntityManagerFactory" />
+
+ <security:identity
+ authenticate-method="#{authenticator.authenticate}" />
+
+ <event type="org.jboss.seam.security.notLoggedIn">
+ <action execute="#{redirect.captureCurrentView}"/>
+ </event>
+
+ <event type="org.jboss.seam.security.loginSuccessful">
+ <action execute="#{redirect.returnToCapturedView}"/>
+ </event>
+
+ <framework:entity-query name="discs" ejbql="select disc from Disc disc" order="disc.name ASC" max-results="5"/>
+
+ <framework:entity-query name="artists" ejbql="select artist from Artist artist" order="artist.name DESC" max-results="5">
+ <framework:restrictions>
+ <value>lower(artist.name) like lower(concat(#{exampleArtist.name}, '%'))</value>
+ </framework:restrictions>
+ </framework:entity-query>
+
+ <framework:entity-query name="allArtists" ejbql="select artist from Artist artist" order="artist.name"/>
+
+ <framework:entity-home entity-class="org.jboss.seam.example.seamdiscs.model.Disc" name="discHome"/>
+
+ <factory name="disc" value="#{discHome.instance}"/>
+
+ <component name="exampleArtist" class="org.jboss.seam.example.seamdiscs.model.Artist" scope="session" />
+
+</components>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/org/jboss/seam/example/seamdiscs/test/BaseData.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/org/jboss/seam/example/seamdiscs/test/BaseData.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/org/jboss/seam/example/seamdiscs/test/BaseData.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+
+<dataset>
+
+ <ARTIST
+ id="1"
+ dtype="Band"
+ name="Pink Floyd" />
+
+ <ARTIST
+ id="2"
+ dtype="Band"
+ name="Fairport Convention" />
+
+ <ARTIST
+ id="3"
+ dtype="Artist"
+ name="Bob Dylan" />
+
+ <ARTIST
+ id="4"
+ dtype="Band"
+ name="Led Zepplin" />
+
+ <ARTIST
+ id="5"
+ dtype="Artist"
+ name="Ry Cooder" />
+
+ <ARTIST
+ id="6"
+ dtype="Artist"
+ name="Richard Thompson" />
+
+ <DISC
+ id="1"
+ name="Dark Side of the Moon"
+ artist_id="1" />
+
+ <DISC
+ id="2"
+ name="Liege and Lief"
+ artist_id="2" />
+
+ <DISC
+ id="3"
+ name="The Wall"
+ artist_id="1" />
+
+ <DISC
+ id="4"
+ name="The Freewheelin' Bob Dylan"
+ artist_id="3" />
+
+ <DISC
+ id="5"
+ name="Blood on the Tracks"
+ artist_id="3" />
+
+ <DISC
+ id="6"
+ name="Chavez Ravine"
+ artist_id="5" />
+
+ <BANDMEMBER
+ id="1"
+ name="Syd Barett"
+ band_id="1" />
+
+ <BANDMEMBER
+ id="2"
+ name="David Gilmour"
+ band_id="1" />
+
+ <BANDMEMBER
+ id="3"
+ name="Roger Waters"
+ band_id="1" />
+
+ <USER
+ id="1"
+ username="administrator"
+ password="administrator" />
+
+</dataset>
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/seam.properties
===================================================================
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/seambay.properties
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/seambay.properties (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources/seambay.properties 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,69 @@
+HOME_PAGE /home.seam
+DEBUG_PAGE debug.seam
+REGISTRATION_PAGE register.seam
+LOGIN id=login
+LOGOUT id=logout
+REGISTRATION id=register
+SELL id=sell
+LOGIN_URL login.seam
+LOGIN_USERNAME id=login:username
+LOGIN_PASSWORD id=login:password
+LOGIN_SUBMIT id=login:submit
+REGISTRATION_USERNAME id=registration:username
+REGISTRATION_PASSWORD id=registration:password
+REGISTRATION_VERIFY id=registration:confirm
+REGISTRATION_LOCATION id=registration:location
+REGISTRATION_SUBMIT id=registration:submit
+REGISTRATION_CONFIRM_MESSAGE id=registration:confirmMessage
+SELL_LINK id=sell
+REGISTRATION_URL register.seam
+ITEMDETAIL_URL itemdetail
+AUCTION_URL auction.seam
+SELL_1_URL sell.seam
+SELL_2_URL sell2.seam
+SELL_3_URL sell3.seam
+SELL_4_URL sell4.seam
+SELL_5_URL sell5.seam
+SELL_PREVIEW_URL preview.seam
+SELL_PREVIEW_PRICE id=price
+SELL_PREVIEW_DESCRIPTION id=description
+SELL_TITLE id=sellForm:title
+SELL_DURATION id=sellForm:duration
+SELL_PRICE id=sellForm:price
+SELL_DESCRIPTION id=sellForm:description
+SELL_NEXT id=sellForm:next
+SELL_CONFIRM id=sellForm:confirm
+SELL_CATEGORY_SELECT id=rootCategory
+SELL_CATEGORY_SELECT_SECOND_OPTION xpath\=id("rootCategory")/option[14] \# availability of second option indicates that category list has been loaded (2)
+SELL_SUBCATEGORY_SELECT id\=tier2
+
+SEARCH_FIELD id=search:searchTerm
+SEARCH_SUBMIT id=search:submit
+SEARCH_RESULTS_COUNT //table[@id='auctions']/tbody/tr
+SEARCH_RESULTS_FIRST_ROW_LINK //table[@id='auctions']/tbody/tr[1]/td[2]/a
+
+ITEM_NEW_BID_FIELD id=newBid:bidAmount
+ITEM_NEW_BID_SUBMIT id=newBid:placeBidWithAmount
+ITEM_NEW_BID_LINK id=bid:placeBid
+ITEM_BID_HISTORY id=bidHistory
+BID_INCREASE_FIELD id=increaseBid:bidAmount
+BID_INCREASE_SUBMIT id=increaseBid:bidAgain
+
+BID_CONFIRM id=confirm:confirmBid
+BID_HISTORY_COUNT //table[@id='history']/tbody/tr
+BID_HISTORY_COUNT_EMPTY //table[@id='history']/tbody/tr/td[not(text())]
+BID_OUTBID id=outbid
+BID_HIGH_BIDDER id\=highBidder
+BID_HISTORY_BACK id\=back
+LIST_CATEGORIES_RESPONSE=<ns2\:listCategoriesResponse xmlns\:ns2\="http\://seambay.example.seam.jboss.org/"><return><categoryId>1</categoryId><name>Antiques</name></return><return><categoryId>2</categoryId><name>Art</name></return><return><categoryId>3</categoryId><name>Books</name></return><return><categoryId>4</categoryId><name>Cameras and Photography</name></return><return><categoryId>5</categoryId><name>Cars and Boats</name></return><return><categoryId>6</categoryId><name>Cell Phones</name></return><return><categoryId>7</categoryId><name>Clothing and Shoes</name></return><return><categoryId>8</categoryId><name>Computers</name></return><return><categoryId>9</categoryId><name>Music</name></return><return><categoryId>10</categoryId><name>Electronics</name></return><return><categoryId>11</categoryId><name>Home and Garden</name></return><return><categoryId>12</categoryId><name>Musical Instruments</name></return><return><categoryId>13</categoryId><name>Sporting goods</name></!
return><return><categoryId>14</categoryId><name>Toys</name></return><return><categoryId>15</categoryId><name>Video Games</name></return><return><categoryId>1001</categoryId><name>Furniture</name><parent><categoryId>1</categoryId><name>Antiques</name></parent></return><return><categoryId>1002</categoryId><name>Silverware</name><parent><categoryId>1</categoryId><name>Antiques</name></parent></return><return><categoryId>2001</categoryId><name>Paintings</name><parent><categoryId>2</categoryId><name>Art</name></parent></return><return><categoryId>2002</categoryId><name>Prints</name><parent><categoryId>2</categoryId><name>Art</name></parent></return><return><categoryId>2003</categoryId><name>Sculptures</name><parent><categoryId>2</categoryId><name>Art</name></parent></return><return><categoryId>3001</categoryId><name>Fiction</name><parent><categoryId>3</categoryId><name>Books</name></parent></return><return><categoryId>3002</categoryId><name>Non Fiction</name><parent><categoryId>!
3</categoryId><name>Books</name></parent></return><return><cat!
egoryId>
3003</categoryId><name>Comic Books</name><parent><categoryId>3</categoryId><name>Books</name></parent></return><return><categoryId>3004</categoryId><name>Children</name><parent><categoryId>3</categoryId><name>Books</name></parent></return><return><categoryId>4001</categoryId><name>Digital Cameras</name><parent><categoryId>4</categoryId><name>Cameras and Photography</name></parent></return><return><categoryId>4002</categoryId><name>Memory Cards</name><parent><categoryId>4</categoryId><name>Cameras and Photography</name></parent></return><return><categoryId>4003</categoryId><name>Film Cameras</name><parent><categoryId>4</categoryId><name>Cameras and Photography</name></parent></return><return><categoryId>4004</categoryId><name>Video Cameras</name><parent><categoryId>4</categoryId><name>Cameras and Photography</name></parent></return><return><categoryId>5001</categoryId><name>Cars</name><parent><categoryId>5</categoryId><name>Cars and Boats</name></parent></return><return><cate!
goryId>5002</categoryId><name>Motorcycles</name><parent><categoryId>5</categoryId><name>Cars and Boats</name></parent></return><return><categoryId>5003</categoryId><name>Car Parts</name><parent><categoryId>5</categoryId><name>Cars and Boats</name></parent></return><return><categoryId>6001</categoryId><name>Mobile Phones</name><parent><categoryId>6</categoryId><name>Cell Phones</name></parent></return><return><categoryId>6002</categoryId><name>Mobile Accessories</name><parent><categoryId>6</categoryId><name>Cell Phones</name></parent></return><return><categoryId>6003</categoryId><name>Prepaid cards</name><parent><categoryId>6</categoryId><name>Cell Phones</name></parent></return><return><categoryId>7001</categoryId><name>Women</name><parent><categoryId>7</categoryId><name>Clothing and Shoes</name></parent></return><return><categoryId>7002</categoryId><name>Men</name><parent><categoryId>7</categoryId><name>Clothing and Shoes</name></parent></return><return><categoryId>7003</c!
ategoryId><name>Girls</name><parent><categoryId>7</categoryId>!
<name>Cl
othing and Shoes</name></parent></return><return><categoryId>7004</categoryId><name>Boys</name><parent><categoryId>7</categoryId><name>Clothing and Shoes</name></parent></return><return><categoryId>7005</categoryId><name>Babies</name><parent><categoryId>7</categoryId><name>Clothing and Shoes</name></parent></return><return><categoryId>8001</categoryId><name>Notebooks</name><parent><categoryId>8</categoryId><name>Computers</name></parent></return><return><categoryId>8002</categoryId><name>Desktop PCs</name><parent><categoryId>8</categoryId><name>Computers</name></parent></return><return><categoryId>8003</categoryId><name>Servers</name><parent><categoryId>8</categoryId><name>Computers</name></parent></return><return><categoryId>8004</categoryId><name>Hardware</name><parent><categoryId>8</categoryId><name>Computers</name></parent></return><return><categoryId>8005</categoryId><name>Software</name><parent><categoryId>8</categoryId><name>Computers</name></parent></return><return><!
categoryId>9001</categoryId><name>CDs</name><parent><categoryId>9</categoryId><name>Music</name></parent></return><return><categoryId>9002</categoryId><name>Records</name><parent><categoryId>9</categoryId><name>Music</name></parent></return><return><categoryId>10001</categoryId><name>Home Audio</name><parent><categoryId>10</categoryId><name>Electronics</name></parent></return><return><categoryId>10002</categoryId><name>MP3 Players</name><parent><categoryId>10</categoryId><name>Electronics</name></parent></return><return><categoryId>10003</categoryId><name>Television</name><parent><categoryId>10</categoryId><name>Electronics</name></parent></return><return><categoryId>10004</categoryId><name>Home theatre</name><parent><categoryId>10</categoryId><name>Electronics</name></parent></return><return><categoryId>11001</categoryId><name>Kitchen</name><parent><categoryId>11</categoryId><name>Home and Garden</name></parent></return><return><categoryId>11002</categoryId><name>Real Esta!
te</name><parent><categoryId>11</categoryId><name>Home and Gar!
den</nam
e></parent></return><return><categoryId>11003</categoryId><name>Furniture</name><parent><categoryId>11</categoryId><name>Home and Garden</name></parent></return><return><categoryId>12001</categoryId><name>Guitars</name><parent><categoryId>12</categoryId><name>Musical Instruments</name></parent></return><return><categoryId>12002</categoryId><name>Pianos and Keyboards</name><parent><categoryId>12</categoryId><name>Musical Instruments</name></parent></return><return><categoryId>12003</categoryId><name>Percussion</name><parent><categoryId>12</categoryId><name>Musical Instruments</name></parent></return><return><categoryId>12004</categoryId><name>Orchestral</name><parent><categoryId>12</categoryId><name>Musical Instruments</name></parent></return><return><categoryId>13001</categoryId><name>Golf</name><parent><categoryId>13</categoryId><name>Sporting goods</name></parent></return><return><categoryId>13002</categoryId><name>Fishing</name><parent><categoryId>13</categoryId><name>Spo!
rting goods</name></parent></return><return><categoryId>13003</categoryId><name>Tennis</name><parent><categoryId>13</categoryId><name>Sporting goods</name></parent></return><return><categoryId>14001</categoryId><name>Remote control</name><parent><categoryId>14</categoryId><name>Toys</name></parent></return><return><categoryId>14002</categoryId><name>Cars and trucks</name><parent><categoryId>14</categoryId><name>Toys</name></parent></return><return><categoryId>14003</categoryId><name>Dolls</name><parent><categoryId>14</categoryId><name>Toys</name></parent></return><return><categoryId>14004</categoryId><name>Educational</name><parent><categoryId>14</categoryId><name>Toys</name></parent></return><return><categoryId>15001</categoryId><name>PC</name><parent><categoryId>15</categoryId><name>Video Games</name></parent></return><return><categoryId>15002</categoryId><name>Nintendo Wii</name><parent><categoryId>15</categoryId><name>Video Games</name></parent></return><return><categor!
yId>15003</categoryId><name>Sony Playstation 3</name><parent><!
category
Id>15</categoryId><name>Video Games</name></parent></return><return><categoryId>15004</categoryId><name>XBox 360</name><parent><categoryId>15</categoryId><name>Video Games</name></parent></return></ns2\:listCategoriesResponse>
+LOGIN_RIGHT_RESPONSE=<return>true</return>
+CREATE_NEW_AUCTION_RESPONSE_JBOSS_56=<ns2\:createAuctionResponse xmlns\:ns2\="http\://seambay.example.seam.jboss.org/"/>
+CREATE_NEW_AUCTION_RESPONSE_JBOSS_4=<createAuctionResponse xmlns="http\://seambay.example.seam.jboss.org/"/>
+
+FIND_AUCTIONS_RESPONSE=<description>You can buy an animal here</description>
+UPDATE_AUCTION_RESPONSE=<ns2\:updateAuctionDetailsResponse xmlns\:ns2\="http\://seambay.example.seam.jboss.org/"/>
+SET_DURATION_RESPONSE=<ns2\:setAuctionDurationResponse xmlns\:ns2\="http\://seambay.example.seam.jboss.org/"/>
+SET_STARTING_PRICE_RESPONSE=<ns2\:setAuctionPriceResponse xmlns\:ns2\="http\://seambay.example.seam.jboss.org/"/>
+AUCTION_DETAILS_PRICE_RESPONSE=<ns2\:getNewAuctionDetailsResponse xmlns\:ns2\="http\://seambay.example.seam.jboss.org/"><return><account><accountId>1</accountId><feedbackPercent>0.0</feedbackPercent><feedbackScore>0</feedbackScore><location>Sydney, NSW, Australia</location>
+LOGOUT_RESPONSE=<ns2\:logoutResponse xmlns\:ns2\="http\://seambay.example.seam.jboss.org/"><return>true</return></ns2\:logoutResponse>
+CONFIRMATION_RESPONSE=<env\:Body><ns2\:confirmAuctionResponse xmlns\:ns2\="http\://seambay.example.seam.jboss.org/"/></env\:Body>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-ftest/testng.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-ftest/testng.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-ftest/testng.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,32 @@
+<!--
+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.
+-->
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+<suite name="Seamdiscs example" verbose="2" parallel="false">
+ <test name="seamdiscs_tests">
+ <parameter name="PROPERTY_FILE" value="" />
+ <classes>
+<!-- <class name="org.jboss.seam.example.seamdiscs.test.selenium.LoginTest" /> -->
+ <class name="org.jboss.seam.example.seamdiscs.test.selenium.ArtistsTest" />
+<!-- <class name="org.jboss.seam.example.seamdiscs.test.selenium.DiscsTest" /> -->
+ </classes>
+ </test>
+</suite>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-integration/testng.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-integration/testng.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-tests/src/test/resources-integration/testng.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,39 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+<suite name="SeamDiscs" verbose="2" parallel="false">
+ <test name="SeamDiscs Artist Tests">
+
+ <parameter name="datasourceJndiName" value="java:/seamdiscsDatasource"/>
+ <parameter name="database" value="HSQL" />
+
+ <classes>
+ <class name="org.jboss.seam.example.seamdiscs.test.DisplayArtistTest" />
+ <class name="org.jboss.seam.example.seamdiscs.test.EditArtistTest" />
+ </classes>
+
+ </test>
+
+ <test name="SeamDiscs Disc Tests">
+
+ <parameter name="datasourceJndiName" value="java:/seamdiscsDatasource"/>
+ <parameter name="database" value="HSQL" />
+ <parameter name="binaryDir" value="" />
+
+ <classes>
+ <class name="org.jboss.seam.example.seamdiscs.test.DisplayDiscTest" />
+ <class name="org.jboss.seam.example.seamdiscs.test.EditDiscTest" />
+ </classes>
+
+ </test>
+
+ <test name="SeamDiscs Login Test">
+
+ <parameter name="datasourceJndiName" value="java:/seamdiscsDatasource"/>
+ <parameter name="database" value="HSQL" />
+ <parameter name="binaryDir" value="" />
+
+ <classes>
+ <class name="org.jboss.seam.example.seamdiscs.test.LoginTest" />
+ </classes>
+
+ </test>
+</suite>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/pom.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/pom.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>seamdiscs</artifactId>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <version>2.3.0.Beta2-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.jboss.seam.examples-ee6.seamdiscs</groupId>
+ <artifactId>seamdiscs-web</artifactId>
+ <packaging>war</packaging>
+ <name>Seamdiscs Web Module</name>
+
+ <properties>
+ <!-- filtering property for components.xml -->
+ <jndiPattern>java:app/seamdiscs-ejb/#{ejbName}</jndiPattern>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.seam.examples-ee6.seamdiscs</groupId>
+ <artifactId>seamdiscs-ejb</artifactId>
+ <type>ejb</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-ui</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-jul</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jboss-seam</artifactId>
+ <groupId>org.jboss.seam</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-debug</artifactId>
+ <exclusions>
+ <exclusion>
+ <artifactId>jboss-seam</artifactId>
+ <groupId>org.jboss.seam</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.trinidad</groupId>
+ <artifactId>trinidad-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-components-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.myfaces.trinidad</groupId>
+ <artifactId>trinidad-api</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>src/main/webapp</directory>
+ <filtering>true</filtering>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/resources/messages_en.properties
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/resources/messages_en.properties (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/resources/messages_en.properties 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,119 @@
+org.jboss.seam.example.seamdiscs.model.Artist=Solo Artist
+org.jboss.seam.example.seamdiscs.model.Band=Band
+
+up=\u2191
+down=\u2193
+left=\u2039
+right=\u203A
+
+validator.assertFalse=validation failed
+validator.assertTrue=validation failed
+validator.future=must be a future date
+validator.length=length must be between {min} and {max}
+validator.max=must be less than or equal to {value}
+validator.min=must be greater than or equal to {value}
+validator.notNull=may not be null
+validator.past=must be a past date
+validator.pattern=must match "{regex}"
+validator.range=must be between {min} and {max}
+validator.size=size must be between {min} and {max}
+validator.email=must be a well-formed email address
+
+org.jboss.seam.loginFailed=Login failed
+org.jboss.seam.loginSuccessful=Welcome, #0
+
+org.jboss.seam.TransactionFailed=Transaction failed
+org.jboss.seam.NoConversation=The conversation ended, timed out or was processing another request
+org.jboss.seam.IllegalNavigation=Illegal navigation
+org.jboss.seam.ProcessEnded=Process #0 already ended
+org.jboss.seam.ProcessNotFound=Process #0 not found
+org.jboss.seam.TaskEnded=Task #0 already ended
+org.jboss.seam.TaskNotFound=Task #0 not found
+org.jboss.seam.NotLoggedIn=Please log in first
+
+javax.faces.component.UIInput.CONVERSION=value could not be converted to the expected type
+javax.faces.component.UIInput.REQUIRED=value is required
+javax.faces.component.UIInput.UPDATE=an error occurred when processing your submitted information
+javax.faces.component.UISelectOne.INVALID=value is not valid
+javax.faces.component.UISelectMany.INVALID=value is not valid
+
+javax.faces.converter.BigDecimalConverter.DECIMAL=value must be a number
+javax.faces.converter.BigDecimalConverter.DECIMAL_detail=value must be a signed decimal number consisting of zero or more digits, optionally followed by a decimal point and fraction, eg. {1}
+javax.faces.converter.BigIntegerConverter.BIGINTEGER=value must be an integer
+javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail=value must be a signed integer number consisting of zero or more digits
+javax.faces.converter.BooleanConverter.BOOLEAN=value must be true or false
+javax.faces.converter.BooleanConverter.BOOLEAN_detail=value must be true or false (any value other than true will evaluate to false)
+javax.faces.converter.ByteConverter.BYTE=value must be a number between 0 and 255
+javax.faces.converter.ByteConverter.BYTE_detail=value must be a number between 0 and 255
+javax.faces.converter.CharacterConverter.CHARACTER=value must be a character
+javax.faces.converter.CharacterConverter.CHARACTER_detail=value must be a valid ASCII character
+javax.faces.converter.DateTimeConverter.DATE=value must be a date
+javax.faces.converter.DateTimeConverter.DATE_detail=value must be a date, eg. {1}
+javax.faces.converter.DateTimeConverter.TIME=value must be a time
+javax.faces.converter.DateTimeConverter.TIME_detail=value must be a time, eg. {1}
+javax.faces.converter.DateTimeConverter.DATETIME=value must be a date and time
+javax.faces.converter.DateTimeConverter.DATETIME_detail=value must be a date and time, eg. {1}
+javax.faces.converter.DateTimeConverter.PATTERN_TYPE=a pattern or type attribute must be specified to convert the value
+javax.faces.converter.DoubleConverter.DOUBLE=value must be a number
+javax.faces.converter.DoubleConverter.DOUBLE_detail=value must be a number between 4.9E-324 and 1.7976931348623157E308
+javax.faces.converter.EnumConverter.ENUM=value must be convertible to an enum
+javax.faces.converter.EnumConverter.ENUM_detail=value must be convertible to an enum or from the enum that contains the constant {1}
+javax.faces.converter.EnumConverter.ENUM_NO_CLASS=value must be convertible to an enum or from the enum, but no enum class provided
+javax.faces.converter.EnumConverter.ENUM_NO_CLASS_detail=value must be convertible to an enum or from the enum, but no enum class provided
+javax.faces.converter.FloatConverter.FLOAT=value must be a number
+javax.faces.converter.FloatConverter.FLOAT_detail=value must be a number between 1.4E-45 and 3.4028235E38
+javax.faces.converter.IntegerConverter.INTEGER=value must be an integer
+javax.faces.converter.IntegerConverter.INTEGER_detail=value must be an integer number between -2147483648 and 2147483647
+javax.faces.converter.LongConverter.LONG=value must be an integer
+javax.faces.converter.LongConverter.LONG_detail=must be an integer number between -9223372036854775808 and 9223372036854775807
+javax.faces.converter.NumberConverter.CURRENCY=value must be a currency amount
+javax.faces.converter.NumberConverter.CURRENCY_detail=value must be a currency amount, eg. {1}
+javax.faces.converter.NumberConverter.PERCENT=value must be a percentage amount
+javax.faces.converter.NumberConverter.PERCENT_detail=value must be a percentage amount, eg. {1}
+javax.faces.converter.NumberConverter.NUMBER=value must be a number
+javax.faces.converter.NumberConverter.NUMBER_detail=value must be a number
+javax.faces.converter.NumberConverter.PATTERN=value must be a number
+javax.faces.converter.NumberConverter.PATTERN_detail=value must be a number
+javax.faces.converter.ShortConverter.SHORT=value must be an integer
+javax.faces.converter.ShortConverter.SHORT_detail=value must be an integer number between -32768 and 32767
+
+javax.faces.validator.DoubleRangeValidator.MAXIMUM=value must be less than or equal to {0}
+javax.faces.validator.DoubleRangeValidator.MINIMUM=value must be greater than or equal to {0}
+javax.faces.validator.DoubleRangeValidator.NOT_IN_RANGE=value must be between {0} and {1}
+javax.faces.validator.DoubleRangeValidator.TYPE=value is not of the correct type
+javax.faces.validator.LengthValidator.MAXIMUM=value is must be shorter than or equal to {0} characters
+javax.faces.validator.LengthValidator.MINIMUM=value is must be longer than or equal to {0} characters
+javax.faces.validator.LongRangeValidator.MAXIMUM=value must be less than or equal to {0}
+javax.faces.validator.LongRangeValidator.MINIMUM=value must be greater than or equal to {0}
+javax.faces.validator.LongRangeValidator.NOT_IN_RANGE=value must be between {0} and {1}
+javax.faces.validator.LongRangeValidator.TYPE=value is not of the correct type
+
+javax.faces.validator.NOT_IN_RANGE=value must be between {0} and {1}
+javax.faces.converter.STRING=value could not be converted to a string
+
+#JSF 1.1:
+javax.faces.convert.BigDecimalConverter.CONVERSION value must be a number
+javax.faces.convert.BigDecimalConverter.CONVERSION_detail value must be a number
+javax.faces.convert.BigIntegerConverter.CONVERSION value must be an integre
+javax.faces.convert.BigIntegerConverter.CONVERSION_detail value must be a number
+javax.faces.convert.BooleanConverter.CONVERSION value must be true or false
+javax.faces.convert.BooleanConverter.CONVERSION_detail value must be true or false
+javax.faces.convert.ByteConverter.CONVERSION value must be a byte
+javax.faces.convert.ByteConverter.CONVERSION_detail value must be a byte
+javax.faces.convert.CharacterConverter.CONVERSION value must be a character
+javax.faces.convert.CharacterConverter.CONVERSION_detail value must be a character
+javax.faces.convert.DateTimeConverter.CONVERSION value must be a datetime
+javax.faces.convert.DateTimeConverter.CONVERSION_detail value must be a datetime
+javax.faces.convert.DoubleConverter.CONVERSION value must be a number
+javax.faces.convert.DoubleConverter.CONVERSION_detail value must be a number
+javax.faces.convert.FloatConverter.CONVERSION value must be a number
+javax.faces.convert.FloatConverter.CONVERSION_detail value must be a number
+javax.faces.convert.IntegerConverter.CONVERSION value must be an integer
+javax.faces.convert.IntegerConverter.CONVERSION_detail value must be an integer
+javax.faces.convert.LongConverter.CONVERSION value must be an integer
+javax.faces.convert.LongConverter.CONVERSION_detail value must be a long integer
+javax.faces.convert.NumberConverter.CONVERSION value must be a number
+javax.faces.convert.NumberConverter.CONVERSION_detail value must be a number
+javax.faces.convert.ShortConverter.CONVERSION value must be an integer
+javax.faces.convert.ShortConverter.CONVERSION_detail value must be a short integer
+descriptionError=Less than #{disc.name}
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/components.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/components.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<components xmlns="http://jboss.com/products/seam/components"
+ xmlns:core="http://jboss.com/products/seam/core"
+ xmlns:security="http://jboss.com/products/seam/security"
+ xmlns:persistence="http://jboss.com/products/seam/persistence"
+ xmlns:web="http://jboss.com/products/seam/web"
+ xmlns:framework="http://jboss.com/products/seam/framework"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.3.xsd
+ http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.3.xsd
+ http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.3.xsd
+ http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.3.xsd
+ http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.3.xsd
+ http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-2.3.xsd">
+
+ <core:init debug="false" jndi-pattern="@jndiPattern@" />
+
+ <core:manager concurrent-request-timeout="500"
+ conversation-timeout="120000"
+ conversation-id-parameter="cid"/>
+
+ <persistence:managed-persistence-context name="entityManager"
+ auto-create="true"
+ persistence-unit-jndi-name="java:/seamdiscsEntityManagerFactory" />
+
+ <security:identity
+ authenticate-method="#{authenticator.authenticate}" />
+
+ <event type="org.jboss.seam.security.notLoggedIn">
+ <action execute="#{redirect.captureCurrentView}"/>
+ </event>
+
+ <event type="org.jboss.seam.security.loginSuccessful">
+ <action execute="#{redirect.returnToCapturedView}"/>
+ </event>
+
+ <framework:entity-query name="discs" ejbql="select disc from Disc disc" order="disc.name ASC" max-results="5"/>
+
+ <framework:entity-query name="artists" ejbql="select artist from Artist artist" order="artist.name DESC" max-results="5">
+ <framework:restrictions>
+ <value>lower(artist.name) like lower(concat(#{exampleArtist.name}, '%'))</value>
+ </framework:restrictions>
+ </framework:entity-query>
+
+ <framework:entity-query name="allArtists" ejbql="select artist from Artist artist" order="artist.name"/>
+
+ <framework:entity-home entity-class="org.jboss.seam.example.seamdiscs.model.Disc" name="discHome"/>
+
+ <factory name="disc" value="#{discHome.instance}"/>
+
+ <component name="exampleArtist" class="org.jboss.seam.example.seamdiscs.model.Artist" scope="session" />
+
+</components>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/faces-config.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/faces-config.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<faces-config version="2.1" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd">
+
+ <application>
+ <!-- Use the Trinidad RenderKit -->
+ <default-render-kit-id>org.apache.myfaces.trinidad.core</default-render-kit-id>
+ </application>
+
+</faces-config>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/pages.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/pages.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/pages.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<pages xmlns="http://jboss.com/products/seam/pages"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.3.xsd"
+
+ no-conversation-view-id="/home.xhtml"
+ login-view-id="/login.xhtml">
+
+ <page view-id="*">
+ <navigation>
+ <rule if-outcome="home">
+ <redirect view-id="/home.xhtml"/>
+ </rule>
+ </navigation>
+ </page>
+
+ <exception class="org.jboss.seam.framework.EntityNotFoundException">
+ <redirect view-id="/error.xhtml">
+ <message>Not found</message>
+ </redirect>
+ </exception>
+
+ <exception class="javax.persistence.EntityNotFoundException">
+ <redirect view-id="/error.xhtml">
+ <message>Not found</message>
+ </redirect>
+ </exception>
+
+ <exception class="javax.persistence.OptimisticLockException">
+ <end-conversation/>
+ <redirect view-id="/error.xhtml">
+ <message>Another user changed the same data, please try again</message>
+ </redirect>
+ </exception>
+
+ <exception class="org.jboss.seam.security.AuthorizationException">
+ <redirect>
+ <message>You don't have permission to do this</message>
+ </redirect>
+ </exception>
+
+ <exception class="org.jboss.seam.security.NotLoggedInException">
+ <redirect view-id="/login.xhtml">
+ <message>Please log in first</message>
+ </redirect>
+ </exception>
+
+ <exception>
+ <redirect view-id="/error.xhtml">
+ <message>Unexpected error, please try again</message>
+ </redirect>
+ </exception>
+
+</pages>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/trinidad-config.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/trinidad-config.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/trinidad-config.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<trinidad-config xmlns="http://myfaces.apache.org/trinidad/config">
+ <!-- Disable client validation, I don't like it -->
+ <client-validation-disabled>true</client-validation-disabled>
+ <!-- Use our own skin, vaguely like the a4j blueSky skin -->
+ <skin-family>seamdiscs</skin-family>
+ <!-- Enable debug output here -->
+ <debug-output>false</debug-output>
+ <!-- Improve a4j compatibility -->
+ <accessibility-mode>inaccessible</accessibility-mode>
+</trinidad-config>
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/trinidad-skins.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/trinidad-skins.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/trinidad-skins.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,10 @@
+<skins xmlns="http://myfaces.apache.org/trinidad/skin">
+ <skin>
+ <id>seamdiscs.desktop</id>
+ <family>seamdiscs</family>
+ <render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>
+ <style-sheet-name>stylesheet/skin.css</style-sheet-name>
+ <bundle-name>messages</bundle-name>
+
+ </skin>
+</skins>
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/WEB-INF/web.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+ <!-- JSF -->
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <!-- Facelets development mode (disable in production) -->
+ <context-param>
+ <param-name>javax.faces.PROJECT_STAGE</param-name>
+ <param-value>Development</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.apache.myfaces.trinidad.CACHE_VIEW_ROOT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.skin</param-name>
+ <param-value>blueSky</param-value>
+ </context-param>
+ <filter>
+ <filter-name>Seam Filter</filter-name>
+ <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
+ </filter>
+ <filter>
+ <filter-name>Trinidad</filter-name>
+ <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>Seam Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>Trinidad</filter-name>
+ <url-pattern>*.seam</url-pattern>
+ </filter-mapping>
+ <!-- Seam -->
+ <listener>
+ <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>Trinidad Resources</servlet-name>
+ <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <url-pattern>/seam/resource/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.seam</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Trinidad Resources</servlet-name>
+ <url-pattern>/adf/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artist.page.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artist.page.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artist.page.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<page xmlns="http://jboss.com/products/seam/pages"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.3.xsd">
+
+ <param name="artistId" value="#{artistHome.id}"
+ converterId="javax.faces.Integer" />
+ <navigation>
+ <rule if-outcome="cancel">
+ <end-conversation />
+ <redirect view-id="/artists.xhtml" />
+ </rule>
+ <rule if-outcome="updated">
+ <end-conversation />
+ <redirect view-id="/artists.xhtml" />
+ </rule>
+ <rule if-outcome="persisted">
+ <end-conversation />
+ <redirect view-id="/artists.xhtml" />
+ </rule>
+ </navigation>
+</page>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artist.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artist.xhtml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artist.xhtml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,85 @@
+<!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:s="http://jboss.com/products/seam/taglib"
+ 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:rich="http://richfaces.org/rich"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
+ xmlns:a="http://richfaces.org/a4j"
+ template="layout/template.xhtml">
+
+<ui:define name="body">
+
+ <rich:panel>
+ <f:facet name="header"><tr:outputText value="#{artist.name} (#{messages[artist.class.name]})" rendered="#{artist.name ne null}" /></f:facet>
+ <h:form id="artist">
+ <s:validateAll>
+ <tr:panelFormLayout>
+ <tr:inputText label="Artist" id="name" value="#{artist.name}" readOnly="#{not identity.loggedIn}" required="true"/>
+ <tr:panelLabelAndMessage label="Band Members" rendered="#{artist.class.simpleName eq 'Band'}">
+ <ul>
+ <ui:repeat value="#{artist.bandMembers}" var="bandMember">
+ <li>
+ <tr:inputText simple="true" value="#{bandMember.name}" readOnly="#{not identity.loggedIn}" id="bandMember"/>
+ <rich:autocomplete for="bandMember" selfRendered="true" minChars="3" suggestionAction="#{bandMemberFinder.getBandMembers}" var="bandMember">
+ <h:column>
+ <h:outputText value="#{bandMember.name}" />
+ </h:column>
+ </rich:autocomplete>
+ </li>
+ </ui:repeat>
+ </ul>
+ <f:facet name="end">
+ <h:commandButton id="addBandMember" action="#{artistHome.addBandMember}" value="Add Band Member" rendered="#{identity.loggedIn}"/>
+ </f:facet>
+ </tr:panelLabelAndMessage>
+ <tr:panelLabelAndMessage label="Details">
+ <tr:inputText simple="true" value="#{artist.description}" rendered="#{identity.loggedIn}" rows="4" columns="60" id="description">
+ <a:ajax event="keyup" render="description_preview" requestDelay="3000" ignoreDupResponces="true" eventsQueue="previewQueue" />
+ </tr:inputText>
+ <s:div style="width: 300px" id="description_preview">
+
+ <s:formattedText value="#{artist.description}" rendered="#{not empty artist.description}" />
+ <tr:outputText value="None known" rendered="#{empty artist.description}" />
+ </s:div>
+ </tr:panelLabelAndMessage>
+ <tr:panelLabelAndMessage label="Discs">
+ <tr:table value="#{artist.discs}" var="disc" rows="5" emptyText="None Known" id="discs">
+ <tr:column>
+ <f:facet name="header">
+ Disc
+ </f:facet>
+ <tr:inputText value="#{disc.name}" readOnly="#{not identity.loggedIn}"/>
+ </tr:column>
+ <tr:column>
+ <f:facet name="header">
+ Released
+ </f:facet>
+ <tr:inputNumberSpinbox label="Release Date" value="#{disc.release}" minimum="1900" maximum="2010" stepSize="1" readOnly="#{not identity.loggedIn}" />
+ </tr:column>
+ <f:facet name="detailStamp">
+ <s:div style="width: 300px;">
+ <s:formattedText value="#{disc.description}" rendered="#{not empty disc.description}" />
+ <tr:outputText value="None known" rendered="#{empty disc.description}" />
+ </s:div>
+ </f:facet>
+ </tr:table>
+ <f:facet name="end">
+ <h:commandButton id="addDisc" action="#{artistHome.addDisc}" value="Add Disc" rendered="#{identity.loggedIn}"/>
+ </f:facet>
+ </tr:panelLabelAndMessage>
+ </tr:panelFormLayout>
+ </s:validateAll>
+
+ <tr:panelButtonBar rendered="#{identity.loggedIn}">
+ <h:commandButton action="#{artistHome.update}" value="Save" rendered="#{artistHome.managed}" id="update"/>
+ <h:commandButton action="#{artistHome.persist}" value="Save" rendered="#{not artistHome.managed}" id="persist"/>
+ <s:button action="cancel" value="Cancel" id="cancel"/>
+ </tr:panelButtonBar>
+ </h:form>
+ </rich:panel>
+
+</ui:define>
+</ui:composition>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artists.page.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artists.page.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artists.page.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<page xmlns="http://jboss.com/products/seam/pages"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.3.xsd">
+
+ <param name="artistId" value="#{artistHome.id}"
+ converterId="javax.faces.Integer" />
+ <param name="type" value="#{artistHome.type}" />
+ <navigation>
+ <rule if-outcome="artist">
+ <begin-conversation flush-mode="manual" join="true" />
+ <redirect view-id="/artist.xhtml" />
+ </rule>
+ </navigation>
+</page>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artists.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artists.xhtml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/artists.xhtml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,79 @@
+<!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:s="http://jboss.com/products/seam/taglib"
+ 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:rich="http://richfaces.org/rich"
+ xmlns:a="http://richfaces.org/a4j"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
+ template="layout/template.xhtml">
+
+ <ui:define name="body">
+
+ <rich:panel>
+ <f:facet name="header">Artists</f:facet>
+ <tr:form>
+ <tr:inputText value="#{exampleArtist.name}" label="Filter by artist name">
+ <a:ajax render="artists" event="keyup" requestDelay="1" />
+ </tr:inputText>
+  
+ <a:status>
+ <f:facet name="start">
+ <h:graphicImage value="/img/spinner.gif" />
+ </f:facet>
+ </a:status>
+ </tr:form>
+
+ <a:outputPanel id="artists">
+ <tr:form>
+ <tr:table value="#{artists.dataModel}" var="artist"
+ rows="#{artists.maxResults}">
+ <tr:column sortable="true" sortProperty="artist.name">
+ <f:facet name="header">
+ Name
+ </f:facet>
+ <s:link action="artist">
+ <tr:outputText value="#{artist.name}" />
+ <f:param name="artistId" value="#{artist.id}" />
+ </s:link>
+ </tr:column>
+ <tr:column>
+ <f:facet name="header">
+ Band Members
+ </f:facet>
+ <tr:outputText value="Solo performer"
+ rendered="#{artist.class.simpleName eq 'Artist'}" />
+ <tr:outputText value="None"
+ rendered="#{artist.class.simpleName eq 'Band' and empty artist.bandMembers}" />
+ <rich:list value="#{artist.bandMembers}" var="bandMember"
+ rendered="#{artist.class.simpleName eq 'Band' and not empty artist.bandMembers}">
+ <tr:outputText value="#{bandMember.name}" />
+ </rich:list>
+ </tr:column>
+ <f:facet name="detailStamp">
+ <s:div style="width: 200px">
+ <s:formattedText value="#{artist.description}"
+ rendered="#{not empty artist.description}" />
+ <tr:outputText value="None known"
+ rendered="#{empty artist.description}" />
+ </s:div>
+ </f:facet>
+ </tr:table>
+ </tr:form>
+ </a:outputPanel>
+ <tr:panelButtonBar rendered="#{identity.loggedIn}">
+ <s:button action="artist" value="Add artist" id="addArtist">
+ <f:param name="artistId" value="" />
+ <f:param name="type" value="artist" />
+ </s:button>
+ <s:button action="artist" value="Add band" id="addBand">
+ <f:param name="artistId" value="" />
+ <f:param name="type" value="band" />
+ </s:button>
+ </tr:panelButtonBar>
+ </rich:panel>
+
+ </ui:define>
+</ui:composition>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/disc.page.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/disc.page.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/disc.page.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<page xmlns="http://jboss.com/products/seam/pages"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.3.xsd">
+
+
+ <param name="discId" value="#{discHome.id}"
+ converterId="javax.faces.Integer" />
+ <navigation>
+ <rule if-outcome="cancel">
+ <end-conversation />
+ <redirect view-id="/discs.xhtml" />
+ </rule>
+ <rule if-outcome="updated">
+ <end-conversation />
+ <redirect view-id="/discs.xhtml" />
+ </rule>
+ <rule if-outcome="persisted">
+ <end-conversation />
+ <redirect view-id="/discs.xhtml" />
+ </rule>
+ <rule if-outcome="removed">
+ <end-conversation />
+ <redirect view-id="/discs.xhtml" />
+ </rule>
+ </navigation>
+</page>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/disc.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/disc.xhtml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/disc.xhtml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,53 @@
+<!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:s="http://jboss.com/products/seam/taglib"
+ 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:rich="http://richfaces.org/rich"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
+ xmlns:a="http://richfaces.org/a4j"
+ template="layout/template.xhtml">
+
+<ui:define name="body">
+
+ <rich:panel>
+ <f:facet name="header">
+ <s:fragment rendered="#{disc.name ne null}">
+ <i><tr:outputText value="#{disc.name}" /></i>
+ <tr:outputText value=" by #{disc.artist.name}" />
+ </s:fragment>
+ </f:facet>
+ <tr:form id="disc">
+ <s:validateAll>
+ <tr:panelFormLayout>
+ <tr:inputText label="Disc" value="#{disc.name}" readOnly="#{not identity.loggedIn}" required="true" />
+ <tr:inputNumberSpinbox label="Release Date" value="#{disc.release}" minimum="1900" maximum="2010" stepSize="1" readOnly="#{not identity.loggedIn}" />
+ <tr:selectOneChoice value="#{disc.artist}" label="Artist" required="true" readOnly="#{not identity.loggedIn}">
+ <s:selectItems value="#{allArtists.resultList}" var="artist" label="#{artist.name}" noSelectionLabel="Please Select..." hideNoSelectionLabel="true" />
+ <s:convertEntity />
+ </tr:selectOneChoice>
+ <tr:panelLabelAndMessage label="Details">
+ <tr:inputText simple="true" value="#{disc.description}" rendered="#{identity.loggedIn}" rows="4" columns="60" id="description">
+ <a:ajax event="keyup" render="description_preview" requestDelay="3000" ignoreDupResponces="true" eventsQueue="previewQueue" />
+ </tr:inputText>
+ <s:div style="width: 300px;" id="description_preview">
+ <s:formattedText value="#{disc.description}" rendered="#{not empty disc.description}" />
+ <tr:outputText value="None known" rendered="#{empty disc.description}" />
+ </s:div>
+ </tr:panelLabelAndMessage>
+ </tr:panelFormLayout>
+ </s:validateAll>
+
+ <tr:panelButtonBar rendered="#{identity.loggedIn}">
+ <h:commandButton action="#{discHome.update}" value="Save" rendered="#{discHome.managed}" id="update" />
+ <h:commandButton action="#{discHome.persist}" value="Save" rendered="#{not discHome.managed}" id="persist" />
+ <h:commandButton action="#{discHome.remove}" value="Delete" rendered="#{discHome.managed}" id="remove" />
+ <s:button action="cancel" value="Cancel" id="cancel"/>
+ </tr:panelButtonBar>
+ </tr:form>
+ </rich:panel>
+
+</ui:define>
+</ui:composition>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/discs.page.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/discs.page.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/discs.page.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<page xmlns="http://jboss.com/products/seam/pages"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.3.xsd">
+
+ <param name="discId" value="#{discHome.id}"
+ converterId="javax.faces.Integer" />
+ <navigation>
+ <rule if-outcome="disc">
+ <begin-conversation flush-mode="manual" join="true" />
+ <redirect view-id="/disc.xhtml" />
+ </rule>
+ </navigation>
+</page>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/discs.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/discs.xhtml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/discs.xhtml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,49 @@
+<!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:s="http://jboss.com/products/seam/taglib"
+ 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:rich="http://richfaces.org/rich"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
+ template="layout/template.xhtml">
+
+<ui:define name="body">
+
+ <rich:panel id="discs">
+ <f:facet name="header">Discs</f:facet>
+ <tr:form>
+ <tr:table value="#{discs.dataModel}" var="disc" rows="#{discs.maxResults}">
+ <tr:column sortable="true" sortProperty="disc.name">
+ <f:facet name="header">
+ Name
+ </f:facet>
+ <s:link action="disc">
+ <tr:outputText value="#{disc.name}" />
+ <f:param name="discId" value="#{disc.id}" />
+ </s:link>
+ </tr:column>
+ <tr:column>
+ <f:facet name="header">
+ Artist
+ </f:facet>
+ <tr:outputText value="#{disc.artist.name}" />
+ </tr:column>
+ <f:facet name="detailStamp">
+ <s:div style="width: 200px">
+ <s:formattedText value="#{disc.description}" rendered="#{not empty disc.description}" />
+ <tr:outputText value="None known" rendered="#{empty disc.description}" />
+ </s:div>
+ </f:facet>
+ </tr:table>
+ <tr:panelButtonBar rendered="#{identity.loggedIn}">
+ <s:button action="disc" value="Add disc" id="addDisc">
+ <f:param name="discId" value="" />
+ </s:button>
+ </tr:panelButtonBar>
+ </tr:form>
+ </rich:panel>
+
+</ui:define>
+</ui:composition>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/error.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/error.xhtml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/error.xhtml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,16 @@
+<!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:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ template="layout/template.xhtml">
+
+<ui:define name="body">
+
+ <h1>Error</h1>
+ <p>Something bad happened :-(</p>
+
+</ui:define>
+</ui:composition>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/home.page.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/home.page.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/home.page.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<page xmlns="http://jboss.com/products/seam/pages"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.3.xsd">
+
+ <param name="artistId" value="#{artistHome.id}"
+ converterId="javax.faces.Integer" />
+ <param name="discId" value="#{discHome.id}"
+ converterId="javax.faces.Integer" />
+ <navigation>
+ <rule if-outcome="artist">
+ <begin-conversation flush-mode="manual" join="true" />
+ <redirect view-id="/artist.xhtml" />
+ </rule>
+ <rule if-outcome="disc">
+ <begin-conversation flush-mode="manual" join="true" />
+ <redirect view-id="/disc.xhtml" />
+ </rule>
+ </navigation>
+</page>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/home.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/home.xhtml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/home.xhtml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,58 @@
+<!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:s="http://jboss.com/products/seam/taglib"
+ 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:rich="http://richfaces.org/rich"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
+ template="layout/template.xhtml">
+
+<ui:define name="body">
+
+ <rich:panel>
+ <f:facet name="header">Welcome to Seam Discs!</f:facet>
+ <p>This application allows you to catalogue your favourite
+ bands, and albums they've released. It uses:</p>
+
+ <tr:panelList>
+ <h:outputText value="JBoss Seam" />
+ <h:outputText value="Apache MyFaces Trinidad" />
+ <h:outputText value="JBoss RichFaces" />
+ <h:outputText value="EJB3/JPA" />
+ <h:outputText value="Facelets" />
+ </tr:panelList>
+
+ <p>Use the links at the bottom of the screen to learn more about
+ the techniques used in creating this application.</p>
+
+ <p>You can log in as <code>administrator</code>/<code>administrator</code>.</p>
+ </rich:panel>
+ <rich:panel>
+ <f:facet name="header">
+ <tr:outputText value="Artists & Discs" />
+ </f:facet>
+
+ <tr:form>
+ <tr:tree value="#{artistHome.tree}" var="var">
+ <f:facet name="nodeStamp">
+ <ui:fragment>
+ <s:link action="disc" rendered="#{var.class.simpleName eq 'Disc'}">
+ <tr:outputText value="#{var.name}" />
+ <tr:outputText value=" (#{var.release})" rendered="#{var.release ne null}"/>
+ <f:param name="discId" value="#{var.id}" />
+ </s:link>
+ <s:link action="artist" rendered="#{var.class.simpleName eq 'Artist' or var.class.simpleName eq 'Band'}">
+ <tr:outputText value="#{var.name}" />
+ <f:param name="artistId" value="#{var.id}" />
+ </s:link>
+ </ui:fragment>
+ </f:facet>
+ </tr:tree>
+ </tr:form>
+
+ </rich:panel>
+
+</ui:define>
+</ui:composition>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/img/cal-next.png
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/img/cal-next.png (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/img/cal-next.png 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,6 @@
+�PNG
+
+
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/img/cal-prev.png
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/img/cal-prev.png (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/img/cal-prev.png 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,5 @@
+�PNG
+
+
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/img/dtpick.gif
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/img/dtpick.gif (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/img/dtpick.gif 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,2 @@
+GIF89a
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/img/spinner.gif
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/img/spinner.gif (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/img/spinner.gif 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,26 @@
+GIF89a
+3�ð�D��H$^��@���Pd���"U��P#�a��\;�̓�1�
+
+o�::0
+v@$|,3�_# d�53�"s5e!
+
+���8�3�b�4�k�
+K*: �u��#�@tX
+�!&0<U#'���h��m'�@Y��^h�a-k��(���.���N��|$C�f)@�f|!
+-�"�*6C��Ȁ*��+`j�4�2`� 5��X��p��� �h/H��`.� ��h����R"]SWB]�~����(!
+Uܑ���H
+����T@�F�`�B4�� ��A��bZ�bq����� ��� ���
+v��"�B���lp����Xb��ݤF��a��AA&*X�ǁ�(@�3��,�(
+}Q+> R!
+)`�L�
+?'I`�JG����bP����h�
+���X�B)0��X�Q#} No"tI+ZI!
+�!�MD�l!�4%�B��Be
+PDY00!
+\0�`UL"r(!
+�m�
+�A�72,
+��(PX鲪�� ��8@R%�a K�*���D�����2E{$��ft5�C%!
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/index.html
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/index.html (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/index.html 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,5 @@
+<html>
+<head>
+ <meta http-equiv="Refresh" content="0; URL=home.seam">
+</head>
+</html>
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/display.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/display.xhtml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/display.xhtml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,16 @@
+<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="prop">
+ <span class="name">
+ <ui:insert name="label"/>
+ </span>
+ <span class="value">
+ <ui:insert/>
+ </span>
+ </div>
+
+</ui:composition>
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/edit.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/edit.xhtml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/edit.xhtml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,24 @@
+<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="prop">
+
+ <s:label styleClass="name #{invalid?'errors':''}">
+ <ui:insert name="label"/>
+ <s:span styleClass="required" rendered="#{required}">*</s:span>
+ </s:label>
+
+ <span class="value #{invalid?'errors':''}">
+ <s:validateAll>
+ <ui:insert/>
+ </s:validateAll>
+ </span>
+
+ <s:message styleClass="error errors"/>
+
+ </div>
+
+</ui:composition>
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/footer.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/footer.xhtml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/footer.xhtml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,424 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ 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:rich="http://richfaces.org/rich"
+ xmlns:tr="http://myfaces.apache.org/trinidad">
+ <rich:popupPanel id="creating" width="450" height="250">
+ <f:facet name="header">
+ Creating SeamDiscs
+ </f:facet>
+ <f:facet name="controls">
+ <a href="#" onclick="#{rich:component('creating')}.hide()">X</a>
+ </f:facet>
+ <p>This example was built using seam-gen. To add in Trinidad, the trinidad-api jar was added to
+ the ear (and referenced from <a href="#" onclick="#{rich:component('applicationxml')}.show()">
+ <code>application.xml</code></a>) and the trinidad-impl jar, <code>jboss-seam-trinidad.jar</code>
+ (Seam-Trinidad integration) & <code>a4j-trinidad.jar</code> (RichFaces Ajax-Trinidad integration)
+ were added to <code>WEB-INF/lib</code>.</p>
+
+ <p>A few alterations were needed in <a href="#" onclick="#{rich:component('webxml')}.show()">
+ <code>web.xml</code></a> and <a href="#" onclick="#{rich:component('facesconfigxml')}.show()">
+ <code>faces-config.xml</code></a>.</p>
+
+ <p>The <code>trinidad-config.xml</code> file was used to disable client-side validation for a
+ more consistent user experience.</p>
+
+ <p>Of course Trinidad and RichFaces offer some complementary components (e.g. tables, trees)
+ - it's up to you which you choose!</p>
+ </rich:popupPanel>
+
+ <rich:popupPanel id="webxml" width="450" height="500" left="50">
+ <f:facet name="header">
+ <code>web.xml</code>
+ </f:facet>
+ <f:facet name="controls">
+ <a href="#" onclick="#{rich:component('webxml')}.hide()">X</a>
+ </f:facet>
+ <pre style="height: 420px;" class="source-code"><code>
+<context-param>
+ <param-name>
+ org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER
+ </param-name>
+ <param-value>
+ com.sun.facelets.FaceletViewHandler
+ </param-value>
+</context-param>
+
+<filter>
+ <filter-name>Trinidad</filter-name>
+ <filter-class>
+ org.apache.myfaces.trinidad.webapp.TrinidadFilter
+ </filter-class>
+</filter>
+
+<filter-mapping>
+ <filter-name>Trinidad</filter-name>
+ <url-pattern>*.seam</url-pattern>
+</filter-mapping>
+
+<servlet>
+ <servlet-name>Trinidad Resources</servlet-name>
+ <servlet-class>
+ org.apache.myfaces.trinidad.webapp.ResourceServlet
+ </servlet-class>
+</servlet>
+
+<servlet-mapping>
+ <servlet-name>Trinidad Resources</servlet-name>
+ <url-pattern>/adf/*</url-pattern>
+</servlet-mapping></code></pre>
+ </rich:popupPanel>
+
+ <rich:popupPanel id="facesconfigxml" width="450" height="300" left="50">
+ <f:facet name="header">
+ <code>faces-config.xml</code>
+ </f:facet>
+ <f:facet name="controls">
+ <a href="#" onclick="#{rich:component('facesconfigxml')}.hide()">X</a>
+ </f:facet>
+ <pre class="source-code"><code>
+<application>
+ <!-- Disabled when using RichFaces or Trinidad -->
+ <!--
+ <view-handler>
+ com.sun.facelets.FaceletViewHandler
+ </view-handler>
+ -->
+ <!-- Enable Trinidad renderkit -->
+ <default-render-kit-id>
+ org.apache.myfaces.trinidad.core
+ </default-render-kit-id>
+</application></code></pre>
+ </rich:popupPanel>
+
+ <rich:popupPanel id="applicationxml" width="450" height="200" left="50">
+ <f:facet name="header">
+ <code>application.xml</code>
+ </f:facet>
+ <f:facet name="controls">
+ <a href="#" onclick="#{rich:component('applicationxml')}.hide()">X</a>
+ </f:facet>
+ <pre class="source-code"><code>
+<module>
+ <java>trinidad-api-2.0.1.jar</java>
+</module></code></pre>
+ </rich:popupPanel>
+
+ <rich:popupPanel id="ajax" width="450" height="370">
+ <f:facet name="header">
+ RichFaces Ajax and Trinidad
+ </f:facet>
+ <f:facet name="controls">
+ <a href="#" onclick="#{rich:component('ajax')}.hide()">X</a>
+ </f:facet>
+ <p>Trinidad and RichFaces Ajax both provide partial page refresh and submit.</p>
+ <p>
+ If you want to use RichFaces' partial page refresh with Trinidad
+ components then you'll need to disable Trinidad's compressed style
+ keys:
+ </p>
+ <pre class="source-code"><code><context-param>
+ <param-name>
+ org.apache.myfaces.trinidadinternal.DISABLE_CONTENT_COMPRESSION
+ </param-name>
+ <param-value>true</param-value>
+</context-param></code></pre>
+ </rich:popupPanel>
+
+ <rich:popupPanel id="inplace" width="450" height="300">
+ <f:facet name="header">
+ Inplace editing
+ </f:facet>
+ <f:facet name="controls">
+ <a href="#" onclick="#{rich:component('inplace')}.hide()">X</a>
+ </f:facet>
+ <p>The example also shows how you can use Trinidad components to achieve "in-place" editing - the same views are used to display and edit
+ informtation. A casual visitor to the site navigates around, and see's the components in read only mode; once logged in,
+ these components are editable, and button's are rendered to submit information.</p>
+
+ <pre class="source-code"><code>
+<tr:inputText
+ label="Artist"
+ value="#<span>{artist.name}</span>"
+ readOnly="#<span>{not identity.loggedIn}</span>"
+ required="true"
+ autoSubmit="true"/></code></pre>
+
+ <p>Trinidad makes it easy by providing a <code>readOnly</code> attribute for components - but you could easily achieve the
+ same using Seam's <code><s:decorate /></code> tag.</p>
+ </rich:popupPanel>
+
+ <rich:popupPanel id="framework" width="450" height="250">
+ <f:facet name="header">
+ Seam Application Framework
+ </f:facet>
+ <f:facet name="controls">
+ <a href="#" onclick="#{rich:component('framework')}.hide()">X</a>
+ </f:facet>
+ <p>The example uses the Seam Application Framework. Where possible XML is used,
+ using extension only where extra functionality is needed.</p>
+
+ <p>An <a href="#" onclick="#{rich:component('componentsxml')}.show()"><code>EntityHome</code></a>
+ and is used for each CRUD, and an
+ <a href="#" onclick="#{rich:component('componentsxml')}.show()"><code>EntityQuery</code></a>
+ for clickable lists.</p>
+
+ <p>If you extend <code>EntityHome</code> you can make the component an
+ EJB3 stateful session bean by adding <code>@Stateful</code> and a local
+ interface. You'll need to declare methods like <code>persist()</code>
+ and <code>isManaged()</code> from <code>EntityHome</code> on the
+ interface. The <code>ArtistHome</code> is a stateful session bean in
+ this example.</p>
+
+ <p>Each item in the list can be clicked - an <code><s:link /></code> and an
+ <code><f:param /></code> is used to <a href="#" onclick="#{rich:component('clickablelist')}.show()">link</a>
+ to the detail view. It's wired using <a href="#" onclick="#{rich:component('clickablelist')}.show()"><code>pages.xml</code></a>.
+ </p>
+
+ <p>The CRUD page uses the <code>EntityHome</code> object to <a href="#" onclick="#{rich:component('crud')}.show()">create, update or
+ delete</a> the entity as necessary. <a href="#" onclick="#{rich:component('crud')}.show()"><code>pages.xml</code></a>
+ is used to direct the user back to the list view.</p>
+ </rich:popupPanel>
+
+ <rich:popupPanel id="clickablelist" width="450" height="350" left="50">
+ <f:facet name="header">
+ <code>Clickable lists</code>
+ </f:facet>
+ <f:facet name="controls">
+ <a href="#" onclick="#{rich:component('clickablelist')}.hide()">X</a>
+ </f:facet>
+ <pre class="source-code"><code>
+<s:link action="artist">
+ <tr:outputText value="#<span>{artist.name}</span>" />
+ <f:param name="artistId" value="#<span>{artist.id}</span>" />
+</s:link></code></pre>
+
+ <pre class="source-code"><code>
+<page>
+ <param name="artistId" value="#<span>{artistHome.id}</span>"
+ converterId="javax.faces.Integer"/>
+ <navigation>
+ <rule if-outcome="artist">
+ <begin-conversation flush-mode="manual"/>
+ <redirect view-id="/artist.xhtml"/>
+ </rule>
+ </navigation>
+</page></code></pre>
+ </rich:popupPanel>
+
+ <rich:popupPanel id="componentsxml" width="450" height="330" left="50">
+ <f:facet name="header">
+ <code>components.xml</code>
+ </f:facet>
+ <f:facet name="controls">
+ <a href="#" onclick="#{rich:component('componentsxml')}.hide()">X</a>
+ </f:facet>
+
+ <pre class="source-code"><code>
+<framework:entity-home
+ entity-class="org.jboss.seam.example.seamdiscs.model.Disc"
+ name="discHome"/>
+<factory
+ name="disc"
+ value="#<span>{discHome.instance}</span>"/></code></pre>
+
+ <pre class="source-code"><code>
+<framework:entity-query
+ name="discs"
+ ejbql="select disc from Disc disc"
+ order="disc.name ASC"
+ max-results="5"/></code></pre>
+
+ </rich:popupPanel>
+
+ <rich:popupPanel id="crud" width="450" height="480" left="50">
+ <f:facet name="header">
+ <code>CRUD</code>
+ </f:facet>
+ <f:facet name="controls">
+ <a href="#" onclick="#{rich:component('crud')}.hide()">X</a>
+ </f:facet>
+
+ <pre class="source-code"><code>
+<h:commandButton action="#<span>{artistHome.update}</span>"
+ value="Save" rendered="#<span>{artistHome.managed}</span>" />
+<h:commandButton action="#<span>{artistHome.persist}</span>"
+ value="Save" rendered="#<span>{not artistHome.managed}</span>" />
+<s:button action="cancel" value="Cancel" /></code></pre>
+
+ <pre class="source-code"><code>
+<page>
+ <param name="artistId" value="#<span>{artistHome.id}</span>"
+ converterId="javax.faces.Integer"/>
+ <navigation>
+ <rule if-outcome="cancel">
+ <end-conversation/>
+ <redirect view-id="/artists.xhtml" />
+ </rule>
+ <rule if-outcome="updated">
+ <end-conversation/>
+ <redirect view-id="/artists.xhtml" />
+ </rule>
+ <rule if-outcome="persisted">
+ <end-conversation/>
+ <redirect view-id="/artists.xhtml" />
+ </rule>
+ </navigation>
+</page></code></pre>
+ </rich:popupPanel>
+
+ <rich:popupPanel id="tree" width="450" height="250">
+ <f:facet name="header">
+ Using Trinidad's Tree
+ </f:facet>
+ <f:facet name="controls">
+ <a href="#" onclick="#{rich:component('tree')}.hide()">X</a>
+ </f:facet>
+ <p>It's been said that the quality of a tree component is an indication of
+ the quality of a component set. Trinidad has a really robust tree component,
+ - but it's <code>TreeModel</code> can be a bit confusing. Luckily it provides
+ a good default implementation - the <code>ChildPropertyTreeModel</code>.</p>
+
+ <p>The <code>ChildPropertyTreeModel</code> takes two parameters - the <code>Collection</code>
+ to use for the tree's nodes, and a <code>String</code> property which specifies
+ the field or get/set pair to use for accessing each elements child. If the property
+ returns <code>null</code>, then the node is a leaf-node.</p>
+
+ <p>The example uses a slightly modified
+ <a href="#" onclick="#{rich:component('treecode')}.show()"><code>ChildPropertyTreeModel</code></a>
+ - one that says discs are the leaves of the tree.
+ <a href="#" onclick="#{rich:component('treecode')}.show()">Different labels</a> are
+ rendered depending on the type of node.
+ </p>
+
+ </rich:popupPanel>
+
+ <rich:popupPanel id="treecode" width="450" height="500" left="50">
+ <f:facet name="header">
+ <code>Tree</code>
+ </f:facet>
+ <f:facet name="controls">
+ <a href="#" onclick="#{rich:component('treecode')}.hide()">X</a>
+ </f:facet>
+
+ <pre class="source-code"><code>
+public TreeModel getTree() {
+ return new ChildPropertyTreeModel(artists, "discs") {
+ protected Object getChildData(Object parentData) {
+ if (parentData instanceof Artist) {
+ return super.getChildData(parentData);
+ } else {
+ return null;
+ }
+ }
+ };
+}</code></pre>
+
+ <pre class="source-code"><code>
+<tr:tree value="#<span>{artistHome.tree}</span>" var="var">
+ <f:facet name="nodeStamp">
+ <ui:fragment>
+ <s:link
+ action="artist"
+ rendered="#<span>{var.class.simpleName eq 'Artist'
+ or var.class.simpleName eq 'Band'}</span>">
+ <tr:outputText value="#<span>{var.name}</span>" />
+ <f:param name="artistId" value="#<span>{var.id}</span>" />
+ </s:link>
+ </ui:fragment>
+ </f:facet>
+</tr:tree></code></pre>
+
+ </rich:popupPanel>
+
+ <rich:popupPanel id="skinning" width="450" height="180">
+ <f:facet name="header">
+ Look and Feel
+ </f:facet>
+ <f:facet name="controls">
+ <a href="#" onclick="#{rich:component('skinning')}.hide()">X</a>
+ </f:facet>
+ <p>Both Trinidad and RichFaces have powerful and mature skinning/theming APIs
+ - so you all you need to do is write some CSS! For seamdiscs, we took a RichFaces
+ skin, and adjusted the trinidad skin to fit with it. To do this, we added
+ the skin to <code>trinidad-skins.xml</code>, and told Trinidad to use it in
+ <code>trinidad-config.xml</code>. You can find more information about Trinidad
+ skinning on the Trinidad wiki.</p>
+ <p>You'll notice that Trinidad and RichFaces components don't provide
+ a consistent look-and-feel out of the box - there are plans afoot to improve this!</p>
+ </rich:popupPanel>
+
+ <rich:popupPanel id="datamodel" width="450" height="500">
+ <f:facet name="header">
+ Enhanced <code>DataModel</code>
+ </f:facet>
+ <f:facet name="controls">
+ <a href="#" onclick="#{rich:component('datamodel')}.hide()">X</a>
+ </f:facet>
+ <p>JSF component sets like Trinidad, Tomahawk and IceFaces give you an enhanced
+ <code>h:dataTable</code> which has built-in sorting, paging and other goodies.
+ However, there is one big flaw - the entire data set is loaded and sorted/paged
+ in memory, when really you want to get your persistence layer (be it an ORM or
+ just a database) to do this for - a sort translates naturally to an <code>ORDER BY</code>,
+ and paging translates naturally to a <code>LIMIT</code> clauses.</p>
+
+ <p>Seam on the other hand provides tight integration to your persistence layer,
+ and supports paging and sorting of queries through the <code>Query</code>
+ object in the Seam Application Framework - but you have to write a load more JSF
+ to get it integrated. We can get the best of both worlds by using the enhanced
+ <code>DataModel</code> in Trinidad, which supports paging and sorting backed by
+ a <code>Query</code>.</p>
+
+ <p>The <code>jboss-seam-trinidad.jar</code> (built using the build file in the
+ <code>trinidad</code> directory in Seam CVS) provides a <code>DataModel</code>
+ which, when backed by a <code>Query</code>, provides lazy loading of data for
+ paging, sorting in the persistence context and strong row keys. You can use
+ it by adding the <code>jboss-seam-trinidad.jar</code> to your <code>WEB-INF/lib</code>
+ - no need to alter your facelet. One caveat is that you must ensure the rows property
+ on the <code>Query</code> is the same as the <code>maxResults</code> property on
+ the <code>Query</code>. Take a look at the seamdiscs example in the
+ <code>trinidad/examples</code> directory to see it in action.</p>
+ <pre class="source-code"><code>
+<tr:table
+ value="#<span>{discs.dataModel}</span>"
+ rows="#<span>{discs.maxResults}</span>">
+ <tr:column>
+ ...
+ </tr:column
+</tr:table></code></pre>
+ </rich:popupPanel>
+
+ <rich:toolbar itemSeparator="square">
+ <rich:toolbarGroup>
+ Powered by <a href="http://labs.jboss.com/jbossseam">Seam</a>
+ </rich:toolbarGroup>
+ <rich:toolbarGroup itemSeparator="square">
+ <s:fragment>
+ <a href="#" onclick="#{rich:component('creating')}.show()">Creating SeamDiscs</a>
+ </s:fragment>
+ <s:fragment>
+ <a href="#" onclick="#{rich:component('ajax')}.show()">RichFaces Ajax and Trinidad</a>
+ </s:fragment>
+ <s:fragment>
+ <a href="#" onclick="#{rich:component('inplace')}.show()">Inplace Editing</a>
+ </s:fragment>
+ <s:fragment>
+ <a href="#" onclick="#{rich:component('framework')}.show()">Seam Application Framework</a>
+ </s:fragment>
+ <s:fragment>
+ <a href="#" onclick="#{rich:component('skinning')}.show()">Look and Feel</a>
+ </s:fragment>
+ <s:fragment>
+ <a href="#" onclick="#{rich:component('datamodel')}.show()">Enhanced DataModel</a>
+ </s:fragment>
+ <s:fragment>
+ <a href="#" onclick="#{rich:component('tree')}.show()">Tree Component</a>
+ </s:fragment>
+ </rich:toolbarGroup>
+ <rich:toolbarGroup location="right">
+ Generated by seam-gen.
+ </rich:toolbarGroup>
+ </rich:toolbar>
+</ui:composition>
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/menu.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/menu.xhtml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/menu.xhtml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,20 @@
+<rich:toolbar
+ 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:rich="http://richfaces.org/rich"
+ itemSeparator="line">
+ <rich:toolbarGroup>
+ <h:outputText value="#{projectName}:"/>
+ <s:link view="/home.xhtml" value="Home" propagation="none"/>
+ <s:link view="/artists.xhtml" id="manageArtists" value="Artists" propagation="none"/>
+ <s:link view="/discs.xhtml" id="manageDiscs" value="Discs" propagation="none"/>
+ </rich:toolbarGroup>
+ <rich:toolbarGroup location="right">
+ <h:outputText value="Welcome, #{identity.username}" rendered="#{identity.loggedIn}"/>
+ <s:link view="/login.xhtml" id="loginlink" value="Login" rendered="#{not identity.loggedIn}"/>
+ <s:link view="/home.xhtml" id="logout" action="#{identity.logout}" value="Logout" rendered="#{identity.loggedIn}"/>
+ </rich:toolbarGroup>
+</rich:toolbar>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/template.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/template.xhtml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/layout/template.xhtml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,33 @@
+<!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:trh="http://myfaces.apache.org/trinidad/html"
+ xmlns:tr="http://myfaces.apache.org/trinidad"
+ xmlns:rich="http://richfaces.org/rich">
+<h:head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>SeamDiscs</title>
+ <link href="stylesheet/theme.css" rel="stylesheet" type="text/css" />
+ <trh:styleSheet />
+</h:head>
+
+<body>
+
+ <ui:include src="menu.xhtml">
+ <ui:param name="projectName" value="SeamDiscs"/>
+ </ui:include>
+
+ <tr:messages globalOnly="true" id="messages"/>
+
+ <div class="body">
+ <ui:insert name="body"/>
+ </div>
+
+ <ui:include src="footer.xhtml" />
+
+</body>
+</html>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/login.page.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/login.page.xml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/login.page.xml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<page xmlns="http://jboss.com/products/seam/pages"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.3.xsd">
+
+ <navigation from-action="#{identity.login}">
+ <rule if="#{identity.loggedIn}">
+ <redirect view-id="/home.xhtml" />
+ </rule>
+ </navigation>
+</page>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/login.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/login.xhtml (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/login.xhtml 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,43 @@
+<!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:s="http://jboss.com/products/seam/taglib"
+ 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:rich="http://richfaces.org/rich"
+ template="layout/template.xhtml">
+
+<ui:define name="body">
+
+ <h:form id="login">
+
+ <rich:panel>
+ <f:facet name="header">Login</f:facet>
+
+ <p>You can log in as administrator/administrator</p>
+
+ <div class="dialog">
+ <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
+ <h:outputLabel for="username">Username</h:outputLabel>
+ <h:inputText id="username"
+ value="#{identity.username}"/>
+ <h:outputLabel for="password">Password</h:outputLabel>
+ <h:inputSecret id="password"
+ value="#{identity.password}"/>
+ <h:outputLabel for="rememberMe">Remember me</h:outputLabel>
+ <h:selectBooleanCheckbox id="rememberMe"
+ value="#{identity.rememberMe}"/>
+ </h:panelGrid>
+ </div>
+
+ </rich:panel>
+
+ <div class="actionButtons">
+ <h:commandButton value="Login" id="loginbutton" action="#{identity.login}"/>
+ </div>
+
+ </h:form>
+
+ </ui:define>
+</ui:composition>
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/stylesheet/skin.css
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/stylesheet/skin.css (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/stylesheet/skin.css 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,15 @@
+af|column::header-text {color: white}
+af|showDetailHeader::level-one {color: grey}
+.AFDarkForeground:alias {color: grey}
+
+.source-code {
+ font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace;
+ color: #000000;
+ background-color: #eee;
+ font-size: 12px;
+ border: 1px dashed #999999;
+ line-height: 14px;
+ padding: 5px;
+ overflow: auto;
+ width: 420px;
+}
\ No newline at end of file
Added: branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/stylesheet/theme.css
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/stylesheet/theme.css (rev 0)
+++ branches/community/Seam_2_3/examples-ee6/seamdiscs/seamdiscs-web/src/main/webapp/stylesheet/theme.css 2012-04-05 22:00:26 UTC (rev 14528)
@@ -0,0 +1,289 @@
+a:active, a:link, a:visited {
+ color: #0D5798;
+}
+a:hover {
+ color: #8CAFCD;
+}
+
+input, textarea {
+ border: 1px solid #BBBBBB;
+ font-size: 10px;
+ background: #F0F8FF;
+ color: black;
+}
+
+input[type='submit'], input[type='button'] {
+ background: #4477AA;
+ color: white;
+ margin: 5px;
+ border-color: gray;
+}
+
+.tableControl, .actionButtons {
+ width: 100%;
+}
+
+.tableControl {
+ text-align: right;
+}
+
+.footer {
+ text-align: center;
+ font-size: 10px;
+}
+
+.rich-table {
+ width:100%;
+}
+
+h1 {
+ font-family: Arial,sans-serif;
+ color: #578BB8;
+ font-size: 1.6em;
+ margin-top: 0;
+}
+
+body {
+ margin: 0px;
+ font-family: Arial,sans-serif;
+ color: #616161;
+}
+
+.body {
+ padding: 30px;
+}
+
+.columnHeader:hover
+{
+ color: #FF6600;
+}
+
+.message {
+ border: 1px solid #FFCC00;
+ padding: 5px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ background-color: #F0F8FF;
+ font-size: 12px;
+}
+
+.name {
+ vertical-align: top;
+ font-weight: bold;
+ width: 115px;
+ float: left;
+ padding: 5px;
+ margin-top: 3px;
+ clear: left;
+}
+.value {
+ float: left;
+ padding: 5px;
+}
+.error {
+ margin-left: 20px;
+ margin-top: 5px;
+ float: left;
+ padding: 5px;
+ border: 1px solid red;
+}
+
+.errors {
+ color: red;
+}
+.errors input {
+ border: 1px solid red;
+}
+.errors textarea {
+ border: 1px solid red;
+}
+.required {
+ color: red;
+ padding-left: 2px;
+}
+
+/* date picker style */
+div.seam-date
+{
+ margin-top: 5px;
+ border: 1px solid #AAAAAA;
+ background-color: #FFFFFF;
+ color: #505050;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-size: 12px;
+}
+
+table.seam-date td {
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-weight: 12px;
+}
+
+.seam-date-monthNames
+{
+ width: 70px;
+ border: 1px solid #dddddd;
+ border-right: 3px solid #444444;
+ border-bottom: 3px solid #444444;
+ background-color: #ffffff;
+ font-size: 12px;
+ cursor: pointer;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-weight: normal;
+}
+
+a.seam-date-monthNameLink, a.seam-date-monthNameLink:visited
+{
+ text-align: center;
+ display: block;
+ color: #555555;
+}
+
+a.seam-date-monthNameLink:hover
+{
+ background-color: #CCCCCC;
+ color: red;
+}
+
+.seam-date-years
+{
+ height: 10em;
+ overflow: auto;
+ width: 60px;
+ border: 1px solid #dddddd;
+ border-right: 3px solid #444444;
+ border-bottom: 3px solid #444444;
+ background-color: #ffffff;
+ font-size: 12px;
+ cursor: pointer;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-weight: normal;
+}
+
+a.seam-date-yearLink, a.seam-date-yearLink:visited
+{
+ text-align: center;
+ display: block;
+ color: #555555;
+}
+
+a.seam-date-yearLink:hover
+{
+ background-color: #CCCCCC;
+ color: red;
+}
+
+tr.seam-date-header
+{
+ padding: 2px 0px 2px 0px;
+}
+
+td.seam-date-header
+{
+ padding: 0px 8px 0px 8px;
+ text-align: center;
+ color: gray;
+ font-family: Tahoma, Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 12px;
+}
+
+td.seam-date-header-prevMonth
+{
+ background-image: url("../img/cal-prev.png");
+ background-repeat: no-repeat;
+ background-position: center;
+ padding: 0px 2px 0px 2px;
+ width: 17px;
+ height: 16px;
+ margin-left: 2px;
+}
+
+td.seam-date-header-nextMonth
+{
+ background-image: url("../img/cal-next.png");
+ background-repeat: no-repeat;
+ background-position: center;
+ padding: 0px 2px 0px 2px;
+ width: 17px;
+ height: 16px;
+ margin-right: 2px;
+}
+
+tr.seam-date-headerDays
+{
+ color: white;
+ font-weight: normal;
+}
+
+tr.seam-date-headerDays > td
+{
+ background-color: #CCCCCC;
+ border: 1px solid #AAAAAA;
+ color: white;
+ text-align: center;
+ width: 26px;
+}
+
+tr.seam-date-footer
+{
+ background-color: white;
+ color: #505050;
+ font-weight: bold;
+}
+
+tr.seam-date-footer > td
+{
+ text-align: center;
+}
+
+td.seam-date-inMonth
+{
+ background-color: white;
+ color: black;
+ font-weight: normal;
+ cursor: pointer;
+ border: 1px solid #ece9d8;
+}
+
+td.seam-date-outMonth
+{
+ background-color: white;
+ color: #999999;
+ font-weight: normal;
+ cursor: pointer;
+ border: 1px solid #ece9d8;
+}
+
+td.seam-date-selected
+{
+ background-color: #CCCCCC;
+ border: 1px solid #AAAAAA;
+ color: black;
+ font-weight: normal;
+}
+
+td.seam-date-dayOff-inMonth
+{
+ background-color: #efefef;
+ color: black;
+ font-weight: normal;
+ cursor: pointer;
+ border: 1px solid #ece9d8;
+}
+
+td.seam-date-dayOff-outMonth
+{
+ background-color: #efefef;
+ color: #999999;
+ font-weight: normal;
+ cursor: pointer;
+ border: 1px solid #ece9d8;
+}
+
+td.seam-date-hover
+{
+ background-color: #CCCCCC;
+ border: 1px solid #AAAAAA;
+ cursor: pointer;
+ color: red;
+}
\ No newline at end of file
12 years
Seam SVN: r14527 - in branches/community/Seam_2_3/examples-ee6/blog: blog-ear/src/main/application/META-INF and 8 other directories.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-04-05 11:11:13 -0400 (Thu, 05 Apr 2012)
New Revision: 14527
Modified:
branches/community/Seam_2_3/examples-ee6/blog/blog-ear/pom.xml
branches/community/Seam_2_3/examples-ee6/blog/blog-ear/src/main/application/META-INF/jboss-deployment-structure.xml
branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/pom.xml
branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/java/domain/Blog.java
branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/java/domain/BlogEntry.java
branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/resources/META-INF/persistence.xml
branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/resources/import.sql
branches/community/Seam_2_3/examples-ee6/blog/blog-tests/pom.xml
branches/community/Seam_2_3/examples-ee6/blog/blog-web/pom.xml
branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/WEB-INF/components.xml
branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/WEB-INF/faces-config.xml
branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/print.xhtml
branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/template.xhtml
Log:
Blog example mostly working
Modified: branches/community/Seam_2_3/examples-ee6/blog/blog-ear/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/blog/blog-ear/pom.xml 2012-04-05 12:42:07 UTC (rev 14526)
+++ branches/community/Seam_2_3/examples-ee6/blog/blog-ear/pom.xml 2012-04-05 15:11:13 UTC (rev 14527)
@@ -14,13 +14,6 @@
<packaging>ear</packaging>
<name>Blog EAR Module (EE6)</name>
- <properties>
- <jboss.home>${env.JBOSS_HOME}</jboss.home>
- <jboss.domain>default</jboss.domain>
- <jboss-cache.lib>jboss-cache-1.4.1.SP9.jar</jboss-cache.lib>
- <jgroups.lib>jgroups-2.4.1.jar</jgroups.lib>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.jboss.seam.examples-ee6</groupId>
@@ -48,24 +41,38 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
+ <version>2.7</version>
<configuration>
+ <version>6</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<!-- Exclude eclipse generated application.xml and manually modified jboss-app.xml during mvn build -->
<earSourceExcludes>**/application.xml, **/jboss-app.xml</earSourceExcludes>
<!-- use maven generated application.xml instead -->
<generateApplicationXml>true</generateApplicationXml>
<filtering>true</filtering>
+
+ <!-- Required as indexerService cannot be initialized before the blogEntityManagerFactory is available -->
+ <initializeInOrder>true</initializeInOrder>
+
<modules>
+
+ <ejbModule>
+ <groupId>org.jboss.seam.examples-ee6</groupId>
+ <artifactId>blog-ejb</artifactId>
+ <bundleFileName>blog-ejb.jar</bundleFileName>
+ </ejbModule>
+
<webModule>
<groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>blog-web</artifactId>
<contextRoot>/seam-blog</contextRoot>
<bundleFileName>blog-web.war</bundleFileName>
</webModule>
+
<ejbModule>
- <groupId>org.jboss.seam.examples-ee6</groupId>
- <artifactId>blog-ejb</artifactId>
- <bundleFileName>blog-ejb.jar</bundleFileName>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <bundleFileName>jboss-seam.jar</bundleFileName>
</ejbModule>
</modules>
</configuration>
Modified: branches/community/Seam_2_3/examples-ee6/blog/blog-ear/src/main/application/META-INF/jboss-deployment-structure.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/blog/blog-ear/src/main/application/META-INF/jboss-deployment-structure.xml 2012-04-05 12:42:07 UTC (rev 14526)
+++ branches/community/Seam_2_3/examples-ee6/blog/blog-ear/src/main/application/META-INF/jboss-deployment-structure.xml 2012-04-05 15:11:13 UTC (rev 14527)
@@ -1,6 +1,7 @@
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
<deployment>
<dependencies>
+ <module name="org.antlr" export="true"/>
<module name="org.apache.log4j" export="true"/>
<module name="org.dom4j" export="true"/>
<module name="org.apache.commons.logging" export="true"/>
Modified: branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/pom.xml 2012-04-05 12:42:07 UTC (rev 14526)
+++ branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/pom.xml 2012-04-05 15:11:13 UTC (rev 14527)
@@ -28,22 +28,27 @@
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.servlet</groupId>
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.ejb</groupId>
<artifactId>jboss-ejb-api_3.1_spec</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
+ <scope>provided</scope>
</dependency>
<!--<dependency>-->
<!--<groupId>org.hibernate</groupId>-->
@@ -52,43 +57,51 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
+ <scope>provided</scope>
</dependency>
+
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>ejb3-persistence</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
+
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-search-analyzers</artifactId>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-search-engine</artifactId>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-search-infinispan</artifactId>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-search-orm</artifactId>
- </dependency>
- <dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.faces</groupId>
<artifactId>jboss-jsf-api_2.0_spec</artifactId>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ </dependency>
</dependencies>
<profiles>
<profile>
<id>jbossas51</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
<build>
<plugins>
<plugin>
Modified: branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/java/domain/Blog.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/java/domain/Blog.java 2012-04-05 12:42:07 UTC (rev 14526)
+++ branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/java/domain/Blog.java 2012-04-05 15:11:13 UTC (rev 14527)
@@ -23,7 +23,7 @@
* @author Simon Brown
*/
@Entity
-(a)Cache(usage=CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
+(a)Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL)
public class Blog {
/** the name of the blog */
@@ -51,7 +51,7 @@
/** the list of blog entries, in reverse chronological order */
@OneToMany(mappedBy="blog")
@OrderBy("date desc")
- @Cache(usage=CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
+ @Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL)
private List<BlogEntry> blogEntries;
/**
Modified: branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/java/domain/BlogEntry.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/java/domain/BlogEntry.java 2012-04-05 12:42:07 UTC (rev 14526)
+++ branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/java/domain/BlogEntry.java 2012-04-05 15:11:13 UTC (rev 14527)
@@ -11,6 +11,7 @@
import javax.persistence.Entity;
import javax.persistence.Id;
+import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
@@ -23,7 +24,7 @@
* @author Sanne Grinovero
*/
@Entity
-@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
+@Cache(usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Indexed
@AnalyzerDefs({
@AnalyzerDef(name = "en",
@@ -55,11 +56,11 @@
@Field(name = "title:ngrams", analyzer = @Analyzer(definition = "ngrams"))})
private String title;
- @Size(max = 200)
+ @Size(max=1024)
private String excerpt;
@NotNull
- @Size(max = 1400)
+ @Lob
@Fields({
@Field(name = "body:en", analyzer = @Analyzer(definition = "en")),
@Field(name = "body:ngrams", analyzer = @Analyzer(definition = "ngrams"))})
Modified: branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/resources/META-INF/persistence.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/resources/META-INF/persistence.xml 2012-04-05 12:42:07 UTC (rev 14526)
+++ branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/resources/META-INF/persistence.xml 2012-04-05 15:11:13 UTC (rev 14527)
@@ -9,13 +9,14 @@
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.show_sql" value="true"/>
+
+ <property name="hibernate.cache.use_second_level_cache" value="true"/>
<property name="hibernate.cache.use_query_cache" value="true"/>
- <!--<property name="jboss.entity.manager.factory.jndi.name" value="java:/blogEntityManagerFactory"/>-->
+ <property name="jboss.entity.manager.factory.jndi.name" value="java:/blogEntityManagerFactory"/>
<property name="hibernate.jdbc.charSet" value="utf-8"/>
<!-- use a file system based index -->
- <property name="hibernate.search.default.directory_provider"
- value="org.hibernate.search.store.FSDirectoryProvider"/>
+ <property name="hibernate.search.default.directory_provider" value="filesystem"/>
<!-- directory where the indexes will be stored -->
<property name="hibernate.search.default.indexBase" value="./blogindexes"/>
</properties>
Modified: branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/resources/import.sql
===================================================================
--- branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/resources/import.sql 2012-04-05 12:42:07 UTC (rev 14526)
+++ branches/community/Seam_2_3/examples-ee6/blog/blog-ejb/src/main/resources/import.sql 2012-04-05 15:11:13 UTC (rev 14527)
@@ -1,5 +1,5 @@
insert into blog (name, description, locale, timezone, password) values ('JBoss Seam Blog', 'An example of a RESTful Seam application', 'en_AU', 'PST', 'tokyo')
insert into hitcount (blog_name, pageviews) values ('JBoss Seam Blog', 1000)
-insert into blogentry (blog_name, id, title, excerpt, body, date) values ('JBoss Seam Blog', 'seamtext', 'Introducing Seam Text', null, 'Seam Text is a human-friendly language for formatting text in blogs, forums and wikis. It''s easy to enter text in *emphasis*, |monospace|, ~deleted~ or ^superscript^; you can easily enter links, lists, quotes and code blocks.'+char(10)+''+char(10)+'[This is a link.=>http://hibernate.org]'+char(10)+''+char(10)+'You can *not* enter HTML entities, even escaped: \& \< \> \" \ '+char(10)+''+char(10)+'And even emoticons: ;) :-) :-{ ;-)'+char(10)+''+char(10)+'Here is an ordered list:'+char(10)+''+char(10)+'#JBoss'+char(10)+'#Seam'+char(10)+'#Hibernate'+char(10)+''+char(10)+'And this is an unordered list:'+char(10)+''+char(10)+'=jBPM'+char(10)+'=Drools'+char(10)+'=Ajax4JSF'+char(10)+'=Facelets'+char(10)+''+char(10)+'"Here is a quote from someone else"'+char(10)+''+char(10)+'`<p>Here is some code</p>`'+char(10)+''+char(10)+'And!
some plain HTML (restricted subset):'+char(10)+''+char(10)+'<table><tr><td>Foo</td><td>Bar</td></tr></table>', '2007-01-18 4:00')
-insert into blogentry (blog_name, id, title, excerpt, body, date) values ('JBoss Seam Blog', 'book', 'Seam book excerpt on InfoQ', null, 'Michael and Thomas are writing [a book=>http://safari.oreilly.com/013241273X] about Seam for [O''Reilly=>http://www.oreillynet.com/], which is apparently the hottest selling item on Rough Cuts. InfoQ are running an [excerpt=>http://www.infoq.com/articles/jboss-seam] from the first chapter.'+char(10)+''+char(10)+'Meanwhile, Norman and I have been tearing our way through JIRA issues, and so 1.1.1 will be ready to go when I get back from vacation :-)', '2006-12-19 19:00')
-insert into blogentry (blog_name, id, title, excerpt, body, date) values ('JBoss Seam Blog', 'roadmap11', 'Seam Roadmap', 'The [1.1 release=>http://blog.hibernate.org/cgi-bin/blosxom.cgi/2006/12/13#seam11-goes-ga] involved a lot of hard work in the guts of Seam, refactoring and fixing bugs, and working with \"tricky\" code that handles concerns like clustering and concurrency. Sure, there are many new features, but a lot of the real work is less user-visible. Now that this hard stuff is out of the way, it lets us add some interesting new stuff pretty quickly. Here''s a quick roadmap for the next few months:', 'The [1.1 release=>http://blog.hibernate.org/cgi-bin/blosxom.cgi/2006/12/13#seam11-goes-ga] involved a lot of hard work in the guts of Seam, refactoring and fixing bugs, and working with \"tricky\" code that handles concerns like clustering and concurrency. Sure, there are many new features, but a lot of the real work is less user-visible. Now that this hard stuff is o!
ut of the way, it lets us add some interesting new stuff pretty quickly. Here''s a quick roadmap for the next few months:'+char(10)+''+char(10)+'++++Spring integration package'+char(10)+''+char(10)+'We''re seeing regular requests from people who have existing DAOs and business logic written using the Spring Framework and want a migration path to Seam that lets them re-use this existing code unchanged. The planned Spring integration package will provide:'+char(10)+''+char(10)+'=injection of Spring beans into Seam components, using |@In|'+char(10)+'=access to the Spring beans in the EL'+char(10)+'=injection of Seam components into Spring beans using Spring XML'+char(10)+'=integration of the Spring DAO framework with Seam-managed persistence contexts'+char(10)+''+char(10)+'So, you''ll be able to easily call existing code written in Spring from your Seam component, JSF views, or jBPM process definitions, and have that code be able to take advantage of Seam''s conversation-scope!
persistence contexts. For the first time, you can have Spring!
code th
at isn''t vulnerable to |LazyInitializationException|!'+char(10)+'We''ll probably even go as far as:'+char(10)+''+char(10)+'=The ability to treat a Spring bean as a Seam |STATELESS JAVA\_BEAN| component, with a full stack of Seam interceptors'+char(10)+''+char(10)+'In which case a class can simultaneously be a Seam component and a Spring bean, the same way a class can simultaneously be a JSF managed beans, an EJB3 session bean, and a Seam component today.'+char(10)+''+char(10)+'++++Seam/Security'+char(10)+''+char(10)+'The most-requested feature in the Seam forums is security. Unfortunately, the security-related specifications did not go through the same process of self-examination and improvement in Java EE 5 that some other specifications (EJB) did, and so there is now a yawning hole, exactly where the platform should strongest. (Today the most inadequate specifications in Java are the portlet spec, the atrocious servlet spec, and any JSR relating to security.) Seam 1.1.5 w!
ill introduce Seam/Security, an extension to Seam that provides:'+char(10)+''+char(10)+'=a usable authentication layer'+char(10)+'=an ACL based permissioning model'+char(10)+'=an optional (customizable) user/role model'+char(10)+'=a totally cool (at least we think so) authorization mechanism based upon EL and Drools'+char(10)+''+char(10)+'The permissioning model lets you do \"row level\" security by writing rules that refer to the actual object instance that we are checking permissions for.'+char(10)+''+char(10)+'A subsequent release will also provide a console for administration of permissions, users/roles and rules. OK, I''m sure that sounds pretty vague now, but stay tuned.'+char(10)+''+char(10)+'++++Seam and iText'+char(10)+'Generating PDF is amazingly unsexy, but also incredibly useful. Seam 1.1.5 will provide a library of JSF controls for iText, letting you quickly create JSF templates that are capable of rendering PDF, Text and RTF. This will be as easy to use as:'+c!
har(10)+''+char(10)+'`<it:document xmlns:f="http://java.sun.co!
m/jsf/co
re"'+char(10)+' xmlns:it="http://jboss.com/products/seam/pdf">'+char(10)+' <it:paragraph>Hello World!</it:paragraph>'+char(10)+'</f:view>`'+char(10)+''+char(10)+'++++Integration of seam-gen with Hibernate Tools'+char(10)+''+char(10)+'Rails has made commandline tools popular for web development, and was the inspiration behind seam-gen. But I''m one of those recalcitrant IDE kinda guys, and I expect tooling to be properly integrated with Eclipse. We''ll be updating the GUI for Hibernate Tools to take advantage of the new templates in Seam 1.1, which will let you do everything you can do today using seam-gen, totally within Eclipse.'+char(10)+''+char(10)+'++++Seam/WS'+char(10)+''+char(10)+'We''ve been promising for months that Seam is the killer component model for SOA. Unfortunately, we got so bogged down in Seam 1.1 that we''re well behind on our original plan to deliver this in 2006.'+char(10)+''+char(10)+'Seam 1.2 will integrate Seam with the Java EE 5 Web Service!
s layer and provide support for service conversations in its context model (I''ve not yet decided whether this calls for a new |SERVICE\_CONVERSATION| context, or whether it is just a different interpretation of the existing |CONVERSATION| context for a WS invocation.) Eventually, Seam/WS will also support service orchestration and conversation recovery via jBPM.'+char(10)+''+char(10)+'Actually, Seam/WS will just be one piece of a larger initiative to bring Seam to ESB and SOA environments, but at present this idea is mostly speculative.'+char(10)+''+char(10)+'Look for a beta release of Seam 1.2 in Q1.', '2006-12-14 15:29')
+insert into blogentry (blog_name, id, title, excerpt, body, date) values ('JBoss Seam Blog', 'seamtext', 'Introducing Seam Text', null, 'Seam Text is a human-friendly language for formatting text in blogs, forums and wikis. It''s easy to enter text in *emphasis*, |monospace|, ~deleted~ or ^superscript^; you can easily enter links, lists, quotes and code blocks.', '2007-01-18 14:00:00')
+insert into blogentry (blog_name, id, title, excerpt, body, date) values ('JBoss Seam Blog', 'book', 'Seam book excerpt on InfoQ', null, 'Michael and Thomas are writing [a book=>http://safari.oreilly.com/013241273X] about Seam for [O''Reilly=>http://www.oreillynet.com/], which is apparently the hottest selling item on Rough Cuts. InfoQ are running an [excerpt=>http://www.infoq.com/articles/jboss-seam] from the first chapter. Meanwhile, Norman and I have been tearing our way through JIRA issues, and so 1.1.1 will be ready to go when I get back from vacation :-)', '2006-12-19 19:00:00')
+insert into blogentry (blog_name, id, title, excerpt, body, date) values ('JBoss Seam Blog', 'roadmap11', 'Seam Roadmap', 'The [1.1 release=>http://blog.hibernate.org/cgi-bin/blosxom.cgi/2006/12/13#seam11-goes-ga] involved a lot of hard work in the guts of Seam, refactoring and fixing bugs, and working with \"tricky\" code that handles concerns like clustering and concurrency. Sure, there are many new features, but a lot of the real work is less user-visible. Now that this hard stuff is out of the way, it lets us add some interesting new stuff pretty quickly. Here''s a quick roadmap for the next few months:', 'The [1.1 release=>http://blog.hibernate.org/cgi-bin/blosxom.cgi/2006/12/13#seam11-goes-ga] involved a lot of hard work in the guts of Seam, refactoring and fixing bugs, and working with \"tricky\" code that handles concerns like clustering and concurrency. Sure, there are many new features, but a lot of the real work is less user-visible. Now that this hard stuff is o!
ut of the way, it lets us add some interesting new stuff pretty quickly. Here''s a quick roadmap for the next few months.', '2006-12-14 15:29:00')
Modified: branches/community/Seam_2_3/examples-ee6/blog/blog-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/blog/blog-tests/pom.xml 2012-04-05 12:42:07 UTC (rev 14526)
+++ branches/community/Seam_2_3/examples-ee6/blog/blog-tests/pom.xml 2012-04-05 15:11:13 UTC (rev 14527)
@@ -35,6 +35,11 @@
<artifactId>hibernate-jpa-2.0-api</artifactId>
</dependency>
<dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>org.jboss.spec.javax.faces</groupId>
<artifactId>jboss-jsf-api_2.0_spec</artifactId>
</dependency>
Modified: branches/community/Seam_2_3/examples-ee6/blog/blog-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/blog/blog-web/pom.xml 2012-04-05 12:42:07 UTC (rev 14526)
+++ branches/community/Seam_2_3/examples-ee6/blog/blog-web/pom.xml 2012-04-05 15:11:13 UTC (rev 14527)
@@ -25,13 +25,14 @@
<dependency>
<groupId>org.jboss.seam.examples-ee6</groupId>
<artifactId>blog-ejb</artifactId>
- <version>${project.version}</version>
<type>ejb</type>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
- <version>${project.version}</version>
+ <type>ejb</type>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
@@ -73,10 +74,6 @@
<artifactId>jboss-jsf-api_2.0_spec</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-search</artifactId>
- </dependency>
</dependencies>
<build>
Modified: branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/WEB-INF/components.xml 2012-04-05 12:42:07 UTC (rev 14526)
+++ branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/WEB-INF/components.xml 2012-04-05 15:11:13 UTC (rev 14527)
@@ -30,8 +30,10 @@
</theme:available-themes>
</theme:theme-selector>
- <!--<persistence:managed-persistence-context auto-create="true" name="entityManager">-->
- <!--<persistence:persistence-unit-jndi-name>java:/blogEntityManagerFactory</persistence:persistence-unit-jndi-name>-->
- <!--</persistence:managed-persistence-context>-->
+ <persistence:managed-persistence-context auto-create="true" name="entityManager">
+ <persistence:persistence-unit-jndi-name>java:/blogEntityManagerFactory</persistence:persistence-unit-jndi-name>
+ </persistence:managed-persistence-context>
+ <cache:eh-cache-provider/>
+
</components>
Modified: branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/WEB-INF/faces-config.xml 2012-04-05 12:42:07 UTC (rev 14526)
+++ branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/WEB-INF/faces-config.xml 2012-04-05 15:11:13 UTC (rev 14527)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<faces-config version="1.2"
+<faces-config version="2.1"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd">
Modified: branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/print.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/print.xhtml 2012-04-05 12:42:07 UTC (rev 14526)
+++ branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/print.xhtml 2012-04-05 15:11:13 UTC (rev 14527)
@@ -9,13 +9,13 @@
lang="en">
<f:view>
- <head>
+ <h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>#{blog.name}</title>
<link href="#{theme.css}" rel="stylesheet" type="text/css" />
- </head>
+ </h:head>
- <body>
+ <h:body>
<div id="menu">
<ui:include src="nav.xhtml"/>
  
@@ -26,7 +26,7 @@
<p>[Timezone: #{blog.timeZone.displayName}]</p>
<ui:insert name="content"/>
</div>
- </body>
+ </h:body>
</f:view>
</html>
Modified: branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/template.xhtml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/template.xhtml 2012-04-05 12:42:07 UTC (rev 14526)
+++ branches/community/Seam_2_3/examples-ee6/blog/blog-web/src/main/webapp/template.xhtml 2012-04-05 15:11:13 UTC (rev 14527)
@@ -9,7 +9,7 @@
lang="en">
<f:view>
- <head>
+ <h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>#{blog.name}</title>
<link href="#{theme.css}" rel="stylesheet" type="text/css" />
@@ -18,9 +18,9 @@
title="atom"
href="#{request.contextPath}/seam/index.xml" />
- </head>
+ </h:head>
- <body>
+ <h:body>
<div id="menu">
<ui:include src="menu.xhtml"/>
</div>
@@ -35,7 +35,7 @@
Total pageviews: #{blog.hitCount.pageviews}
</div>
</div>
- </body>
+ </h:body>
</f:view>
</html>
12 years
Seam SVN: r14526 - in branches/community/Seam_2_3/examples-ee6/ui: ui-tests and 1 other directories.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-04-05 08:42:07 -0400 (Thu, 05 Apr 2012)
New Revision: 14526
Modified:
branches/community/Seam_2_3/examples-ee6/ui/ui-ejb/pom.xml
branches/community/Seam_2_3/examples-ee6/ui/ui-tests/pom.xml
branches/community/Seam_2_3/examples-ee6/ui/ui-web/pom.xml
Log:
cleanup ui example
Modified: branches/community/Seam_2_3/examples-ee6/ui/ui-ejb/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/ui/ui-ejb/pom.xml 2012-04-05 12:29:40 UTC (rev 14525)
+++ branches/community/Seam_2_3/examples-ee6/ui/ui-ejb/pom.xml 2012-04-05 12:42:07 UTC (rev 14526)
@@ -11,7 +11,7 @@
<groupId>org.jboss.seam.examples-ee6.ui</groupId>
<artifactId>ui-ejb</artifactId>
<packaging>ejb</packaging>
- <name>UI EJB Module</name>
+ <name>UI EJB Module (EE6)</name>
<dependencies>
<dependency>
@@ -22,14 +22,17 @@
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.ejb</groupId>
<artifactId>jboss-ejb-api_3.1_spec</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.faces</groupId>
Modified: branches/community/Seam_2_3/examples-ee6/ui/ui-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/ui/ui-tests/pom.xml 2012-04-05 12:29:40 UTC (rev 14525)
+++ branches/community/Seam_2_3/examples-ee6/ui/ui-tests/pom.xml 2012-04-05 12:42:07 UTC (rev 14526)
@@ -10,7 +10,7 @@
<groupId>org.jboss.seam.examples-ee6.ui</groupId>
<artifactId>ui-tests</artifactId>
- <name>UI Integration Tests Module</name>
+ <name>UI Integration Tests Module (EE6)</name>
<dependencies>
<dependency>
Modified: branches/community/Seam_2_3/examples-ee6/ui/ui-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/ui/ui-web/pom.xml 2012-04-05 12:29:40 UTC (rev 14525)
+++ branches/community/Seam_2_3/examples-ee6/ui/ui-web/pom.xml 2012-04-05 12:42:07 UTC (rev 14526)
@@ -29,6 +29,7 @@
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
<type>ejb</type>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
12 years
Seam SVN: r14525 - in branches/community/Seam_2_3/examples-ee6/tasks: tasks-web and 1 other directory.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-04-05 08:29:40 -0400 (Thu, 05 Apr 2012)
New Revision: 14525
Modified:
branches/community/Seam_2_3/examples-ee6/tasks/tasks-ear/pom.xml
branches/community/Seam_2_3/examples-ee6/tasks/tasks-web/pom.xml
Log:
cleanup tasks example
Modified: branches/community/Seam_2_3/examples-ee6/tasks/tasks-ear/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/tasks/tasks-ear/pom.xml 2012-04-05 12:23:08 UTC (rev 14524)
+++ branches/community/Seam_2_3/examples-ee6/tasks/tasks-ear/pom.xml 2012-04-05 12:29:40 UTC (rev 14525)
@@ -29,16 +29,6 @@
<artifactId>jboss-seam</artifactId>
<type>ejb</type>
<scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xpp3</groupId>
- <artifactId>xpp3_min</artifactId>
- </exclusion>
- </exclusions>
</dependency>
</dependencies>
Modified: branches/community/Seam_2_3/examples-ee6/tasks/tasks-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/tasks/tasks-web/pom.xml 2012-04-05 12:23:08 UTC (rev 14524)
+++ branches/community/Seam_2_3/examples-ee6/tasks/tasks-web/pom.xml 2012-04-05 12:29:40 UTC (rev 14525)
@@ -29,6 +29,7 @@
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
<type>ejb</type>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
12 years
Seam SVN: r14524 - in branches/community/Seam_2_3/examples-ee6/seamspace: seamspace-ejb and 1 other directories.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-04-05 08:23:08 -0400 (Thu, 05 Apr 2012)
New Revision: 14524
Modified:
branches/community/Seam_2_3/examples-ee6/seamspace/seamspace-ear/pom.xml
branches/community/Seam_2_3/examples-ee6/seamspace/seamspace-ejb/pom.xml
branches/community/Seam_2_3/examples-ee6/seamspace/seamspace-web/pom.xml
Log:
cleanup seamspace example
Modified: branches/community/Seam_2_3/examples-ee6/seamspace/seamspace-ear/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamspace/seamspace-ear/pom.xml 2012-04-05 12:12:01 UTC (rev 14523)
+++ branches/community/Seam_2_3/examples-ee6/seamspace/seamspace-ear/pom.xml 2012-04-05 12:23:08 UTC (rev 14524)
@@ -29,16 +29,6 @@
<artifactId>jboss-seam</artifactId>
<type>ejb</type>
<scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xpp3</groupId>
- <artifactId>xpp3_min</artifactId>
- </exclusion>
- </exclusions>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
@@ -105,6 +95,11 @@
<artifactId>seamspace-ejb</artifactId>
<bundleFileName>seamspace-ejb.jar</bundleFileName>
</ejbModule>
+ <ejbModule>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <bundleFileName>jboss-seam.jar</bundleFileName>
+ </ejbModule>
</modules>
</configuration>
</plugin>
Modified: branches/community/Seam_2_3/examples-ee6/seamspace/seamspace-ejb/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamspace/seamspace-ejb/pom.xml 2012-04-05 12:12:01 UTC (rev 14523)
+++ branches/community/Seam_2_3/examples-ee6/seamspace/seamspace-ejb/pom.xml 2012-04-05 12:23:08 UTC (rev 14524)
@@ -42,10 +42,12 @@
<dependency>
<groupId>org.jboss.spec.javax.ejb</groupId>
<artifactId>jboss-ejb-api_3.1_spec</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.faces</groupId>
<artifactId>jboss-jsf-api_2.0_spec</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.drools</groupId>
Modified: branches/community/Seam_2_3/examples-ee6/seamspace/seamspace-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seamspace/seamspace-web/pom.xml 2012-04-05 12:12:01 UTC (rev 14523)
+++ branches/community/Seam_2_3/examples-ee6/seamspace/seamspace-web/pom.xml 2012-04-05 12:23:08 UTC (rev 14524)
@@ -29,6 +29,7 @@
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
<type>ejb</type>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
12 years
Seam SVN: r14523 - in branches/community/Seam_2_3/examples-ee6/seambay: seambay-ejb/src/main/java/org/jboss/seam/example/seambay and 2 other directories.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-04-05 08:12:01 -0400 (Thu, 05 Apr 2012)
New Revision: 14523
Modified:
branches/community/Seam_2_3/examples-ee6/seambay/seambay-ear/pom.xml
branches/community/Seam_2_3/examples-ee6/seambay/seambay-ejb/src/main/java/org/jboss/seam/example/seambay/CategoryAction.java
branches/community/Seam_2_3/examples-ee6/seambay/seambay-tests/src/test/java/org/jboss/seam/example/seambay/test/webdriver/WebServicesTest.java
branches/community/Seam_2_3/examples-ee6/seambay/seambay-web/pom.xml
Log:
clean seambay example and fix the ftests
Modified: branches/community/Seam_2_3/examples-ee6/seambay/seambay-ear/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seambay/seambay-ear/pom.xml 2012-04-05 11:44:49 UTC (rev 14522)
+++ branches/community/Seam_2_3/examples-ee6/seambay/seambay-ear/pom.xml 2012-04-05 12:12:01 UTC (rev 14523)
@@ -29,16 +29,6 @@
<artifactId>jboss-seam</artifactId>
<type>ejb</type>
<scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xpp3</groupId>
- <artifactId>xpp3_min</artifactId>
- </exclusion>
- </exclusions>
</dependency>
</dependencies>
Modified: branches/community/Seam_2_3/examples-ee6/seambay/seambay-ejb/src/main/java/org/jboss/seam/example/seambay/CategoryAction.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seambay/seambay-ejb/src/main/java/org/jboss/seam/example/seambay/CategoryAction.java 2012-04-05 11:44:49 UTC (rev 14522)
+++ branches/community/Seam_2_3/examples-ee6/seambay/seambay-ejb/src/main/java/org/jboss/seam/example/seambay/CategoryAction.java 2012-04-05 12:12:01 UTC (rev 14523)
@@ -48,7 +48,7 @@
@WebRemote
public List<Category> getAllCategories()
{
- allCategories = entityManager.createQuery("from Category").getResultList();
+ allCategories = entityManager.createQuery("from Category c order by c.categoryId").getResultList();
return allCategories;
}
Modified: branches/community/Seam_2_3/examples-ee6/seambay/seambay-tests/src/test/java/org/jboss/seam/example/seambay/test/webdriver/WebServicesTest.java
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seambay/seambay-tests/src/test/java/org/jboss/seam/example/seambay/test/webdriver/WebServicesTest.java 2012-04-05 11:44:49 UTC (rev 14522)
+++ branches/community/Seam_2_3/examples-ee6/seambay/seambay-tests/src/test/java/org/jboss/seam/example/seambay/test/webdriver/WebServicesTest.java 2012-04-05 12:12:01 UTC (rev 14523)
@@ -61,7 +61,7 @@
protected static final String SET_DURATION_RESPONSE_JBOSS_4 = "<setAuctionDurationResponse xmlns=\"http://seambay.example.seam.jboss.org/";
protected static final String SET_STARTING_PRICE_RESPONSE_JBOSS_56 = "<ns2:setAuctionPriceResponse xmlns:ns2=\"http://seambay.example.seam.jboss.org/\"";
protected static final String SET_STARTING_PRICE_RESPONSE_JBOSS_4 = "<setAuctionPriceResponse xmlns=\"http://seambay.example.seam.jboss.org/";
- protected static final String AUCTION_DETAILS_PRICE_RESPONSE = "<ns2:getNewAuctionDetailsResponse xmlns:ns2=\"http://seambay.example.seam.jboss.org/\"><return><account><accountId>1</accountId><feedbackPercent>0.0</feedbackPercent><feedbackScore>0</feedbackScore><location>Sydney, NSW, Australia</location>";
+ protected static final String AUCTION_DETAILS_PRICE_RESPONSE = "<ns2:getNewAuctionDetailsResponse xmlns:ns2=\"http://seambay.example.seam.jboss.org/\"><return><account><accountId>-1</accountId><feedbackPercent>0.0</feedbackPercent><feedbackScore>0</feedbackScore><location>Sydney, NSW, Australia</location>";
protected static final String LOGOUT_RESPONSE = "<ns2:logoutResponse xmlns:ns2=\"http://seambay.example.seam.jboss.org/\"><return>true</return></ns2:logoutResponse>";
protected static final String CONFIRMATION_RESPONSE_JBOSS_56 = "<ns2:confirmAuctionResponse xmlns:ns2=\"http://seambay.example.seam.jboss.org/\"";
protected static final String CONFIRMATION_RESPONSE_JBOSS_4 = "<confirmAuctionResponse xmlns=\"http://seambay.example.seam.jboss.org/\"";
Modified: branches/community/Seam_2_3/examples-ee6/seambay/seambay-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/seambay/seambay-web/pom.xml 2012-04-05 11:44:49 UTC (rev 14522)
+++ branches/community/Seam_2_3/examples-ee6/seambay/seambay-web/pom.xml 2012-04-05 12:12:01 UTC (rev 14523)
@@ -29,6 +29,7 @@
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
<type>ejb</type>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
12 years
Seam SVN: r14522 - in branches/community/Seam_2_3/examples-ee6/restbay: restbay-web and 1 other directory.
by seam-commits@lists.jboss.org
Author: maschmid
Date: 2012-04-05 07:44:49 -0400 (Thu, 05 Apr 2012)
New Revision: 14522
Modified:
branches/community/Seam_2_3/examples-ee6/restbay/restbay-ear/pom.xml
branches/community/Seam_2_3/examples-ee6/restbay/restbay-web/pom.xml
Log:
restbay example cleanup
Modified: branches/community/Seam_2_3/examples-ee6/restbay/restbay-ear/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/restbay/restbay-ear/pom.xml 2012-04-05 11:33:49 UTC (rev 14521)
+++ branches/community/Seam_2_3/examples-ee6/restbay/restbay-ear/pom.xml 2012-04-05 11:44:49 UTC (rev 14522)
@@ -29,16 +29,6 @@
<artifactId>jboss-seam</artifactId>
<type>ejb</type>
<scope>compile</scope>
- <exclusions>
- <exclusion>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xpp3</groupId>
- <artifactId>xpp3_min</artifactId>
- </exclusion>
- </exclusions>
</dependency>
</dependencies>
Modified: branches/community/Seam_2_3/examples-ee6/restbay/restbay-web/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/restbay/restbay-web/pom.xml 2012-04-05 11:33:49 UTC (rev 14521)
+++ branches/community/Seam_2_3/examples-ee6/restbay/restbay-web/pom.xml 2012-04-05 11:44:49 UTC (rev 14522)
@@ -29,6 +29,7 @@
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
<type>ejb</type>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
12 years