[seam-commits] Seam SVN: r7453 - in trunk/examples/seambay: view and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Feb 19 18:13:28 EST 2008


Author: shane.bryzak at jboss.com
Date: 2008-02-19 18:13:28 -0500 (Tue, 19 Feb 2008)
New Revision: 7453

Modified:
   trunk/examples/seambay/src/org/jboss/seam/example/seambay/AuctionService.java
   trunk/examples/seambay/src/org/jboss/seam/example/seambay/CategoryAction.java
   trunk/examples/seambay/view/sell2.xhtml
   trunk/examples/seambay/view/test.js
Log:
removed findAuction service, and broken el expression

Modified: trunk/examples/seambay/src/org/jboss/seam/example/seambay/AuctionService.java
===================================================================
--- trunk/examples/seambay/src/org/jboss/seam/example/seambay/AuctionService.java	2008-02-19 23:06:46 UTC (rev 7452)
+++ trunk/examples/seambay/src/org/jboss/seam/example/seambay/AuctionService.java	2008-02-19 23:13:28 UTC (rev 7453)
@@ -7,9 +7,12 @@
 import javax.jws.WebService;
 
 import org.jboss.seam.Component;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.security.Restrict;
 import org.jboss.seam.security.Identity;
 
 @Stateless
+ at Name("auctionService")
 @WebService(name = "AuctionService", serviceName = "AuctionService")
 public class AuctionService implements AuctionServiceRemote
 {           
@@ -29,7 +32,7 @@
       return !Identity.instance().isLoggedIn();
    }
    
-   @WebMethod
+   @WebMethod @Restrict("#{identity.loggedIn}")
    public Category[] listCategories()
    {
       CategoryAction catAction = (CategoryAction) Component.getInstance(

Modified: trunk/examples/seambay/src/org/jboss/seam/example/seambay/CategoryAction.java
===================================================================
--- trunk/examples/seambay/src/org/jboss/seam/example/seambay/CategoryAction.java	2008-02-19 23:06:46 UTC (rev 7452)
+++ trunk/examples/seambay/src/org/jboss/seam/example/seambay/CategoryAction.java	2008-02-19 23:13:28 UTC (rev 7453)
@@ -9,6 +9,7 @@
 import org.jboss.seam.annotations.In;
 import org.jboss.seam.annotations.Name;
 import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.remoting.WebRemote;
 
 @Name("categoryAction")
 public class CategoryAction
@@ -44,6 +45,7 @@
    
    @SuppressWarnings("unchecked")
    @Factory("allCategories")
+   @WebRemote
    public List<Category> getAllCategories()
    {
       allCategories = entityManager.createQuery("from Category").getResultList(); 

Modified: trunk/examples/seambay/view/sell2.xhtml
===================================================================
--- trunk/examples/seambay/view/sell2.xhtml	2008-02-19 23:06:46 UTC (rev 7452)
+++ trunk/examples/seambay/view/sell2.xhtml	2008-02-19 23:13:28 UTC (rev 7453)
@@ -68,7 +68,7 @@
         
     <script type="text/javascript">
       // Make a remoting call to load the categories
-      Seam.Remoting.eval(CATEGORY_EXPR, loadCategories);
+      Seam.Component.getInstance("categoryAction").getAllCategories(loadCategories);
     </script>
   </body>
 </html>

Modified: trunk/examples/seambay/view/test.js
===================================================================
--- trunk/examples/seambay/view/test.js	2008-02-19 23:06:46 UTC (rev 7452)
+++ trunk/examples/seambay/view/test.js	2008-02-19 23:13:28 UTC (rev 7453)
@@ -34,9 +34,6 @@
                "\n    xmlns:seam=\"http://seambay.example.seam.jboss.org/\">\n  <soapenv:Header/>" +
                "\n  <soapenv:Body>\n    <seam:listCategories/>\n  </soapenv:Body>\n</soapenv:Envelope>");
 
-svc = new ServiceMetadata("listAuctions", "General");
-svc.setDescription("List Auctions");
-
 svc = new ServiceMetadata("login", "Security");
 svc.setDescription("Login");
 svc.setRequest("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" " +




More information about the seam-commits mailing list