[seam-commits] Seam SVN: r7474 - in trunk/examples/remoting/helloworld: src/org/jboss/seam/example/remoting and 1 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Mon Feb 25 21:09:39 EST 2008


Author: shane.bryzak at jboss.com
Date: 2008-02-25 21:09:39 -0500 (Mon, 25 Feb 2008)
New Revision: 7474

Removed:
   trunk/examples/remoting/helloworld/src/org/jboss/seam/example/remoting/HelloLocal.java
Modified:
   trunk/examples/remoting/helloworld/
   trunk/examples/remoting/helloworld/src/org/jboss/seam/example/remoting/HelloAction.java
   trunk/examples/remoting/helloworld/view/helloworld.xhtml
Log:
simplified


Property changes on: trunk/examples/remoting/helloworld
___________________________________________________________________
Name: svn:ignore
   + build
exploded-archives
dist


Modified: trunk/examples/remoting/helloworld/src/org/jboss/seam/example/remoting/HelloAction.java
===================================================================
--- trunk/examples/remoting/helloworld/src/org/jboss/seam/example/remoting/HelloAction.java	2008-02-26 02:01:32 UTC (rev 7473)
+++ trunk/examples/remoting/helloworld/src/org/jboss/seam/example/remoting/HelloAction.java	2008-02-26 02:09:39 UTC (rev 7474)
@@ -1,13 +1,12 @@
 package org.jboss.seam.example.remoting;
 
-import javax.ejb.Stateless;
-
 import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.remoting.WebRemote;
 
- at Stateless
 @Name("helloAction")
-public class HelloAction implements HelloLocal {
-  public String sayHello(String name) {
-    return "Hello, " + name;
-  }
+public class HelloAction {
+   @WebRemote
+   public String sayHello(String name) {
+      return "Hello, " + name;
+   }
 }
\ No newline at end of file

Deleted: trunk/examples/remoting/helloworld/src/org/jboss/seam/example/remoting/HelloLocal.java
===================================================================
--- trunk/examples/remoting/helloworld/src/org/jboss/seam/example/remoting/HelloLocal.java	2008-02-26 02:01:32 UTC (rev 7473)
+++ trunk/examples/remoting/helloworld/src/org/jboss/seam/example/remoting/HelloLocal.java	2008-02-26 02:09:39 UTC (rev 7474)
@@ -1,11 +0,0 @@
-package org.jboss.seam.example.remoting;
-
-import javax.ejb.Local;
-import org.jboss.seam.annotations.remoting.WebRemote;
-
- at Local
-public interface HelloLocal {
-  @WebRemote
-  public String sayHello(String name);
-}
-

Modified: trunk/examples/remoting/helloworld/view/helloworld.xhtml
===================================================================
--- trunk/examples/remoting/helloworld/view/helloworld.xhtml	2008-02-26 02:01:32 UTC (rev 7473)
+++ trunk/examples/remoting/helloworld/view/helloworld.xhtml	2008-02-26 02:09:39 UTC (rev 7474)
@@ -19,19 +19,12 @@
 
   <s:remote include="helloAction"/>
   
-  <script type="text/javascript">
-    //<![CDATA[
-    
+  <script type="text/javascript">    
     function sayHello() {
       var name = prompt("What is your name?");
-      Seam.Component.getInstance("helloAction").sayHello(name, sayHelloCallback);
+      var callback = function(result) { alert(result); };
+      Seam.Component.getInstance("helloAction").sayHello(name, callback);
     }
-
-    function sayHelloCallback(result) {
-      alert(result);
-    }
-
-    // ]]>
   </script>  
 
   <button onclick="javascript:sayHello()">Say Hello</button>




More information about the seam-commits mailing list