You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2011/06/12 23:11:08 UTC

svn commit: r1134986 - in /myfaces/tobago/trunk/tobago-example: ./ tobago-example-demo/ tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ tobago-example-demo/src/main/webapp/WEB-INF/

Author: lofwyr
Date: Sun Jun 12 21:11:08 2011
New Revision: 1134986

URL: http://svn.apache.org/viewvc?rev=1134986&view=rev
Log:
TOBAGO-1002: Tobago Demo with CDI (OWB+CODI): AJAX doesn't work correctly
 - adding OWB and CODI to the demo
 - using current version of jetty (works better than 6.x with CDI)

Added:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/beans.xml
Modified:
    myfaces/tobago/trunk/tobago-example/pom.xml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/pom.xml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml

Modified: myfaces/tobago/trunk/tobago-example/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/pom.xml?rev=1134986&r1=1134985&r2=1134986&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/pom.xml (original)
+++ myfaces/tobago/trunk/tobago-example/pom.xml Sun Jun 12 21:11:08 2011
@@ -36,19 +36,21 @@
          -->
         <groupId>org.mortbay.jetty</groupId>
         <!--    for jetty 7 they have changed the artifactId -->
-        <!--
             <artifactId>jetty-maven-plugin</artifactId>
             <version>7.4.0.RC0</version>
-        -->
+<!--
         <artifactId>maven-jetty-plugin</artifactId>
+-->
         <!-- to change the port -->
         <configuration>
           <scanIntervalSeconds>5</scanIntervalSeconds>
+<!--
           <connectors>
             <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
               <port>8080</port>
             </connector>
           </connectors>
+-->
         </configuration>
       </plugin>
     </plugins>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/pom.xml?rev=1134986&r1=1134985&r2=1134986&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/pom.xml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/pom.xml Sun Jun 12 21:11:08 2011
@@ -25,6 +25,10 @@
   <artifactId>tobago-example-demo</artifactId>
   <packaging>war</packaging>
   <name>Tobago Example Demo</name>
+  <properties>
+    <openwebbeans.version>1.1.1-SNAPSHOT</openwebbeans.version>
+    <myfaces-extcdi.version>1.0.0-SNAPSHOT</myfaces-extcdi.version>
+  </properties>
   <build>
     <finalName>tobago-example-demo</finalName>
     <plugins>
@@ -98,6 +102,76 @@
 
   <dependencies>
     <dependency>
