Seam SVN: r12884 - modules/international/trunk.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-05-28 08:35:53 -0400 (Fri, 28 May 2010)
New Revision: 12884
Modified:
modules/international/trunk/pom.xml
Log:
clean ups to POM as a result of weld-parent:10
Modified: modules/international/trunk/pom.xml
===================================================================
--- modules/international/trunk/pom.xml 2010-05-28 12:34:39 UTC (rev 12883)
+++ modules/international/trunk/pom.xml 2010-05-28 12:35:53 UTC (rev 12884)
@@ -5,7 +5,7 @@
<parent&…
[View More]gt;
<groupId>org.jboss.weld</groupId>
<artifactId>weld-parent</artifactId>
- <version>9</version>
+ <version>10</version>
</parent>
<artifactId>seam-international-parent</artifactId>
@@ -52,14 +52,6 @@
</dependencies>
</dependencyManagement>
- <repositories>
- <repository>
- <id>jboss-public-repository-group</id>
- <name>JBoss Public Maven Repository Group</name>
- <url>https://repository.jboss.org/nexus/content/groups/public/</url>
- </repository>
- </repositories>
-
<dependencies>
<!-- Environment Dependencies -->
@@ -135,89 +127,6 @@
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>code-coverage</id>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>emma-maven-plugin</artifactId>
- <version>${emma.maven.plugin.version}</version>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>instrumentation</id>
- <phase>process-classes</phase>
- <goals>
- <goal>instrument</goal>
- </goals>
- <configuration>
- <verbose>true</verbose>
- </configuration>
- </execution>
- <execution>
- <id>cleaning</id>
- <phase>clean</phase>
- <goals>
- <goal>clean</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <forkMode>once</forkMode>
- <classesDirectory>${project.build.directory}/generated-classes/emma/classes</classesDirectory>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.sonatype.maven.plugin</groupId>
- <artifactId>emma4it-maven-plugin</artifactId>
- <version>${emma4it.maven.plugin.version}</version>
- <executions>
- <execution>
- <id>report</id>
- <phase>test</phase>
- <goals>
- <goal>report</goal>
- </goals>
- <configuration>
- <sourceSets>
- <sourceSet>
- <directory>${project.build.sourceDirectory}</directory>
- </sourceSet>
- </sourceSets>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- </profile>
- </profiles>
-
<developers>
<developer>
<name>Lincoln Baxter, III</name>
[View Less]
14 years, 9 months
Seam SVN: r12883 - in modules/faces/trunk: docs/reference and 1 other directories.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-05-28 08:34:39 -0400 (Fri, 28 May 2010)
New Revision: 12883
Modified:
modules/faces/trunk/docs/reference/pom.xml
modules/faces/trunk/examples/short-ly/pom.xml
modules/faces/trunk/pom.xml
Log:
clean ups to POM as a result of weld-parent:10
Modified: modules/faces/trunk/docs/reference/pom.xml
===================================================================
--- modules/faces/trunk/docs/reference/pom.xml 2010-05-28 12:34:05 UTC (rev 12882)
+++ …
[View More]modules/faces/trunk/docs/reference/pom.xml 2010-05-28 12:34:39 UTC (rev 12883)
@@ -12,7 +12,7 @@
<parent>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-parent</artifactId>
- <version>9</version>
+ <version>10-SNAPSHOT</version>
</parent>
<properties>
@@ -24,12 +24,6 @@
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jdocbook-plugin</artifactId>
- <configuration>
- <sourceDirectory>${project.basedir}/src/main/docbook</sourceDirectory>
- <imageResource>
- <directory>${project.basedir}/src/main/docbook/en-US</directory>
- </imageResource>
- </configuration>
</plugin>
</plugins>
</build>
Modified: modules/faces/trunk/examples/short-ly/pom.xml
===================================================================
--- modules/faces/trunk/examples/short-ly/pom.xml 2010-05-28 12:34:05 UTC (rev 12882)
+++ modules/faces/trunk/examples/short-ly/pom.xml 2010-05-28 12:34:39 UTC (rev 12883)
@@ -1,137 +1,97 @@
<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>
+ 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.faces</groupId>
- <artifactId>seam-faces-examples-short-ly</artifactId>
+ <parent>
+ <groupId>org.jboss.seam.faces</groupId>
+ <artifactId>seam-faces-parent</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ </parent>
- <packaging>war</packaging>
- <version>3.0.0-SNAPSHOT</version>
- <name>Seam Faces Example bit.ly clone with PrettyFaces</name>
+ <groupId>org.jboss.seam.faces</groupId>
+ <artifactId>seam-faces-examples-short-ly</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <packaging>war</packaging>
+ <name>Seam Faces Example bit.ly clone with PrettyFaces</name>
- <url>http://seamframework.org</url>
+ <url>http://seamframework.org</url>
- <repositories>
- <repository>
- <id>java.net2</id>
- <name>Repository hosting the jee6 artifacts</name>
- <url>http://download.java.net/maven/2</url>
- </repository>
- <repository>
- <id>JBoss.ORG</id>
- <name>JBoss Maven Repository</name>
- <url>http://repository.jboss.org/maven2/</url>
- </repository>
- </repositories>
+ <properties>
+ <hibernate.version>3.5.1-Final</hibernate.version>
+ </properties>
- <properties>
- <hibernate.version>3.5.1-Final</hibernate.version>
- </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.seam.faces</groupId>
+ <artifactId>seam-faces</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ </dependency>
- <dependencies>
- <dependency>
- <groupId>org.jboss.seam.faces</groupId>
- <artifactId>seam-faces</artifactId>
- <version>3.0.0-SNAPSHOT</version>
- </dependency>
+ <dependency>
+ <groupId>javax</groupId>
+ <artifactId>javaee-web-api</artifactId>
+ <version>6.0</version>
+ <scope>provided</scope>
+ </dependency>
- <dependency>
- <groupId>javax</groupId>
- <artifactId>javaee-web-api</artifactId>
- <version>6.0</version>
- <scope>provided</scope>
- </dependency>
+ <dependency>
+ <groupId>com.ocpsoft</groupId>
+ <artifactId>ocpsoft-pretty-faces</artifactId>
+ <version>2.0.4</version>
+ </dependency>
- <dependency>
- <groupId>com.ocpsoft</groupId>
- <artifactId>ocpsoft-pretty-faces</artifactId>
- <version>2.0.4</version>
- </dependency>
+ <dependency>
+ <groupId>com.ocpsoft</groupId>
+ <artifactId>ocpsoft-pretty-time</artifactId>
+ <version>1.0.5</version>
+ </dependency>
- <dependency>
- <groupId>com.ocpsoft</groupId>
- <artifactId>ocpsoft-pretty-time</artifactId>
- <version>1.0.5</version>
- </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>${hibernate.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>${hibernate.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>${hibernate.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>1.8.0.10</version>
+ </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>${hibernate.version}</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-annotations</artifactId>
- <version>${hibernate.version}</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-entitymanager</artifactId>
- <version>${hibernate.version}</version>
- </dependency>
- <dependency>
- <groupId>org.hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <version>1.8.0.10</version>
- </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.glassfish</groupId>
+ <artifactId>maven-embedded-glassfish-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ <finalName>short.ly</finalName>
+ </build>
- <pluginRepositories>
- <pluginRepository>
- <id>Glassfish</id>
- <url>http://download.java.net/maven/glassfish/</url>
- </pluginRepository>
- </pluginRepositories>
-
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.glassfish</groupId>
- <artifactId>maven-embedded-glassfish-plugin</artifactId>
- <version>3.0</version>
- <configuration>
- <goalPrefix>glassfish</goalPrefix>
- <app>${project.build.directory}/${build.finalName}.war</app>
- <port>8080</port>
- <contextRoot>${build.finalName}</contextRoot>
- </configuration>
- <executions>
- <execution>
- <phase>install</phase>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.1-beta-1</version>
- <configuration>
- <failOnMissingWebXml>false</failOnMissingWebXml>
- </configuration>
- </plugin>
- </plugins>
- <finalName>short.ly</finalName>
- </build>
-
</project>
Modified: modules/faces/trunk/pom.xml
===================================================================
--- modules/faces/trunk/pom.xml 2010-05-28 12:34:05 UTC (rev 12882)
+++ modules/faces/trunk/pom.xml 2010-05-28 12:34:39 UTC (rev 12883)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-parent</artifactId>
- <version>9</version>
+ <version>10</version>
</parent>
<artifactId>seam-faces-parent</artifactId>
@@ -157,72 +157,6 @@
</dependency>
</dependencies>
</profile>
- <profile>
- <id>code-coverage</id>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>emma-maven-plugin</artifactId>
- <version>${emma.maven.plugin.version}</version>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>instrumentation</id>
- <phase>process-classes</phase>
- <goals>
- <goal>instrument</goal>
- </goals>
- <configuration>
- <verbose>true</verbose>
- </configuration>
- </execution>
- <execution>
- <id>cleaning</id>
- <phase>clean</phase>
- <goals>
- <goal>clean</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <forkMode>once</forkMode>
- <classesDirectory>${project.build.directory}/generated-classes/emma/classes</classesDirectory>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.sonatype.maven.plugin</groupId>
- <artifactId>emma4it-maven-plugin</artifactId>
- <version>${emma4it.maven.plugin.version}</version>
- <executions>
- <execution>
- <id>report</id>
- <phase>test</phase>
- <goals>
- <goal>report</goal>
- </goals>
- <configuration>
- <sourceSets>
- <sourceSet>
- <directory>${project.build.sourceDirectory}</directory>
- </sourceSet>
- </sourceSets>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- </profile>
</profiles>
<developers>
[View Less]
14 years, 9 months
Seam SVN: r12882 - modules/faces/trunk/examples/short-ly.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-05-28 08:34:05 -0400 (Fri, 28 May 2010)
New Revision: 12882
Modified:
modules/faces/trunk/examples/short-ly/
Log:
ignores
Property changes on: modules/faces/trunk/examples/short-ly
___________________________________________________________________
Name: svn:ignore
- .settings
target
.classpath
.project
+ .settings
target
.classpath
.project
gfembed*tmp
14 years, 9 months
Seam SVN: r12881 - in modules/drools/trunk: api and 1 other directories.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-05-28 08:32:17 -0400 (Fri, 28 May 2010)
New Revision: 12881
Modified:
modules/drools/trunk/api/pom.xml
modules/drools/trunk/impl/pom.xml
modules/drools/trunk/pom.xml
Log:
clean ups to POM as a result of weld-parent:10
Modified: modules/drools/trunk/api/pom.xml
===================================================================
--- modules/drools/trunk/api/pom.xml 2010-05-28 12:29:48 UTC (rev 12880)
+++ modules/drools/trunk/api/pom.xml 2010-05-…
[View More]28 12:32:17 UTC (rev 12881)
@@ -14,26 +14,6 @@
<packaging>jar</packaging>
<name>Seam Drools Module API</name>
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/maven2</url>
- </repository>
- <repository>
- <id>apache.org-snapshots</id>
- <name>Apache Snapshots Repository</name>
- <url>http://repository.apache.org/snapshots</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- </repository>
- </repositories>
-
<dependencies>
<dependency>
<groupId>javax.el</groupId>
@@ -106,14 +86,5 @@
<scope>test</scope>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.6.1</version>
- </plugin>
- </plugins>
- </build>
</project>
Modified: modules/drools/trunk/impl/pom.xml
===================================================================
--- modules/drools/trunk/impl/pom.xml 2010-05-28 12:29:48 UTC (rev 12880)
+++ modules/drools/trunk/impl/pom.xml 2010-05-28 12:32:17 UTC (rev 12881)
@@ -14,26 +14,6 @@
<packaging>jar</packaging>
<name>Seam Drools Module Core Implementation</name>
- <repositories>
- <repository>
- <id>repository.jboss.org</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/maven2</url>
- </repository>
- <repository>
- <id>apache.org-snapshots</id>
- <name>Apache Snapshots Repository</name>
- <url>http://repository.apache.org/snapshots</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- </repository>
- </repositories>
-
<dependencies>
<dependency>
<groupId>javax.el</groupId>
@@ -109,14 +89,5 @@
<scope>compile</scope>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.6.1</version>
- </plugin>
- </plugins>
- </build>
</project>
Modified: modules/drools/trunk/pom.xml
===================================================================
--- modules/drools/trunk/pom.xml 2010-05-28 12:29:48 UTC (rev 12880)
+++ modules/drools/trunk/pom.xml 2010-05-28 12:32:17 UTC (rev 12881)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-parent</artifactId>
- <version>9</version>
+ <version>10</version>
</parent>
<groupId>org.jboss.seam.drools</groupId>
@@ -42,12 +42,8 @@
<build>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <descriptors>
- <descriptor>src/main/assembly.xml</descriptor>
- </descriptors>
- </configuration>
</plugin>
</plugins>
</build>
[View Less]
14 years, 9 months
Seam SVN: r12880 - in build/trunk: parent and 1 other directory.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-05-28 08:29:48 -0400 (Fri, 28 May 2010)
New Revision: 12880
Modified:
build/trunk/module-archetype/pom.xml
build/trunk/parent/pom.xml
Log:
update to weld-parent:10
Modified: build/trunk/module-archetype/pom.xml
===================================================================
--- build/trunk/module-archetype/pom.xml 2010-05-28 01:37:24 UTC (rev 12879)
+++ build/trunk/module-archetype/pom.xml 2010-05-28 12:29:48 UTC (rev 12880)
@@ -9,7 +9,7 @@
…
[View More] <parent>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-parent</artifactId>
- <version>8</version>
+ <version>10</version>
</parent>
<description>
Modified: build/trunk/parent/pom.xml
===================================================================
--- build/trunk/parent/pom.xml 2010-05-28 01:37:24 UTC (rev 12879)
+++ build/trunk/parent/pom.xml 2010-05-28 12:29:48 UTC (rev 12880)
@@ -11,7 +11,7 @@
<parent>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-parent</artifactId>
- <version>9</version>
+ <version>10</version>
</parent>
<description>
[View Less]
14 years, 9 months
Seam SVN: r12879 - modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-05-27 21:37:24 -0400 (Thu, 27 May 2010)
New Revision: 12879
Added:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashContextImpl.java
Log:
First stab at real FlashScope implementation #3
Added: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashContextImpl.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/…
[View More]FlashContextImpl.java (rev 0)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashContextImpl.java 2010-05-28 01:37:24 UTC (rev 12879)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.faces.context;
+
+import java.io.Serializable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.enterprise.inject.Typed;
+
+/**
+ * @author <a href="mailto:lincolnbaxter@gmail.com>Lincoln Baxter, III</a>
+ *
+ */
+@Typed()
+public class FlashContextImpl implements FlashContext, Serializable
+{
+ private static final long serialVersionUID = 7502050909452181348L;
+ private String id = null;
+ private final Map<String, Object> map = new ConcurrentHashMap<String, Object>();
+
+ public Object get(final String key)
+ {
+ return map.get(key);
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public void setId(final String id)
+ {
+ this.id = id;
+ }
+
+ public boolean isEmpty()
+ {
+ return map.isEmpty();
+ }
+
+ public void put(final String key, final Object value)
+ {
+ map.put(key, value);
+ }
+
+}
[View Less]
14 years, 9 months
Seam SVN: r12878 - in modules/faces/trunk: impl/src/main/java/org/jboss/seam/faces/environment and 1 other directory.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-05-27 21:36:21 -0400 (Thu, 27 May 2010)
New Revision: 12878
Added:
modules/faces/trunk/api/src/main/java/org/jboss/seam/faces/context/FlashContext.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/SeamExternalContext.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/SeamExternalContextFactory.java
Log:
First stab at real FlashScope implementation #2
Added: modules/faces/trunk/api/src/main/java/org/…
[View More]jboss/seam/faces/context/FlashContext.java
===================================================================
--- modules/faces/trunk/api/src/main/java/org/jboss/seam/faces/context/FlashContext.java (rev 0)
+++ modules/faces/trunk/api/src/main/java/org/jboss/seam/faces/context/FlashContext.java 2010-05-28 01:36:21 UTC (rev 12878)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.faces.context;
+
+/**
+ * A context that lives from Restore View to the next Render Response.
+ *
+ * @author <a href="mailto:lincolnbaxter@gmail.com>Lincoln Baxter, III</a>
+ *
+ */
+public interface FlashContext
+{
+
+ /**
+ * Returns true if the current {@link FlashContext} contains no data.
+ */
+ boolean isEmpty();
+
+ /**
+ * Return the current ID of this request's {@link FlashContext}. If the ID
+ * has not yet been set as part of a redirect, the ID will be null.
+ */
+ String getId();
+
+ /**
+ * Get a key value pair from the {@link FlashContext}.
+ */
+ Object get(String key);
+
+ /**
+ * Put a key value pair into the {@link FlashContext}.
+ */
+ void put(String key, Object value);
+
+}
Added: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/SeamExternalContext.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/SeamExternalContext.java (rev 0)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/SeamExternalContext.java 2010-05-28 01:36:21 UTC (rev 12878)
@@ -0,0 +1,51 @@
+package org.jboss.seam.faces.environment;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.enterprise.context.RequestScoped;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.ExternalContextWrapper;
+import javax.inject.Inject;
+
+import org.jboss.seam.faces.context.FlashContext;
+import org.jboss.seam.faces.context.FlashScopedContext;
+
+@RequestScoped
+public class SeamExternalContext extends ExternalContextWrapper
+{
+ private ExternalContext wrapped;
+
+ @Inject
+ FlashContext flash;
+
+ @Inject
+ FlashScopedContext context;
+
+ public void setWrapped(final ExternalContext wrapped)
+ {
+ this.wrapped = wrapped;
+ }
+
+ @Override
+ public ExternalContext getWrapped()
+ {
+ return wrapped;
+ }
+
+ @Override
+ public String encodeRedirectURL(final String baseUrl, Map<String, List<String>> parameters)
+ {
+ if (!flash.isEmpty())
+ {
+ if (parameters == null)
+ {
+ parameters = new HashMap<String, List<String>>();
+ }
+ parameters.put(context.getRequestParameterName(), Arrays.asList(flash.getId()));
+ }
+ return super.encodeRedirectURL(baseUrl, parameters);
+ }
+}
Added: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/SeamExternalContextFactory.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/SeamExternalContextFactory.java (rev 0)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/SeamExternalContextFactory.java 2010-05-28 01:36:21 UTC (rev 12878)
@@ -0,0 +1,44 @@
+package org.jboss.seam.faces.environment;
+
+import javax.enterprise.inject.spi.BeanManager;
+import javax.faces.FacesException;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.ExternalContextFactory;
+
+import org.jboss.seam.faces.util.BeanManagerUtils;
+import org.jboss.weld.extensions.beanManager.BeanManagerAccessor;
+
+public class SeamExternalContextFactory extends ExternalContextFactory
+{
+ private final ExternalContextFactory parent;
+
+ public SeamExternalContextFactory(final ExternalContextFactory parent)
+ {
+ super();
+ this.parent = parent;
+ }
+
+ @Override
+ public ExternalContext getExternalContext(final Object context, final Object request, final Object response) throws FacesException
+ {
+ try
+ {
+ BeanManager manager = BeanManagerAccessor.getManager();
+
+ SeamExternalContext seamExternalContext = BeanManagerUtils.getContextualInstance(manager, SeamExternalContext.class);
+ seamExternalContext.setWrapped(parent.getExternalContext(context, request, response));
+
+ return seamExternalContext;
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException("Could not wrap ExternalContext", e);
+ }
+ }
+
+ @Override
+ public ExternalContextFactory getWrapped()
+ {
+ return parent;
+ }
+}
[View Less]
14 years, 9 months
Seam SVN: r12877 - in modules/faces/trunk/impl/src/main: java/org/jboss/seam/faces/event and 3 other directories.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-05-27 21:34:14 -0400 (Thu, 27 May 2010)
New Revision: 12877
Added:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashScopedContext.java
Removed:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashScopedContext.java
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/DelegatingPhaseListener.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/status/MessagesAdapter.java
…
[View More] modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/util/BeanManagerUtils.java
modules/faces/trunk/impl/src/main/resources/META-INF/faces-config.xml
Log:
First stab at real FlashScope implementation.
Deleted: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashScopedContext.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashScopedContext.java 2010-05-28 01:33:48 UTC (rev 12876)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashScopedContext.java 2010-05-28 01:34:14 UTC (rev 12877)
@@ -1,232 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., 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.faces.context;
-
-import java.io.IOException;
-import java.lang.annotation.Annotation;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.enterprise.context.ContextNotActiveException;
-import javax.enterprise.context.spi.Context;
-import javax.enterprise.context.spi.Contextual;
-import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observes;
-import javax.faces.bean.FlashScoped;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.faces.context.Flash;
-import javax.faces.event.PhaseEvent;
-import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
-import javax.faces.event.PreRenderViewEvent;
-import javax.inject.Inject;
-import javax.servlet.ServletRequest;
-
-/**
- * This class provides the lifecycle for the new JSF 2 Flash Context
- *
- * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
- */
-public class FlashScopedContext implements Context, PhaseListener
-{
- private static final long serialVersionUID = -1580689204988513798L;
-
- final static String COMPONENT_MAP_NAME = "org.jboss.seam.faces.flash.componentInstanceMap";
- final static String CREATIONAL_MAP_NAME = "org.jboss.seam.faces.flash.creationalInstanceMap";
-
- @SuppressWarnings("unchecked")
- public <T> T get(final Contextual<T> component)
- {
- assertActive();
- return (T) getComponentInstanceMap().get(component);
- }
-
- @SuppressWarnings("unchecked")
- public <T> T get(final Contextual<T> component, final CreationalContext<T> creationalContext)
- {
- assertActive();
-
- T instance = get(component);
-
- if (instance == null)
- {
- Map<Contextual<?>, CreationalContext<?>> creationalContextMap = getCreationalContextMap();
- Map<Contextual<?>, Object> componentInstanceMap = getComponentInstanceMap();
-
- synchronized (componentInstanceMap)
- {
- instance = (T) componentInstanceMap.get(component);
- if (instance == null)
- {
- instance = component.create(creationalContext);
-
- if (instance != null)
- {
- componentInstanceMap.put(component, instance);
- creationalContextMap.put(component, creationalContext);
- }
- }
- }
- }
-
- return instance;
- }
-
- public Class<? extends Annotation> getScope()
- {
- return FlashScoped.class;
- }
-
- public boolean isActive()
- {
- return getFlash() != null;
- }
-
- @Inject
- FacesContext context;
-
- /**
- * This method ensures that the contextual maps are populated before
- * rendering occurs (thus, before any contextual objects are created during
- * the Render Response phase.)
- * <p>
- * This method also ensures that the maps are available after Flash.clear()
- * is called immediately before Render Response is complete.
- *
- * @param event
- * @throws IOException
- */
- public void retrieveContextualMaps(@Observes final PreRenderViewEvent event) throws IOException
- {
- ExternalContext externalContext = context.getExternalContext();
- Object temp = externalContext.getRequest();
- if (temp instanceof ServletRequest)
- {
- Object componentMap = getComponentInstanceMap();
- Object creationalMap = getCreationalContextMap();
-
- ServletRequest request = (ServletRequest) temp;
- request.setAttribute(FlashScopedContext.COMPONENT_MAP_NAME, componentMap);
- request.setAttribute(FlashScopedContext.CREATIONAL_MAP_NAME, creationalMap);
- }
- }
-
- public void beforePhase(final PhaseEvent event)
- {
- }
-
- /**
- * This method saves the current scope metadata into the Flash after Restore
- * View, then destroys the metadata after Render Response. Since the current
- * request's execution Flash is swapped with the last requests execution
- * flash for the Render Response phase, the last request's execution flash is
- * actually the one that gets cleaned up.
- * <p>
- * Preserve this request's new metadata. Do the object cleanup using our
- * saved references from last request.
- */
- @SuppressWarnings("unchecked")
- public void afterPhase(final PhaseEvent event)
- {
- if (PhaseId.RENDER_RESPONSE.equals(event.getPhaseId()))
- {
- ExternalContext externalContext = event.getFacesContext().getExternalContext();
- Object temp = externalContext.getRequest();
- if (temp instanceof ServletRequest)
- {
- ServletRequest request = (ServletRequest) temp;
-
- Map<Contextual<?>, Object> componentInstanceMap = (Map<Contextual<?>, Object>) request.getAttribute(FlashScopedContext.COMPONENT_MAP_NAME);
- Map<Contextual<?>, CreationalContext<?>> creationalContextMap = (Map<Contextual<?>, CreationalContext<?>>) request.getAttribute(FlashScopedContext.CREATIONAL_MAP_NAME);
-
- if ((componentInstanceMap != null) && (creationalContextMap != null))
- {
- for (Entry<Contextual<?>, Object> componentEntry : componentInstanceMap.entrySet())
- {
- Contextual contextual = componentEntry.getKey();
- Object instance = componentEntry.getValue();
- CreationalContext creational = creationalContextMap.get(contextual);
-
- contextual.destroy(instance, creational);
- }
- }
- }
- }
- }
-
- public PhaseId getPhaseId()
- {
- return PhaseId.ANY_PHASE;
- }
-
- private Flash getFlash()
- {
- FacesContext currentInstance = FacesContext.getCurrentInstance();
- if (currentInstance != null)
- {
- ExternalContext externalContext = currentInstance.getExternalContext();
- return externalContext.getFlash();
- }
- return null;
- }
-
- private void assertActive()
- {
- if (!isActive())
- {
- throw new ContextNotActiveException("Seam context with scope annotation @FlashScoped is not active with respect to the current thread");
- }
- }
-
- @SuppressWarnings("unchecked")
- private Map<Contextual<?>, Object> getComponentInstanceMap()
- {
- Flash flash = getFlash();
- ConcurrentHashMap<Contextual<?>, Object> map = (ConcurrentHashMap<Contextual<?>, Object>) flash.get(COMPONENT_MAP_NAME);
-
- if (map == null)
- {
- map = new ConcurrentHashMap<Contextual<?>, Object>();
- flash.put(COMPONENT_MAP_NAME, map);
- }
-
- return map;
- }
-
- @SuppressWarnings("unchecked")
- private Map<Contextual<?>, CreationalContext<?>> getCreationalContextMap()
- {
- Flash flash = getFlash();
- Map<Contextual<?>, CreationalContext<?>> map = (ConcurrentHashMap<Contextual<?>, CreationalContext<?>>) flash.get(CREATIONAL_MAP_NAME);
-
- if (map == null)
- {
- map = new ConcurrentHashMap<Contextual<?>, CreationalContext<?>>();
- flash.put(CREATIONAL_MAP_NAME, map);
- }
-
- return map;
- }
-
-}
Added: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashScopedContext.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashScopedContext.java (rev 0)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashScopedContext.java 2010-05-28 01:34:14 UTC (rev 12877)
@@ -0,0 +1,275 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., 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.faces.context;
+
+import java.io.Serializable;
+import java.lang.annotation.Annotation;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.enterprise.context.ContextNotActiveException;
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.context.spi.Context;
+import javax.enterprise.context.spi.Contextual;
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.faces.bean.FlashScoped;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+import javax.inject.Named;
+
+import org.jboss.seam.faces.util.BeanManagerUtils;
+import org.jboss.weld.extensions.beanManager.BeanManagerAccessor;
+
+/**
+ * This class provides the lifecycle for the new JSF 2 Flash Context
+ *
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
+ */
+@RequestScoped
+public class FlashScopedContext implements Context, PhaseListener, Serializable
+{
+ private static final long serialVersionUID = -1580689204988513798L;
+
+ private static final String SESSION_KEY_PREFIX = FlashScopedContext.class.getName() + ".context";
+ private final static String COMPONENT_MAP_NAME = FlashScopedContext.class.getName() + ".componentInstanceMap";
+ private final static String CREATIONAL_MAP_NAME = FlashScopedContext.class.getName() + ".creationalInstanceMap";
+
+ String requestParameterName = "fid";
+
+ FlashContext currentContext = null;
+
+ @Produces
+ @Named
+ @RequestScoped
+ public FlashContext getFlashContext()
+ {
+ return currentContext;
+ }
+
+ private FlashContext getCurrentFlashContext()
+ {
+ BeanManager manager = BeanManagerAccessor.getManager();
+ return BeanManagerUtils.getContextualInstance(manager, FlashContext.class);
+ }
+
+ private void assertActive()
+ {
+ if (!isActive())
+ {
+ throw new ContextNotActiveException("Seam context with scope annotation @FlashScoped is not active with respect to the current thread");
+ }
+ }
+
+ /*
+ * PhaseListener Methods
+ */
+ public void beforePhase(final PhaseEvent event)
+ {
+ if (PhaseId.RESTORE_VIEW.equals(event.getPhaseId()))
+ {
+ String currentId = getCurrentId();
+ if (savedContextExists(currentId))
+ {
+ FlashContext context = (FlashContext) getSessionMap().remove(getSessionKey(currentId));
+ currentContext = context;
+ }
+ else
+ {
+ FlashContextImpl context = new FlashContextImpl();
+ context.setId(getNextFlashId());
+ currentContext = context;
+ }
+ }
+ }
+
+ private String getNextFlashId()
+ {
+ String result = null;
+
+ Map<String, Object> sessionMap = getSessionMap();
+ int i = 0;
+ while (result == null)
+ {
+ if (!sessionMap.containsKey(getSessionKey(result)))
+ {
+ result = String.valueOf(i);
+ }
+ }
+
+ return result;
+ }
+
+ private boolean savedContextExists(final String id)
+ {
+ return getSessionMap().get(getSessionKey(id)) instanceof FlashContext;
+ }
+
+ private String getCurrentId()
+ {
+ Map<String, String> requestParameterMap = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
+ String currentId = requestParameterMap.get(requestParameterName);
+ return currentId;
+ }
+
+ /**
+ * Destroy the current context since Render Response has completed.
+ */
+ @SuppressWarnings("unchecked")
+ public void afterPhase(final PhaseEvent event)
+ {
+ if (PhaseId.RENDER_RESPONSE.equals(event.getPhaseId()))
+ {
+ Map<Contextual<?>, Object> componentInstanceMap = getComponentInstanceMap();
+ Map<Contextual<?>, CreationalContext<?>> creationalContextMap = getCreationalContextMap();
+
+ if ((componentInstanceMap != null) && (creationalContextMap != null))
+ {
+ for (Entry<Contextual<?>, Object> componentEntry : componentInstanceMap.entrySet())
+ {
+ Contextual contextual = componentEntry.getKey();
+ Object instance = componentEntry.getValue();
+ CreationalContext creational = creationalContextMap.get(contextual);
+
+ contextual.destroy(instance, creational);
+ }
+ }
+ }
+ }
+
+ public PhaseId getPhaseId()
+ {
+ return PhaseId.ANY_PHASE;
+ }
+
+ /*
+ * Context Methods
+ */
+ @SuppressWarnings("unchecked")
+ public <T> T get(final Contextual<T> component)
+ {
+ assertActive();
+ return (T) getComponentInstanceMap().get(component);
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> T get(final Contextual<T> component, final CreationalContext<T> creationalContext)
+ {
+ assertActive();
+
+ T instance = get(component);
+
+ if (instance == null)
+ {
+ Map<Contextual<?>, CreationalContext<?>> creationalContextMap = getCreationalContextMap();
+ Map<Contextual<?>, Object> componentInstanceMap = getComponentInstanceMap();
+
+ synchronized (componentInstanceMap)
+ {
+ instance = (T) componentInstanceMap.get(component);
+ if (instance == null)
+ {
+ instance = component.create(creationalContext);
+
+ if (instance != null)
+ {
+ componentInstanceMap.put(component, instance);
+ creationalContextMap.put(component, creationalContext);
+ }
+ }
+ }
+ }
+
+ return instance;
+ }
+
+ public boolean isActive()
+ {
+ return FacesContext.getCurrentInstance() != null;
+ }
+
+ public Class<? extends Annotation> getScope()
+ {
+ return FlashScoped.class;
+ }
+
+ /*
+ * Helpers for manipulating the Component/Context maps.
+ */
+ @SuppressWarnings("unchecked")
+ private Map<Contextual<?>, Object> getComponentInstanceMap()
+ {
+ ConcurrentHashMap<Contextual<?>, Object> map = (ConcurrentHashMap<Contextual<?>, Object>) getCurrentFlashContext().get(COMPONENT_MAP_NAME);
+
+ if (map == null)
+ {
+ map = new ConcurrentHashMap<Contextual<?>, Object>();
+ getCurrentFlashContext().put(COMPONENT_MAP_NAME, map);
+ }
+
+ return map;
+ }
+
+ @SuppressWarnings("unchecked")
+ private Map<Contextual<?>, CreationalContext<?>> getCreationalContextMap()
+ {
+ Map<Contextual<?>, CreationalContext<?>> map = (ConcurrentHashMap<Contextual<?>, CreationalContext<?>>) getCurrentFlashContext().get(CREATIONAL_MAP_NAME);
+
+ if (map == null)
+ {
+ map = new ConcurrentHashMap<Contextual<?>, CreationalContext<?>>();
+ getCurrentFlashContext().put(CREATIONAL_MAP_NAME, map);
+ }
+
+ return map;
+ }
+
+ private Map<String, Object> getSessionMap()
+ {
+ ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
+ return externalContext.getSessionMap();
+ }
+
+ private String getSessionKey(final String id)
+ {
+ String result = SESSION_KEY_PREFIX;
+ if (id != null)
+ {
+ result += "_" + id;
+ }
+ return result;
+ }
+
+ /**
+ * Get the name of the request parameter to contain the current
+ * {@link FlashContext} id.
+ */
+ public String getRequestParameterName()
+ {
+ return requestParameterName;
+ }
+}
Modified: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/DelegatingPhaseListener.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/DelegatingPhaseListener.java 2010-05-28 01:33:48 UTC (rev 12876)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/DelegatingPhaseListener.java 2010-05-28 01:34:14 UTC (rev 12877)
@@ -27,6 +27,8 @@
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;
+import org.jboss.seam.faces.context.FlashScopedContext;
+
/**
* Provide CDI injection to PhaseListener artifacts by delegating through this
* class.
@@ -77,7 +79,7 @@
@SuppressWarnings("unchecked")
private List<PhaseListener> getPhaseListeners()
{
- return getListeners(PhaseEventBridge.class);
+ return getListeners(FlashScopedContext.class, PhaseEventBridge.class);
}
}
Modified: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/status/MessagesAdapter.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/status/MessagesAdapter.java 2010-05-28 01:33:48 UTC (rev 12876)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/status/MessagesAdapter.java 2010-05-28 01:34:14 UTC (rev 12877)
@@ -50,7 +50,8 @@
@Inject
private Messages messages;
- @SuppressWarnings("unused")
+ // void flushBeforeNavigate(@Observes BeforeNavigateEvent event);
+
void convert(@Observes @Before @RenderResponse final PhaseEvent event)
{
for (Message m : messages.getAll())
Modified: modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/util/BeanManagerUtils.java
===================================================================
--- modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/util/BeanManagerUtils.java 2010-05-28 01:33:48 UTC (rev 12876)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/util/BeanManagerUtils.java 2010-05-28 01:34:14 UTC (rev 12877)
@@ -100,9 +100,24 @@
* @param type The class for which to return an instance.
* @return The managed instance, or null if none could be provided.
*/
- @SuppressWarnings("unchecked")
public <T> T getContextualInstance(final Class<T> type)
{
+ return getContextualInstance(manager, type);
+ }
+
+ /**
+ * Get a single CDI managed instance of a specific class. Return only the
+ * first result if multiple beans are available.
+ * <p>
+ * <b>NOTE:</b> Using this method should be avoided at all costs.
+ *
+ * @param manager The bean manager with which to perform the lookup.
+ * @param type The class for which to return an instance.
+ * @return The managed instance, or null if none could be provided.
+ */
+ @SuppressWarnings("unchecked")
+ public static <T> T getContextualInstance(final BeanManager manager, final Class<T> type)
+ {
T result = null;
Bean<T> bean = (Bean<T>) manager.resolve(manager.getBeans(type));
if (bean != null)
Modified: modules/faces/trunk/impl/src/main/resources/META-INF/faces-config.xml
===================================================================
--- modules/faces/trunk/impl/src/main/resources/META-INF/faces-config.xml 2010-05-28 01:33:48 UTC (rev 12876)
+++ modules/faces/trunk/impl/src/main/resources/META-INF/faces-config.xml 2010-05-28 01:34:14 UTC (rev 12877)
@@ -13,10 +13,13 @@
</ordering>
<lifecycle>
- <phase-listener>org.jboss.seam.faces.context.FlashScopedContext</phase-listener>
<phase-listener>org.jboss.seam.faces.event.DelegatingPhaseListener</phase-listener>
</lifecycle>
+ <factory>
+ <external-context-factory>org.jboss.seam.faces.environment.SeamExternalContextFactory</external-context-factory>
+ </factory>
+
<application>
<system-event-listener>
<system-event-listener-class>org.jboss.seam.faces.event.DelegatingSystemEventListener</system-event-listener-class>
[View Less]
14 years, 9 months
Seam SVN: r12876 - modules/international/trunk/api/src/main/java/org/jboss/seam/international/status.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-05-27 21:33:48 -0400 (Thu, 27 May 2010)
New Revision: 12876
Modified:
modules/international/trunk/api/src/main/java/org/jboss/seam/international/status/Messages.java
Log:
Messages are now @RequestScoped
Modified: modules/international/trunk/api/src/main/java/org/jboss/seam/international/status/Messages.java
===================================================================
--- modules/international/trunk/api/src/main/java/org/jboss/seam/international/status/…
[View More]Messages.java 2010-05-27 18:16:33 UTC (rev 12875)
+++ modules/international/trunk/api/src/main/java/org/jboss/seam/international/status/Messages.java 2010-05-28 01:33:48 UTC (rev 12876)
@@ -27,7 +27,7 @@
import java.util.HashSet;
import java.util.Set;
-import javax.enterprise.context.SessionScoped;
+import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import org.jboss.seam.international.status.builder.BundleKey;
@@ -41,7 +41,7 @@
* @author <a href="mailto:lincolnbaxter@gmail.com>Lincoln Baxter, III</a>
*
*/
-@SessionScoped
+@RequestScoped
public class Messages implements Serializable
{
private static final long serialVersionUID = -2908193057765795662L;
[View Less]
14 years, 9 months
Seam SVN: r12875 - in modules/remoting/trunk: src and 2 other directories.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2010-05-27 14:16:33 -0400 (Thu, 27 May 2010)
New Revision: 12875
Added:
modules/remoting/trunk/src/
modules/remoting/trunk/src/main/
modules/remoting/trunk/src/main/assembly/
modules/remoting/trunk/src/main/assembly/assembly.xml
Modified:
modules/remoting/trunk/pom.xml
Log:
standard location for assembly.xml
Modified: modules/remoting/trunk/pom.xml
===================================================================
--- modules/remoting/trunk/…
[View More]pom.xml 2010-05-27 17:56:16 UTC (rev 12874)
+++ modules/remoting/trunk/pom.xml 2010-05-27 18:16:33 UTC (rev 12875)
@@ -4,7 +4,7 @@
<parent>
<artifactId>weld-parent</artifactId>
<groupId>org.jboss.weld</groupId>
- <version>8</version>
+ <version>9</version>
</parent>
<groupId>org.jboss.seam.remoting</groupId>
@@ -23,11 +23,11 @@
<build>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
- <version>2.2-beta-5</version>
<configuration>
<descriptors>
- <descriptor>assembly.xml</descriptor>
+ <descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
Copied: modules/remoting/trunk/src/main/assembly/assembly.xml (from rev 12830, modules/remoting/trunk/assembly.xml)
===================================================================
--- modules/remoting/trunk/src/main/assembly/assembly.xml (rev 0)
+++ modules/remoting/trunk/src/main/assembly/assembly.xml 2010-05-27 18:16:33 UTC (rev 12875)
@@ -0,0 +1,71 @@
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>bin</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>core/target/site/apidocs</directory>
+ <outputDirectory>seam-remoting/doc/api</outputDirectory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </fileSet>
+
+ <fileSet>
+ <directory>examples</directory>
+ <outputDirectory>seam-remoting/examples</outputDirectory>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ <includes>
+ <include>helloworld/pom.xml</include>
+ <include>helloworld/src/**</include>
+ <include>model/pom.xml</include>
+ <include>model/src/**</include>
+ </includes>
+ </fileSet>
+
+ <fileSet>
+ <directory>.</directory>
+ <outputDirectory>seam-remoting</outputDirectory>
+ <includes>
+ <include>readme.txt</include>
+ <include>lgpl.txt</include>
+ </includes>
+ </fileSet>
+
+ <fileSet>
+ <directory>core/src/main/java</directory>
+ <outputDirectory>seam-remoting/source</outputDirectory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+
+ <moduleSets>
+ <moduleSet>
+ <includes>
+ <include>org.jboss.seam.remoting:seam-remoting-core:jar</include>
+ </includes>
+ <binaries>
+ <outputDirectory>seam-remoting/lib</outputDirectory>
+ <unpack>false</unpack>
+ </binaries>
+ </moduleSet>
+
+ <moduleSet>
+ <includes>
+ <include>org.jboss.seam.remoting:seam-remoting-reference-guide</include>
+ </includes>
+ <binaries>
+ <outputDirectory>seam-remoting/doc/reference</outputDirectory>
+ <unpack>true</unpack>
+ </binaries>
+ </moduleSet>
+
+ </moduleSets>
+</assembly>
[View Less]
14 years, 9 months