You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2012/04/04 14:00:35 UTC

svn commit: r1309352 - in /myfaces/extensions/scripting/trunk/extscript-examples/cdi-example: ./ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/myfaces/ src/main/java/org/apache/myfaces/extension/ src/main/java/org...

Author: werpu
Date: Wed Apr  4 12:00:34 2012
New Revision: 1309352

URL: http://svn.apache.org/viewvc?rev=1309352&view=rev
Log:
OWB now working in the example

Added:
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/java/
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/java/org/
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/java/org/apache/
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/java/org/apache/myfaces/
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/java/org/apache/myfaces/extension/
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/java/org/apache/myfaces/extension/scripting/
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/java/org/apache/myfaces/extension/scripting/cdi/
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/java/org/apache/myfaces/extension/scripting/cdi/JavaHello.java
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/helloWorld.xhtml
Modified:
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/pom.xml
    myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/WEB-INF/web.xml

Modified: myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/pom.xml?rev=1309352&r1=1309351&r2=1309352&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/pom.xml (original)
+++ myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/pom.xml Wed Apr  4 12:00:34 2012
@@ -124,18 +124,33 @@
         </dependency>
 
         <dependency>
-           <groupId>org.apache.geronimo.specs</groupId>
-           <artifactId>geronimo-jcdi_1.0_spec</artifactId>
-           <version>1.0</version>
-
-       </dependency>
-
-       <!-- javax.inject jsr 330 -->
-       <dependency>
-           <groupId>org.apache.geronimo.specs</groupId>
-           <artifactId>geronimo-atinject_1.0_spec</artifactId>
-           <version>1.0</version>
-       </dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jcdi_1.0_spec</artifactId>
+            <version>1.0</version>
+
+        </dependency>
+
+        <!-- javax.inject jsr 330 -->
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-atinject_1.0_spec</artifactId>
+            <version>1.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-interceptor_1.1_spec</artifactId>
+            <version>1.0</version>
+            <!--scope>runtime</scope -->
+        </dependency>
+
+        <!-- apache compatible jta spec replacement jar -->
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-jta_1.1_spec</artifactId>
+            <version>1.1.1</version>
+            <scope>compile</scope>
+        </dependency>
 
     </dependencies>
 </project>

Added: myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/java/org/apache/myfaces/extension/scripting/cdi/JavaHello.java
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/java/org/apache/myfaces/extension/scripting/cdi/JavaHello.java?rev=1309352&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/java/org/apache/myfaces/extension/scripting/cdi/JavaHello.java (added)
+++ myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/java/org/apache/myfaces/extension/scripting/cdi/JavaHello.java Wed Apr  4 12:00:34 2012
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+package org.apache.myfaces.extension.scripting.cdi;
+
+import javax.inject.Named;
+
+/**
+ * @author Werner Punz (latest modification by $Author$)
+ * @version $Revision$ $Date$
+ *
+ * Hello world CDI Java Bean for testing purposes
+ */
+@Named
+public class JavaHello
+{
+    String helloWorld = "Hello world from Java Bean";
+
+    public String getHelloWorld()
+    {
+        return helloWorld;
+    }
+
+    public void setHelloWorld(String helloWorld)
+    {
+        this.helloWorld = helloWorld;
+    }
+}

Modified: myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/WEB-INF/web.xml?rev=1309352&r1=1309351&r2=1309352&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/WEB-INF/web.xml (original)
+++ myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/WEB-INF/web.xml Wed Apr  4 12:00:34 2012
@@ -130,6 +130,10 @@
     Note, this servlet filter is vital without it Ext-Scripting will not work,
     if you do not set it you will get an appropriate warning in the command line
     -->
+    <listener>
+        <listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class>
+    </listener>
+
 
     <!-- Listener, to allow Jetty serving MyFaces apps -->
     <listener>

Added: myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/helloWorld.xhtml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/helloWorld.xhtml?rev=1309352&view=auto
==============================================================================
--- myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/helloWorld.xhtml (added)
+++ myfaces/extensions/scripting/trunk/extscript-examples/cdi-example/src/main/webapp/helloWorld.xhtml Wed Apr  4 12:00:34 2012
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:h="http://java.sun.com/jsf/html"
+        >
+<h:head>
+    <title>Hello World</title>
+</h:head>
+<h:body>
+    aaa
+    <h:outputText value="#{javaHello.helloWorld}" />
+    aaa
+</h:body>
+</html>