+      <groupId>javax.enterprise</groupId>
+      <artifactId>cdi-api</artifactId>
+      <version>1.0-SP1</version>
+    </dependency>
+    <dependency>
+      <groupId>javax.validation</groupId>
+      <artifactId>validation-api</artifactId>
+      <version>1.0.0.GA</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openwebbeans</groupId>
+      <artifactId>openwebbeans-impl</artifactId>
+      <version>${openwebbeans.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openwebbeans</groupId>
+      <artifactId>openwebbeans-spi</artifactId>
+      <version>${openwebbeans.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openwebbeans</groupId>
+      <artifactId>openwebbeans-jsf12</artifactId>
+      <version>${openwebbeans.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openwebbeans</groupId>
+      <artifactId>openwebbeans-web</artifactId>
+      <version>${openwebbeans.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openwebbeans</groupId>
+      <artifactId>openwebbeans-resource</artifactId>
+      <version>${openwebbeans.version}</version>
+    </dependency>
+    <!--
+    <dependency>
+      <groupId>org.apache.myfaces.extensions.cdi</groupId>
+      <artifactId>myfaces-extcdi-dist-jsf12</artifactId>
+      <version>0.9.4</version>
+    </dependency>
+-->
+
+    <dependency>
+      <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
+      <artifactId>myfaces-extcdi-core-api</artifactId>
+      <version>${myfaces-extcdi.version}</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.myfaces.extensions.cdi.core</groupId>
+      <artifactId>myfaces-extcdi-core-impl</artifactId>
+      <version>${myfaces-extcdi.version}</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
+      <artifactId>myfaces-extcdi-jsf12-module-api</artifactId>
+      <version>${myfaces-extcdi.version}</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.myfaces.extensions.cdi.modules</groupId>
+      <artifactId>myfaces-extcdi-jsf12-module-impl</artifactId>
+      <version>${myfaces-extcdi.version}</version>
+      <scope>runtime</scope>
+    </dependency>
+
+    <dependency>
       <groupId>org.apache.myfaces.tobago</groupId>
       <artifactId>tobago-example-data</artifactId>
       <version>${project.version}</version>
@@ -193,12 +267,44 @@
       <scope>test</scope>
     </dependency>
     <dependency>
+      <groupId>javax.el</groupId>
+      <artifactId>el-api</artifactId>
+      <version>1.0</version>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
       <groupId>com.sun.el</groupId>
       <artifactId>el-ri</artifactId>
       <version>1.0</version>
-      <scope>test</scope>
+      <scope>compile</scope>
     </dependency>
+<!--
+    <dependency>
+      <groupId>test</groupId>
+      <artifactId>serviceloader-compat</artifactId>
+      <version>1.0-SNAPSHOT</version>
+      <scope>runtime</scope>
+    </dependency>
+-->
+    <dependency>
+        <groupId>com.googlecode.backport-spi</groupId>
+        <artifactId>backport-spi</artifactId>
+        <version>1.0.1</version>
+        <scope>runtime</scope>
+    </dependency>
+        <dependency>
+            <groupId>org.apacheExtras.myfaces.codi.addon</groupId>
+            <artifactId>controlled-bootstrapping-addon</artifactId>
+            <version>1.0.0</version>
+            <scope>compile</scope>
+        </dependency>
   </dependencies>
+  <repositories>
+    <repository>
+        <id>googlecode.com</id>
+        <url>https://os890-m2-repository.googlecode.com/svn/tags/apache-extras</url>
+    </repository>
+  </repositories>
   <profiles>
     <profile>
       <id>ssl</id>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java?rev=1134986&r1=1134985&r2=1134986&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/Navigation.java Sun Jun 12 21:11:08 2011
@@ -17,6 +17,7 @@ package org.apache.myfaces.tobago.exampl
  * limitations under the License.
  */
 
+import org.apache.myfaces.extensions.cdi.core.api.scope.conversation.WindowScoped;
 import org.apache.myfaces.tobago.context.ResourceManagerUtils;
 import org.apache.myfaces.tobago.example.demo.jsp.JspFormatter;
 import org.slf4j.Logger;
@@ -24,6 +25,7 @@ import org.slf4j.LoggerFactory;
 
 import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
+import javax.inject.Named;
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletResponse;
 import javax.swing.tree.DefaultMutableTreeNode;
@@ -42,6 +44,8 @@ import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+@WindowScoped
+@Named(value = "navigation")
 public class Navigation implements Serializable {
 
   private static final Logger LOG = LoggerFactory.getLogger(Navigation.class);

Added: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/beans.xml?rev=1134986&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/beans.xml (added)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/beans.xml Sun Jun 12 21:11:08 2011
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+
+<!-- marker file for CDI -->
+
+<beans xmlns="http://java.sun.com/xml/ns/javaee"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+
+   <interceptors>
+   </interceptors>
+
+   <decorators>
+   </decorators>
+
+</beans>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml?rev=1134986&r1=1134985&r2=1134986&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml Sun Jun 12 21:11:08 2011
@@ -81,11 +81,13 @@
     </phase-listener>
   </lifecycle>
 
+<!--
   <managed-bean>
     <managed-bean-name>navigation</managed-bean-name>
     <managed-bean-class>org.apache.myfaces.tobago.example.demo.Navigation</managed-bean-class>
     <managed-bean-scope>session</managed-bean-scope>
   </managed-bean>
+-->
 
   <managed-bean>
     <managed-bean-name>info</managed-bean-name>
@@ -366,7 +368,7 @@ tree-select.xhtml
     </navigation-case>
     <navigation-case>
       <from-outcome>reference/partial</from-outcome>
-      <to-view-id>/reference/partial.jsp</to-view-id>
+      <to-view-id>/content/50/partial.xhtml</to-view-id>
     </navigation-case>
   </navigation-rule>
 

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml?rev=1134986&r1=1134985&r2=1134986&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml Sun Jun 12 21:11:08 2011
@@ -101,6 +101,16 @@
   </listener>
   -->
 
+<!--
+  <listener>
+    <listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class>
+  </listener>
+-->
+
+  <listener>
+    <listener-class>org.apacheExtras.myfaces.codi.addon.openwebbeans.startup.OpenWebBeansAwareConfigurationListener</listener-class>
+  </listener>
+
   <!-- servlet -->
   <!-- no longer needed since Weblogic 8.1 SP 3
     <servlet>