Seam SVN: r10856 - in modules/trunk: international and 1 other directory.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-11 16:10:38 -0400 (Mon, 11 May 2009)
New Revision: 10856
Modified:
modules/trunk/faces/
modules/trunk/international/
Log:
svn ignores
Property changes on: modules/trunk/faces
___________________________________________________________________
Name: svn:ignore
- target
.settings
.classpath
.project
+ .classpath
.project
.settings
target
temp-testng-customsuite.xml
test-output
Property changes on: modules/trunk/international
___________________________________________________________________
Name: svn:ignore
- .classpath
.project
.settings
target
+ .classpath
.project
.settings
target
temp-testng-customsuite.xml
test-output
15 years, 6 months
Seam SVN: r10855 - modules/trunk/drools.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-11 16:10:19 -0400 (Mon, 11 May 2009)
New Revision: 10855
Modified:
modules/trunk/drools/pom.xml
Log:
cleanup
Modified: modules/trunk/drools/pom.xml
===================================================================
--- modules/trunk/drools/pom.xml 2009-05-11 20:09:53 UTC (rev 10854)
+++ modules/trunk/drools/pom.xml 2009-05-11 20:10:19 UTC (rev 10855)
@@ -1,56 +1,69 @@
-<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">
+<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">
<parent>
<artifactId>seam-parent</artifactId>
- <groupId>org.jboss.seam</groupId>
+ <groupId>org.jboss.seam</groupId>
<version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.seam</groupId>
<artifactId>seam-drools</artifactId>
<packaging>jar</packaging>
<version>3.0.0-SNAPSHOT</version>
<name>Seam Drools</name>
-
+
<dependencies>
+
<dependency>
<groupId>${webbeans.groupId}</groupId>
<artifactId>jsr299-api</artifactId>
- </dependency>
+ <scope>provided</scope>
+ </dependency>
+
<dependency>
<groupId>${webbeans.groupId}</groupId>
<artifactId>webbeans-logging</artifactId>
- </dependency>
- <!--dependency>
+ <scope>provided</scope>
+ </dependency>
+
+ <!--
+ <dependency>
<groupId>${seam.groupId}</groupId>
<artifactId>seam-bpm</artifactId>
- </dependency-->
+ </dependency>
+ -->
+
<dependency>
<groupId>${seam.groupId}</groupId>
<artifactId>seam-el</artifactId>
- </dependency>
+ </dependency>
+
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<scope>provided</scope>
</dependency>
+
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
</dependency>
+
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<scope>provided</scope>
</dependency>
- <!--dependency>
+
+ <!--
+ <dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-jpdl</artifactId>
- </dependency-->
-
-
+ </dependency>
+ -->
+
</dependencies>
</project>
15 years, 6 months
Seam SVN: r10854 - modules/trunk/version-matrix.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-11 16:09:53 -0400 (Mon, 11 May 2009)
New Revision: 10854
Modified:
modules/trunk/version-matrix/pom.xml
Log:
bump JSF version
bump maven-enforcer-plugin version to be compatible w/ m2eclipse
add jta
add new Seam modules
Modified: modules/trunk/version-matrix/pom.xml
===================================================================
--- modules/trunk/version-matrix/pom.xml 2009-05-11 20:06:57 UTC (rev 10853)
+++ modules/trunk/version-matrix/pom.xml 2009-05-11 20:09:53 UTC (rev 10854)
@@ -106,7 +106,7 @@
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
- <version>1.0.1B</version>
+ <version>1.1</version>
</dependency>
<dependency>
@@ -124,13 +124,13 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.0-PR2_2</version>
+ <version>2.0.0-PR2_3</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>2.0.0-PR2_2</version>
+ <version>2.0.0-PR2_3</version>
</dependency>
<dependency>
@@ -171,6 +171,18 @@
<dependency>
<groupId>${webbeans.groupId}</groupId>
+ <artifactId>webbeans-core</artifactId>
+ <version>${webbeans.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>webbeans-core-test</artifactId>
+ <version>${webbeans.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
<artifactId>webbeans-logger</artifactId>
<version>${webbeans.version}</version>
</dependency>
@@ -186,12 +198,6 @@
<artifactId>webbeans-servlet</artifactId>
<version>${webbeans.version}</version>
</dependency>
-
- <dependency>
- <groupId>${webbeans.groupId}</groupId>
- <artifactId>webbeans-core-test</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- </dependency>
<dependency>
<groupId>org.drools</groupId>
@@ -246,6 +252,12 @@
<dependency>
<groupId>${seam.groupId}</groupId>
+ <artifactId>seam-bridge-api</artifactId>
+ <version>${seam.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>${seam.groupId}</groupId>
<artifactId>seam-drools</artifactId>
<version>${seam.version}</version>
</dependency>
@@ -285,6 +297,18 @@
<artifactId>seam-security</artifactId>
<version>${seam.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>${seam.groupId}</groupId>
+ <artifactId>seam-web</artifactId>
+ <version>${seam.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>${seam.groupId}</groupId>
+ <artifactId>seam-webbeans-bridge</artifactId>
+ <version>${seam.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
@@ -427,12 +451,12 @@
<plugin>
<groupId>org.twdata.maven</groupId>
<artifactId>maven-cli-plugin</artifactId>
- <version>0.6.3.CR2</version>
+ <version>0.6.3.CR3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
- <version>1.0-alpha-4</version>
+ <version>1.0-beta-1</version>
<executions>
<execution>
<id>enforce</id>
15 years, 6 months
Seam SVN: r10853 - in modules/trunk: web and 9 other directories.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-11 16:06:57 -0400 (Mon, 11 May 2009)
New Revision: 10853
Added:
modules/trunk/web/
modules/trunk/web/pom.xml
modules/trunk/web/src/
modules/trunk/web/src/main/
modules/trunk/web/src/main/java/
modules/trunk/web/src/main/java/org/
modules/trunk/web/src/main/java/org/jboss/
modules/trunk/web/src/main/java/org/jboss/seam/
modules/trunk/web/src/main/java/org/jboss/seam/web/
modules/trunk/web/src/main/java/org/jboss/seam/web/HttpSessionManager.java
modules/trunk/web/src/main/java/org/jboss/seam/web/SeamFilter.java
modules/trunk/web/src/main/resources/
modules/trunk/web/src/main/resources/META-INF/
modules/trunk/web/src/main/resources/META-INF/beans.xml
Log:
introduce a web module for providing web life cycle routines
initial feature is to shut down the session in a delayed fashion
Property changes on: modules/trunk/web
___________________________________________________________________
Name: svn:ignore
+ target
Added: modules/trunk/web/pom.xml
===================================================================
--- modules/trunk/web/pom.xml (rev 0)
+++ modules/trunk/web/pom.xml 2009-05-11 20:06:57 UTC (rev 10853)
@@ -0,0 +1,63 @@
+<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>seam-parent</artifactId>
+ <groupId>org.jboss.seam</groupId>
+ <version>3.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>seam-web</artifactId>
+ <packaging>jar</packaging>
+ <version>3.0.0-SNAPSHOT</version>
+ <name>Seam Web Module</name>
+
+ <build>
+ <plugins>
+
+ <!--
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <suiteXmlFiles>
+ <suiteXmlFile>src/test/resources/test-suite.xml</suiteXmlFile>
+ </suiteXmlFiles>
+ </configuration>
+ </plugin>
+ -->
+
+ </plugins>
+ </build>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>${seam.groupId}</groupId>
+ <artifactId>seam-bridge-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>jsr299-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>webbeans-logging</artifactId>
+ <!-- assumes use of Web Beans impl -->
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+
+</project>
Added: modules/trunk/web/src/main/java/org/jboss/seam/web/HttpSessionManager.java
===================================================================
--- modules/trunk/web/src/main/java/org/jboss/seam/web/HttpSessionManager.java (rev 0)
+++ modules/trunk/web/src/main/java/org/jboss/seam/web/HttpSessionManager.java 2009-05-11 20:06:57 UTC (rev 10853)
@@ -0,0 +1,206 @@
+package org.jboss.seam.web;
+
+import java.util.Enumeration;
+
+import javax.annotation.PreDestroy;
+import javax.context.RequestScoped;
+import javax.inject.Produces;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpSessionContext;
+
+/**
+ * A bean which manages the HttpSession for the current request. The main
+ * purpose of this bean is to allow a session to be flagged to be invalidated
+ * after the request has ended. It also exposes the HttpSession so that it's
+ * available for injection. A filter is provided in this module that can assign
+ * the HttpSession to this manager when the HttpSession is initialized.
+ *
+ * @author Dan Allen
+ */
+public
+@RequestScoped
+class HttpSessionManager
+{
+ private HttpSession session;
+
+ private boolean invalidate = false;
+
+ /**
+ * Expose the current HttpSession to be available for injection.
+ *
+ * TODO wrap the HttpSession an delegate the invalidate() call to this bean's delayed invalidation mechanism
+ *
+ * @return HttpSession the HttpSession being managed (presumably associated
+ * with the current request.
+ */
+ public
+ @Produces
+ @RequestScoped
+ HttpSession getSession()
+ {
+ return new HttpSessionWrapper(session, this);
+ }
+
+ /**
+ * Establish the HttpSession to manage.
+ *
+ * @param session The HttpSession associated with the current request
+ */
+ public void setSession(HttpSession session)
+ {
+ this.session = session;
+ }
+
+ /**
+ * Flag the current HttpSession to be invalidated at the end of the request.
+ * The session is not terminated immediately so as to avoid disruption caused
+ * by cleanup routines by HttpSessionListener implementations monitoring for
+ * the end of session event.
+ */
+ public void invalidateAtEndOfRequest()
+ {
+ invalidate = true;
+ }
+
+ /**
+ * Is the current HttpSession scheduled to be invalidated at the end of the
+ * request.
+ *
+ * @return boolean Whether the current HttpSession has been scheduled for
+ * invalidation
+ */
+ public boolean isPendingInvalidation()
+ {
+ return invalidate;
+ }
+
+ /**
+ * Indicate whether there is currently being a session managed. The assumption
+ * is that if there is a session being managed, it's also active.
+ *
+ * @return boolean Whether there is a session being managed.
+ */
+ public boolean isManaged()
+ {
+ return session != null;
+ }
+
+ /**
+ * Observe the end of request event and invalidate the session if it has
+ * been scheduled for termination.
+ */
+ public
+ @PreDestroy
+ void afterRequest()
+ {
+ if (invalidate && session != null)
+ {
+ session.invalidate();
+ }
+ }
+
+ private class HttpSessionWrapper implements HttpSession
+ {
+ private HttpSession delegate;
+ private HttpSessionManager sessionManager;
+
+ public HttpSessionWrapper(HttpSession delegate, HttpSessionManager sessionManager)
+ {
+ this.delegate = delegate;
+ this.sessionManager = sessionManager;
+ }
+
+ public Object getAttribute(String name)
+ {
+ return delegate.getAttribute(name);
+ }
+
+ @SuppressWarnings("unchecked")
+ public Enumeration getAttributeNames()
+ {
+ return delegate.getAttributeNames();
+ }
+
+ public long getCreationTime()
+ {
+ return delegate.getCreationTime();
+ }
+
+ public String getId()
+ {
+ return delegate.getId();
+ }
+
+ public long getLastAccessedTime()
+ {
+ return delegate.getLastAccessedTime();
+ }
+
+ public int getMaxInactiveInterval()
+ {
+ return delegate.getMaxInactiveInterval();
+ }
+
+ public ServletContext getServletContext()
+ {
+ return delegate.getServletContext();
+ }
+
+ @SuppressWarnings("deprecation")
+ public HttpSessionContext getSessionContext()
+ {
+ return delegate.getSessionContext();
+ }
+
+ @SuppressWarnings("deprecation")
+ public Object getValue(String name)
+ {
+ return delegate.getValue(name);
+ }
+
+ @SuppressWarnings("deprecation")
+ public String[] getValueNames()
+ {
+ return delegate.getValueNames();
+ }
+
+ public void invalidate()
+ {
+ sessionManager.invalidateAtEndOfRequest();
+ }
+
+ public boolean isNew()
+ {
+ return delegate.isNew();
+ }
+
+ @SuppressWarnings("deprecation")
+ public void putValue(String name, Object value)
+ {
+ delegate.putValue(name, value);
+ }
+
+ public void removeAttribute(String name)
+ {
+ delegate.removeAttribute(name);
+ }
+
+ @SuppressWarnings("deprecation")
+ public void removeValue(String name)
+ {
+ delegate.removeValue(name);
+ }
+
+ public void setAttribute(String name, Object value)
+ {
+ delegate.setAttribute(name, value);
+ }
+
+ public void setMaxInactiveInterval(int interval)
+ {
+ delegate.setMaxInactiveInterval(interval);
+ }
+
+ }
+}
Added: modules/trunk/web/src/main/java/org/jboss/seam/web/SeamFilter.java
===================================================================
--- modules/trunk/web/src/main/java/org/jboss/seam/web/SeamFilter.java (rev 0)
+++ modules/trunk/web/src/main/java/org/jboss/seam/web/SeamFilter.java 2009-05-11 20:06:57 UTC (rev 10853)
@@ -0,0 +1,77 @@
+package org.jboss.seam.web;
+
+import java.io.IOException;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+import javax.servlet.http.HttpSession;
+
+import org.jboss.seam.bridge.ManagerBridge;
+
+/**
+ * Filter all requests to an application using Seam and perform pre- and post-request
+ * initialization.
+ *
+ * @author Dan Allen
+ */
+public class SeamFilter implements Filter
+{
+
+ public void init(FilterConfig config) throws ServletException
+ {
+ }
+
+ /**
+ * Intercept the request and install a hook that watches for a session to be created and registers that
+ * session with the Seam HttpSessionManager.
+ */
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
+ {
+ if (request instanceof HttpServletRequest)
+ {
+ // TODO: may want to organize this logic into a Lifecycle class
+ request = new HttpServletRequestWrapper((HttpServletRequest) request) {
+
+ private HttpSession registeredSession;
+
+ @Override
+ public HttpSession getSession()
+ {
+ // we don't want to assume that the sibling getSession method is called by the impl
+ return this.getSession(true);
+ }
+
+ @Override
+ public HttpSession getSession(boolean create)
+ {
+ HttpSession session = super.getSession(create);
+ if (session != null && session != registeredSession)
+ {
+ registerSession(session);
+ }
+ return session;
+ }
+
+ private void registerSession(HttpSession session)
+ {
+ ManagerBridge.getProvider().getRootManager().getInstanceByType(HttpSessionManager.class).setSession(session);
+ registeredSession = session;
+ }
+
+ };
+ }
+
+ chain.doFilter(request, response);
+ }
+
+ public void destroy()
+ {
+ }
+
+}
Added: modules/trunk/web/src/main/resources/META-INF/beans.xml
===================================================================
15 years, 6 months
Seam SVN: r10852 - in modules/trunk: bridge-api and 34 other directories.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-11 16:05:51 -0400 (Mon, 11 May 2009)
New Revision: 10852
Added:
modules/trunk/bridge-api/
modules/trunk/bridge-api/pom.xml
modules/trunk/bridge-api/src/
modules/trunk/bridge-api/src/main/
modules/trunk/bridge-api/src/main/java/
modules/trunk/bridge-api/src/main/java/org/
modules/trunk/bridge-api/src/main/java/org/jboss/
modules/trunk/bridge-api/src/main/java/org/jboss/seam/
modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/
modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/ManagerBridge.java
modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/ManagerProviderResolver.java
modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/ServiceLoaderManagerProviderResolver.java
modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/spi/
modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/spi/ManagerProvider.java
modules/trunk/bridge-api/src/main/resources/
modules/trunk/bridge-api/src/main/resources/META-INF/
modules/trunk/bridge-api/src/main/resources/META-INF/beans.xml
modules/trunk/openwebbeans-bridge/
modules/trunk/openwebbeans-bridge/pom.xml
modules/trunk/openwebbeans-bridge/src/
modules/trunk/openwebbeans-bridge/src/main/
modules/trunk/openwebbeans-bridge/src/main/java/
modules/trunk/openwebbeans-bridge/src/main/java/org/
modules/trunk/openwebbeans-bridge/src/main/java/org/jboss/
modules/trunk/openwebbeans-bridge/src/main/java/org/jboss/seam/
modules/trunk/openwebbeans-bridge/src/main/java/org/jboss/seam/bridge/
modules/trunk/openwebbeans-bridge/src/main/java/org/jboss/seam/bridge/openwebbeans/
modules/trunk/openwebbeans-bridge/src/main/java/org/jboss/seam/bridge/openwebbeans/OpenWebBeansManagerProvider.java
modules/trunk/openwebbeans-bridge/src/main/resources/
modules/trunk/openwebbeans-bridge/src/main/resources/META-INF/
modules/trunk/openwebbeans-bridge/src/main/resources/META-INF/services/
modules/trunk/openwebbeans-bridge/src/main/resources/META-INF/services/org.jboss.seam.bridge.spi.ManagerProvider
modules/trunk/webbeans-bridge/
modules/trunk/webbeans-bridge/pom.xml
modules/trunk/webbeans-bridge/src/
modules/trunk/webbeans-bridge/src/main/
modules/trunk/webbeans-bridge/src/main/java/
modules/trunk/webbeans-bridge/src/main/java/org/
modules/trunk/webbeans-bridge/src/main/java/org/jboss/
modules/trunk/webbeans-bridge/src/main/java/org/jboss/seam/
modules/trunk/webbeans-bridge/src/main/java/org/jboss/seam/bridge/
modules/trunk/webbeans-bridge/src/main/java/org/jboss/seam/bridge/webbeans/
modules/trunk/webbeans-bridge/src/main/java/org/jboss/seam/bridge/webbeans/WebBeansManagerProvider.java
modules/trunk/webbeans-bridge/src/main/resources/
modules/trunk/webbeans-bridge/src/main/resources/META-INF/
modules/trunk/webbeans-bridge/src/main/resources/META-INF/services/
modules/trunk/webbeans-bridge/src/main/resources/META-INF/services/org.jboss.seam.bridge.spi.ManagerProvider
Log:
introduce a bridge API to lookup the JCDI Manager
Property changes on: modules/trunk/bridge-api
___________________________________________________________________
Name: svn:ignore
+ target
Added: modules/trunk/bridge-api/pom.xml
===================================================================
--- modules/trunk/bridge-api/pom.xml (rev 0)
+++ modules/trunk/bridge-api/pom.xml 2009-05-11 20:05:51 UTC (rev 10852)
@@ -0,0 +1,53 @@
+<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>seam-parent</artifactId>
+ <groupId>org.jboss.seam</groupId>
+ <version>3.0.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- TODO might want to name this seam-jcdi-bridge-api -->
+ <artifactId>seam-bridge-api</artifactId>
+ <packaging>jar</packaging>
+ <version>3.0.0-SNAPSHOT</version>
+ <name>Seam Bridge API</name>
+ <description>An API wrapper around an SPI which Seam uses to lookup providers, such as the JCDI Manager.</description>
+
+ <build>
+ <plugins>
+
+ <!--
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <suiteXmlFiles>
+ <suiteXmlFile>src/test/resources/test-suite.xml</suiteXmlFile>
+ </suiteXmlFiles>
+ </configuration>
+ </plugin>
+ -->
+
+ </plugins>
+ </build>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>jsr299-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+
+</project>
Added: modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/ManagerBridge.java
===================================================================
--- modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/ManagerBridge.java (rev 0)
+++ modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/ManagerBridge.java 2009-05-11 20:05:51 UTC (rev 10852)
@@ -0,0 +1,95 @@
+package org.jboss.seam.bridge;
+
+import javax.event.Observes;
+import javax.inject.manager.Deployed;
+import javax.inject.manager.Manager;
+
+import org.jboss.seam.bridge.spi.ManagerProvider;
+
+/**
+ * A bridge to the JCDI Manager implementation. This bean observers the event
+ * that is fired when the Manager is deployed and attempts to match a provider
+ * that produces that same Manager. That provider is then used to access the
+ * deployed Manager by a non-managed resource (such as a JSF phase listener)
+ *
+ * @author Dan Allen
+ */
+public class ManagerBridge
+{
+ private static ManagerProvider provider;
+
+ private static boolean discover = true;
+
+ // QUESTION: should this be a String, Class, or instance?
+ private Class<? extends ManagerProviderResolver> resolverClass = ServiceLoaderManagerProviderResolver.class;
+
+ public Class<? extends ManagerProviderResolver> getResolverClass()
+ {
+ return resolverClass;
+ }
+
+ public void setResolverClass(Class<? extends ManagerProviderResolver> resolverClass)
+ {
+ this.resolverClass = resolverClass;
+ }
+
+ public static ManagerProvider getProvider()
+ {
+ return provider;
+ }
+
+ public static void setProvider(ManagerProvider override)
+ {
+ provider = override;
+ }
+
+ /**
+ * Configure whether discovery of the provider when the manager
+ * is deployed. The default is to use discovery. This can
+ * be disabled in a mock environment.
+ */
+ public static void setDiscover(boolean flag)
+ {
+ discover = flag;
+ }
+
+ /**
+ * Observes the event fired when the manager is deployed and resolves a provider
+ * that can produce this same Manager instance.
+ *
+ * @param manager The deployed Manager instance
+ */
+ public void onManagerDeployed(@Observes @Deployed Manager manager)
+ {
+ // intended for a mock environment, skip discovery
+ if (!discover)
+ {
+ return;
+ }
+
+ ManagerProviderResolver resolver;
+ try
+ {
+ resolver = resolverClass.newInstance();
+ }
+ catch (InstantiationException e)
+ {
+ throw new IllegalStateException("Could not instantiate ManagerProviderResolver class " + resolverClass, e);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new IllegalStateException("Access was denied while attempting to instantiate ManagerProviderResolver class " + resolverClass, e);
+ }
+
+ for (ManagerProvider candidate : resolver.getManagerProviders())
+ {
+ if (manager.equals(candidate.getRootManager()))
+ {
+ provider = candidate;
+ return;
+ }
+ }
+
+ throw new IllegalStateException("Cannot resolve a ManagerProvider corresponding to the deployed Manager implementation " + manager.getClass());
+ }
+}
Added: modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/ManagerProviderResolver.java
===================================================================
--- modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/ManagerProviderResolver.java (rev 0)
+++ modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/ManagerProviderResolver.java 2009-05-11 20:05:51 UTC (rev 10852)
@@ -0,0 +1,10 @@
+package org.jboss.seam.bridge;
+
+import java.util.List;
+
+import org.jboss.seam.bridge.spi.ManagerProvider;
+
+public interface ManagerProviderResolver
+{
+ List<ManagerProvider> getManagerProviders();
+}
Added: modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/ServiceLoaderManagerProviderResolver.java
===================================================================
--- modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/ServiceLoaderManagerProviderResolver.java (rev 0)
+++ modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/ServiceLoaderManagerProviderResolver.java 2009-05-11 20:05:51 UTC (rev 10852)
@@ -0,0 +1,30 @@
+package org.jboss.seam.bridge;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ServiceLoader;
+
+import org.jboss.seam.bridge.spi.ManagerProvider;
+
+/**
+ * An implementation of the ManagerProviderResolver interface that utilizes the
+ * Java SE 6 ServiceLoader interface to locate declared providers on the classpath.
+ *
+ * @author Dan Allen
+ */
+public class ServiceLoaderManagerProviderResolver implements ManagerProviderResolver
+{
+ public List<ManagerProvider> getManagerProviders()
+ {
+ List<ManagerProvider> providers = new ArrayList<ManagerProvider>();
+ ServiceLoader<ManagerProvider> managerProvidersLoader = ServiceLoader.load(ManagerProvider.class);
+ Iterator<ManagerProvider> iterator = managerProvidersLoader.iterator();
+ while (iterator.hasNext())
+ {
+ providers.add(iterator.next());
+ }
+
+ return providers;
+ }
+}
Added: modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/spi/ManagerProvider.java
===================================================================
--- modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/spi/ManagerProvider.java (rev 0)
+++ modules/trunk/bridge-api/src/main/java/org/jboss/seam/bridge/spi/ManagerProvider.java 2009-05-11 20:05:51 UTC (rev 10852)
@@ -0,0 +1,19 @@
+package org.jboss.seam.bridge.spi;
+
+import javax.el.ELResolver;
+import javax.inject.manager.Manager;
+
+/**
+ * A contract between the provider engine and the JCDI bootstrap
+ * mechanism to return the current (root) Manager instance.
+ *
+ * @author Dan Allen
+ */
+public interface ManagerProvider
+{
+ Manager getRootManager();
+
+ Manager getCurrentManager();
+
+ ELResolver getELResolver();
+}
Added: modules/trunk/bridge-api/src/main/resources/META-INF/beans.xml
===================================================================
Property changes on: modules/trunk/openwebbeans-bridge
___________________________________________________________________
Name: svn:ignore
+ target
Added: modules/trunk/openwebbeans-bridge/pom.xml
===================================================================
--- modules/trunk/openwebbeans-bridge/pom.xml (rev 0)
+++ modules/trunk/openwebbeans-bridge/pom.xml 2009-05-11 20:05:51 UTC (rev 10852)
@@ -0,0 +1,58 @@
+<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>seam-parent</artifactId>
+ <groupId>org.jboss.seam</groupId>
+ <version>3.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>seam-openwebbeans-bridge</artifactId>
+ <packaging>jar</packaging>
+ <version>3.0.0-SNAPSHOT</version>
+ <name>Seam OpenWebBeans Bridge</name>
+ <description>An implementation of the Seam Bridge SPI to obtain an OpenWebBeans Manager.</description>
+
+ <build>
+ <plugins>
+
+ <!--
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <suiteXmlFiles>
+ <suiteXmlFile>src/test/resources/test-suite.xml</suiteXmlFile>
+ </suiteXmlFiles>
+ </configuration>
+ </plugin>
+ -->
+
+ </plugins>
+ </build>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>${seam.groupId}</groupId>
+ <artifactId>seam-bridge-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>jsr299-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.openwebbeans</groupId>
+ <artifactId>openwebbeans-impl</artifactId>
+ <version>1.0.0-incubating-SNAPSHOT</version>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+
+</project>
Added: modules/trunk/openwebbeans-bridge/src/main/java/org/jboss/seam/bridge/openwebbeans/OpenWebBeansManagerProvider.java
===================================================================
--- modules/trunk/openwebbeans-bridge/src/main/java/org/jboss/seam/bridge/openwebbeans/OpenWebBeansManagerProvider.java (rev 0)
+++ modules/trunk/openwebbeans-bridge/src/main/java/org/jboss/seam/bridge/openwebbeans/OpenWebBeansManagerProvider.java 2009-05-11 20:05:51 UTC (rev 10852)
@@ -0,0 +1,33 @@
+package org.jboss.seam.bridge.openwebbeans;
+
+import javax.el.ELResolver;
+import javax.inject.manager.Manager;
+
+import org.apache.webbeans.container.activity.ActivityManager;
+import org.jboss.seam.bridge.spi.ManagerProvider;
+import org.jboss.webbeans.el.WebBeansELResolver;
+
+/**
+ * An implementation of Seam's Manager SPI interface for integrating Seam with
+ * the OpenWebBeans Manager.
+ *
+ * @author Dan Allen
+ */
+public class OpenWebBeansManagerProvider implements ManagerProvider
+{
+ public Manager getCurrentManager()
+ {
+ return ActivityManager.getInstance().getCurrentActivity();
+ }
+
+ public Manager getRootManager()
+ {
+ return ActivityManager.getInstance().getRootActivity();
+ }
+
+ public ELResolver getELResolver()
+ {
+ return new WebBeansELResolver();
+ }
+
+}
Added: modules/trunk/openwebbeans-bridge/src/main/resources/META-INF/services/org.jboss.seam.bridge.spi.ManagerProvider
===================================================================
--- modules/trunk/openwebbeans-bridge/src/main/resources/META-INF/services/org.jboss.seam.bridge.spi.ManagerProvider (rev 0)
+++ modules/trunk/openwebbeans-bridge/src/main/resources/META-INF/services/org.jboss.seam.bridge.spi.ManagerProvider 2009-05-11 20:05:51 UTC (rev 10852)
@@ -0,0 +1 @@
+org.jboss.seam.bridge.openwebbeans.OpenWebBeansManagerProvider
Property changes on: modules/trunk/webbeans-bridge
___________________________________________________________________
Name: svn:ignore
+ target
Added: modules/trunk/webbeans-bridge/pom.xml
===================================================================
--- modules/trunk/webbeans-bridge/pom.xml (rev 0)
+++ modules/trunk/webbeans-bridge/pom.xml 2009-05-11 20:05:51 UTC (rev 10852)
@@ -0,0 +1,57 @@
+<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>seam-parent</artifactId>
+ <groupId>org.jboss.seam</groupId>
+ <version>3.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>seam-webbeans-bridge</artifactId>
+ <packaging>jar</packaging>
+ <version>3.0.0-SNAPSHOT</version>
+ <name>Seam Web Beans Bridge</name>
+ <description>An implementation of the Seam Bridge SPI to obtain a Web Beans Manager.</description>
+
+ <build>
+ <plugins>
+
+ <!--
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <suiteXmlFiles>
+ <suiteXmlFile>src/test/resources/test-suite.xml</suiteXmlFile>
+ </suiteXmlFiles>
+ </configuration>
+ </plugin>
+ -->
+
+ </plugins>
+ </build>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>${seam.groupId}</groupId>
+ <artifactId>seam-bridge-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>jsr299-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>${webbeans.groupId}</groupId>
+ <artifactId>webbeans-core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+
+</project>
Added: modules/trunk/webbeans-bridge/src/main/java/org/jboss/seam/bridge/webbeans/WebBeansManagerProvider.java
===================================================================
--- modules/trunk/webbeans-bridge/src/main/java/org/jboss/seam/bridge/webbeans/WebBeansManagerProvider.java (rev 0)
+++ modules/trunk/webbeans-bridge/src/main/java/org/jboss/seam/bridge/webbeans/WebBeansManagerProvider.java 2009-05-11 20:05:51 UTC (rev 10852)
@@ -0,0 +1,33 @@
+package org.jboss.seam.bridge.webbeans;
+
+import javax.el.ELResolver;
+import javax.inject.manager.Manager;
+
+import org.jboss.seam.bridge.spi.ManagerProvider;
+import org.jboss.webbeans.CurrentManager;
+import org.jboss.webbeans.el.WebBeansELResolver;
+
+/**
+ * An implementation of Seam's Manager SPI interface for integrating Seam with
+ * the WebBeans Manager.
+ *
+ * @author Dan Allen
+ */
+public class WebBeansManagerProvider implements ManagerProvider
+{
+ public Manager getCurrentManager()
+ {
+ return CurrentManager.rootManager().getCurrent();
+ }
+
+ public Manager getRootManager()
+ {
+ return CurrentManager.rootManager();
+ }
+
+ public ELResolver getELResolver()
+ {
+ return new WebBeansELResolver();
+ }
+
+}
Added: modules/trunk/webbeans-bridge/src/main/resources/META-INF/services/org.jboss.seam.bridge.spi.ManagerProvider
===================================================================
--- modules/trunk/webbeans-bridge/src/main/resources/META-INF/services/org.jboss.seam.bridge.spi.ManagerProvider (rev 0)
+++ modules/trunk/webbeans-bridge/src/main/resources/META-INF/services/org.jboss.seam.bridge.spi.ManagerProvider 2009-05-11 20:05:51 UTC (rev 10852)
@@ -0,0 +1 @@
+org.jboss.seam.bridge.webbeans.WebBeansManagerProvider
15 years, 6 months
Seam SVN: r10851 - modules/trunk/mock/src/main/java/org/jboss/seam/mock/faces.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-11 16:05:15 -0400 (Mon, 11 May 2009)
New Revision: 10851
Modified:
modules/trunk/mock/src/main/java/org/jboss/seam/mock/faces/MockApplication.java
Log:
override publishEvent methods and perform no action
Modified: modules/trunk/mock/src/main/java/org/jboss/seam/mock/faces/MockApplication.java
===================================================================
--- modules/trunk/mock/src/main/java/org/jboss/seam/mock/faces/MockApplication.java 2009-05-11 20:04:23 UTC (rev 10850)
+++ modules/trunk/mock/src/main/java/org/jboss/seam/mock/faces/MockApplication.java 2009-05-11 20:05:15 UTC (rev 10851)
@@ -37,6 +37,7 @@
import javax.faces.el.ValueBinding;
import javax.faces.el.VariableResolver;
import javax.faces.event.ActionListener;
+import javax.faces.event.SystemEvent;
import javax.faces.validator.Validator;
@SuppressWarnings("deprecation")
@@ -417,5 +418,15 @@
{
return null; //SeamExpressionFactory.INSTANCE;
}
+
+ @Override
+ public void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Class<?> sourceBaseType, Object source)
+ {
+ }
+
+ @Override
+ public void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Object source)
+ {
+ }
}
15 years, 6 months
Seam SVN: r10850 - modules/trunk/security.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-11 16:04:23 -0400 (Mon, 11 May 2009)
New Revision: 10850
Modified:
modules/trunk/security/pom.xml
Log:
cleanup
Modified: modules/trunk/security/pom.xml
===================================================================
--- modules/trunk/security/pom.xml 2009-05-11 19:45:44 UTC (rev 10849)
+++ modules/trunk/security/pom.xml 2009-05-11 20:04:23 UTC (rev 10850)
@@ -1,72 +1,89 @@
-<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">
+<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">
<parent>
<artifactId>seam-parent</artifactId>
- <groupId>org.jboss.seam</groupId>
+ <groupId>org.jboss.seam</groupId>
<version>3.0.0-SNAPSHOT</version>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.seam</groupId>
<artifactId>seam-security</artifactId>
<packaging>jar</packaging>
<version>3.0.0-SNAPSHOT</version>
<name>Seam Security</name>
-
+
<dependencies>
+
<dependency>
<groupId>${webbeans.groupId}</groupId>
<artifactId>jsr299-api</artifactId>
- </dependency>
+ <scope>provided</scope>
+ </dependency>
+
<dependency>
<groupId>${webbeans.groupId}</groupId>
<artifactId>webbeans-logging</artifactId>
+ <scope>provided</scope>
</dependency>
+
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<scope>provided</scope>
- </dependency>
+ </dependency>
+
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<scope>provided</scope>
- </dependency>
+ </dependency>
+
<dependency>
<groupId>javax.ejb</groupId>
<artifactId>ejb-api</artifactId>
<scope>provided</scope>
</dependency>
+
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
</dependency>
+
<dependency>
<groupId>${seam.groupId}</groupId>
- <artifactId>seam-drools</artifactId>
+ <artifactId>seam-drools</artifactId>
</dependency>
+
<dependency>
<groupId>${seam.groupId}</groupId>
- <artifactId>seam-el</artifactId>
+ <artifactId>seam-el</artifactId>
</dependency>
+
<dependency>
<groupId>${seam.groupId}</groupId>
- <artifactId>seam-international</artifactId>
+ <artifactId>seam-international</artifactId>
</dependency>
+
<dependency>
<groupId>${seam.groupId}</groupId>
- <artifactId>seam-faces</artifactId>
+ <artifactId>seam-faces</artifactId>
</dependency>
- <!--dependency>
+
+ <!--
+ <dependency>
<groupId>${seam.groupId}</groupId>
- <artifactId>seam-persistence</artifactId>
- </dependency-->
+ <artifactId>seam-persistence</artifactId>
+ </dependency>
+ -->
+
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<scope>provided</scope>
- </dependency>
+ </dependency>
+
</dependencies>
</project>
15 years, 6 months
Seam SVN: r10849 - branches/community/Seam_2_1.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-05-11 15:45:44 -0400 (Mon, 11 May 2009)
New Revision: 10849
Modified:
branches/community/Seam_2_1/release-process.txt
Log:
JBSEAM-3603
Modified: branches/community/Seam_2_1/release-process.txt
===================================================================
--- branches/community/Seam_2_1/release-process.txt 2009-05-11 19:45:04 UTC (rev 10848)
+++ branches/community/Seam_2_1/release-process.txt 2009-05-11 19:45:44 UTC (rev 10849)
@@ -221,7 +221,6 @@
- remoting/chatroom
- remoting/gwt
- remoting/helloworld
- - remoting/progressbar
- seambay
- seamdiscs
- seampay
15 years, 6 months
Seam SVN: r10848 - branches/community/Seam_2_1.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-05-11 15:45:04 -0400 (Mon, 11 May 2009)
New Revision: 10848
Modified:
branches/community/Seam_2_1/build.xml
Log:
JBSEAM-3603
Modified: branches/community/Seam_2_1/build.xml
===================================================================
--- branches/community/Seam_2_1/build.xml 2009-05-11 19:20:00 UTC (rev 10847)
+++ branches/community/Seam_2_1/build.xml 2009-05-11 19:45:04 UTC (rev 10848)
@@ -447,7 +447,7 @@
<cleanexample name="drools" />
<cleanexample name="remoting/helloworld" />
<cleanexample name="remoting/chatroom" />
- <cleanexample name="remoting/progressbar" />
+ <!--<cleanexample name="remoting/progressbar" />-->
<cleanexample name="remoting/gwt" />
<cleanexample name="hibernate" />
<cleanexample name="jpa" />
@@ -487,7 +487,7 @@
<undeployexample name="drools" />
<undeployexample name="remoting/helloworld" />
<undeployexample name="remoting/chatroom" />
- <undeployexample name="remoting/progressbar" />
+ <!--<undeployexample name="remoting/progressbar" />-->
<undeployexample name="remoting/gwt" />
<undeployexampleNoTomcat name="groovybooking" />
<undeployexample name="quartz" />
@@ -561,7 +561,7 @@
<ant dir="examples/remoting/chatroom" target="validateConfiguration" inheritall="false" />
<ant dir="examples/remoting/gwt" target="validateConfiguration" inheritall="false" />
<ant dir="examples/remoting/helloworld" target="validateConfiguration" inheritall="false" />
- <ant dir="examples/remoting/progressbar" target="validateConfiguration" inheritall="false" />
+ <!--<ant dir="examples/remoting/progressbar" target="validateConfiguration" inheritall="false" />-->
<ant dir="examples/rss" target="validateConfiguration" inheritall="false" />
<ant dir="examples/seambay" target="validateConfiguration" inheritall="false" />
<ant dir="examples/restbay" target="validateConfiguration" inheritall="false" />
@@ -678,7 +678,7 @@
<include name="wicket/**/*" />
<include name="remoting/chatroom/**/*" />
<include name="remoting/helloworld/**/*" />
- <include name="remoting/progressbar/**/*" />
+ <!--<include name="remoting/progressbar/**/*" />-->
<include name="remoting/gwt/**/*" />
<include name="readme.txt" />
<include name="seam-examples.html" />
15 years, 6 months
Seam SVN: r10847 - branches/community/Seam_2_1/ui/src/main/java/org/jboss/seam/ui/converter.
by seam-commits@lists.jboss.org
Author: norman.richards(a)jboss.com
Date: 2009-05-11 15:20:00 -0400 (Mon, 11 May 2009)
New Revision: 10847
Modified:
branches/community/Seam_2_1/ui/src/main/java/org/jboss/seam/ui/converter/EnumConverter.java
Log:
JBSEAM-4169
Modified: branches/community/Seam_2_1/ui/src/main/java/org/jboss/seam/ui/converter/EnumConverter.java
===================================================================
--- branches/community/Seam_2_1/ui/src/main/java/org/jboss/seam/ui/converter/EnumConverter.java 2009-05-11 00:47:38 UTC (rev 10846)
+++ branches/community/Seam_2_1/ui/src/main/java/org/jboss/seam/ui/converter/EnumConverter.java 2009-05-11 19:20:00 UTC (rev 10847)
@@ -40,8 +40,14 @@
}
else if (val instanceof Collection)
{
- t = ((Collection) val).iterator().next().getClass();
- return Enum.valueOf(t, value);
+ Object firstItem = ((Collection) val).iterator().next();
+ if (firstItem instanceof Enum) {
+ t = ((Enum) firstItem).getDeclaringClass();
+ } else {
+ t = firstItem.getClass();
+ }
+
+ return Enum.valueOf(t, value);
}
}
}
15 years, 6 months